Viewing 15 posts - 136 through 150 (of 482 total)
Thanks Scott,
Very useful.
April 22, 2015 at 5:06 am
Scott,
I'm curious as well as to what the SQL would be to handle all columns at once.
Been thinking about it -- not too hard -- and coming up...
April 21, 2015 at 9:53 am
Although that does work nicely in the scenario I presented, that won't work in for my real-life case: there are other inserts into identity tables earlier in the procedure.
I should...
March 20, 2015 at 6:50 am
Hmm not quite: let's say there are x groups, and the parents' ids aren't always sequential.
March 19, 2015 at 12:10 pm
That's working in the back-end Eirikur, thank you!!
I have to dump the empty result set into a #tmp table so the front-end doesn't puke, but that's a minor detail.
January 2, 2015 at 8:46 am
Eirikur,
This is select @@version:
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) Jun 28 2012 08:36:30 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows...
January 2, 2015 at 7:40 am
DECLARE @code varchar(max)
SET @code = 'SELECT * from FROM sys.tables';
BEGIN TRY
EXEC ('SET PARSEONLY ON; ' + @code + '; SET PARSEONLY OFF;')
SELECT 'Success'
END TRY
BEGIN CATCH
SELECT 'Error'
END CATCH
This correctly gets...
January 2, 2015 at 7:00 am
Thanks for the reply Sigerson,
What I'm actually after is a T-SQL procedure or function to which I can pass the variable containing the generated code...
I tried a roll-your-own proc which...
December 31, 2014 at 9:58 am
One more question:
Let's assume I go with the certificate method.
Each night, we do database transfers to various target servers, using smo.Transfer.
Does the certificate/permissions granted by the cert travel...
December 12, 2014 at 12:09 pm
My apologies Emil, you are correct.
In fact, Erland's article also covers the Execute As scenario. But I am looking at the Certificates section.
December 3, 2014 at 9:21 am
djj provided the link above. I'm looking into it now...
December 3, 2014 at 8:57 am
My bad, I guess I didn't go into enough detail in the OP.
I am aware of the dangers of xp_cmdshell, and I use it a) sparingly and b) carefully -...
December 3, 2014 at 8:39 am
Hi Jeff,
To be clear, it's not her account that has privs on xp_cmdshell. And she is a trusted user.
Moreover, the sproc she's executing that's calling xp_cmdshell take no parameters....
December 3, 2014 at 5:22 am
OK, but that account already owns quite a few DBs, while not having a "personal" login. So I wondered if there was a way.
Thanks Gary.
October 24, 2014 at 5:34 am
Viewing 15 posts - 136 through 150 (of 482 total)