Viewing 15 posts - 346 through 360 (of 13,457 total)
i do something exactly like this in PowerShell; with that, i can capture the output of the script, whether it was an info message, a data set or an error...
August 25, 2017 at 7:52 am
here's a quick and dirty version of powershell, detailing what Grant was referencing
$FileNames = Invoke-SQLCMD -Query "SELECT top 5 'C:\Data\' + name + '.sql'...
August 22, 2017 at 3:42 pm
I don't know that ConenctionProperty is actually database functionality . function. it's server functionality related to the connection, right?
this works in SQL2008 and above, and I just checked, and...
August 21, 2017 at 1:55 pm
sure.
this scripts out the synonyms exactly as is, so I simply added a replace on the definition to change the whichever synonyms had a base_object_name that contains 'CONTOSO' to have...
August 10, 2017 at 8:47 am
that trigger is extremely dangerous, as data will get lost when multiple rows are inserted, and does not handle the INSTEAD OF logic that is required.
SQL triggers must be designed to handle...
August 10, 2017 at 8:35 am
can you use a case statement to evaluate two different values based on your parameter? assuming the sum > 0 like this?
declare @param varchar(3) = 'Y'
SELECT Salesperson,...
August 9, 2017 at 4:24 pm
I don't have access to an Oracle anymore, but this document over at Oracle says that the table ALL_CONS_COLUMNS is the equivalent of sp_pkeys and sp_fkeys results, does that help?
August 9, 2017 at 2:03 pm
in SQL, you don't reference the table to generate a new column value, there is an identity property that does it for you instead.
your structure and command should look...
August 9, 2017 at 10:13 am
I found this article that nicely explains why we sometimes get null query_plan columns
https://blogs.msdn.microsoft.com/psssql/2016/07/13/why-am-i-getting-null-values-for-query_plan-from-sys-dm_exec_query_plan/
does that help?
i see the same behaviour when I run sp_whoisactive; I can get...
August 9, 2017 at 10:07 am
Yeah, that is really confusing.
When I last looked, there were five specific exams for me to take to get the MCSE on that same track;they all seemed to be...
August 7, 2017 at 1:05 pm
Hey Lynn!
two versions for you:
there is a built in microsoft procedure that does this, my code is just a wrapper around that, really:
EXEC sp_msdependencies @intrans = 1
August 7, 2017 at 11:04 am
Congratulations!
details, I think, are in order. what exam did you take? go straight to your transcript, you should see it there.
did you take your SECOND exam to...
August 7, 2017 at 10:49 am
and the specifics:
if you scripted the backup command, you'll see NO INIT which means append to the previous backup file; changing it to INIT will replace the file, effectively...
August 6, 2017 at 3:04 pm
i think it is the query that is passed to the send mail task...that query gets executed in a different context.
change this:SET @alert_query = ';WITH event_data AS...
August 4, 2017 at 11:21 am
tempdb is used internally to handle things that require sorts...ORDER BY in a select that is not satisfied by an existing index, or sorting the data first, in order to do...
August 4, 2017 at 6:02 am
Viewing 15 posts - 346 through 360 (of 13,457 total)