Viewing 15 posts - 481 through 495 (of 1,193 total)
Good link, thanks. I wasn't aware of that. It is always a good day when you learn something 🙂
July 23, 2013 at 10:03 am
Cool, glad it's working!
Not sure about the all_errormsgs option - as far as I know the output contains all errors regardless of whether you specify this option or not.
I know...
July 23, 2013 at 8:06 am
Thanks.
Adding this to your where clause should show anything still running plus anything that has or is due to run today:
AND ((ja.start_execution_date is not null and ja.stop_execution_date is null)
OR (ja.start_execution_date...
July 23, 2013 at 4:43 am
Tableresults seems to work:
Invoke-Sqlcmd -Query "dbcc checkdb(N'$($dbName)') WITH ALL_ERRORMSGS, TABLERESULTS" | ft -AutoSize | Out-File "$($ResultFile)"
Interestingly, the Database class includes methods for Check Alloc, Catalog, and Table, but not an...
July 23, 2013 at 4:27 am
Haven't tried it myself, but I think the -Verbose parameter is what you need.
July 23, 2013 at 3:40 am
exec msdb.dbo.sp_help_jobactivity
if you look in the proc, it's essentially this:
SELECT
ja.session_id, ...
July 23, 2013 at 3:29 am
Thanks Micky.
I'd still go back to permissions - the only way I've been able to get the same error is if the user doesn't have the rights it needs. I...
July 22, 2013 at 7:13 am
No worries.
Can you give any more of the script? Particularly how $db is populated.
Is the step in the agent job a powershell step, command line, or something else?
Thanks
July 22, 2013 at 4:58 am
Bit of a guess, but permissions issue? Presumably the ISE is running under your credentials whilst the SQL Agent one will be the SQL Agent account.
Is the job targeting the...
July 22, 2013 at 3:32 am
If you haven't already run it, upgrade advisor will be useful:
http://msdn.microsoft.com/en-us/library/ms144256(v=sql.100).aspx
July 10, 2013 at 9:49 am
No worries mate 🙂
If in doubt, you can check the type & properties of something by piping it to get-member:
$Database | get-member
June 26, 2013 at 3:50 am
Hi Jack, try using Invoke-SqlCmd in place of SQLCMD - it gives the results in a data row format, whereas I think SQLCMD just gives you a string that you...
June 25, 2013 at 7:23 am
I must have missed it first time around too. Great article Gianluca, thanks!
June 21, 2013 at 7:46 am
houming1982 (4/19/2013)
Unfortunately, in that case you'll need to go through the failover process.
Wish you could specify the owner as part of the restore statement but no joy. Not sure if...
April 23, 2013 at 10:55 am
Viewing 15 posts - 481 through 495 (of 1,193 total)