Viewing 15 posts - 20,296 through 20,310 (of 26,490 total)
Welcome to the SSC Community. We frequently go off on tangents from the original question, but usually those tangents are related in some way with the topic (unless it...
June 24, 2009 at 10:54 am
Looks like he'd have deleted his posts if he could have. Doesn't help, however, where those posts had been quoted.
June 24, 2009 at 10:46 am
As it appears you were provided several approaches to solve your problem, which one did you select?
June 23, 2009 at 10:42 pm
You may want to spend some time reading BOL (Books Online, the SQL Server Help System).
Change SP_RENAMEDB to EXEC SP_RENAMEDB
June 23, 2009 at 9:55 pm
Well, its your code. What was else for? If you don't need it, drop it.
June 23, 2009 at 8:42 pm
The first GO ends your batch. That is what is causing your problem. Try this:
DECLARE @SQLCmd nvarchar(4000);
set @SQLCmd = '
ALTER DATABASE test SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
SP_RENAMEDB test,test_Old
GO
ALTER...
June 23, 2009 at 8:26 pm
The first GO ends your batch. That is what is causing your problem. Try this:
DECLARE @SQLCmd nvarchar(4000);
set @SQLCmd = '
ALTER DATABASE test SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
SP_RENAMEDB test,test_Old
GO
ALTER...
June 23, 2009 at 8:25 pm
Thank you. That explaination is sure to help someone else out in a similar situation. It will provide them with a direction to look at things in their...
June 23, 2009 at 8:17 pm
Perfect! Just the change I made in my copy here at home. Of course the 4 minutes it took on my part would have saved you quite a...
June 23, 2009 at 7:58 pm
shane94 (6/23/2009)
Yea that's what I just finished doing actually 🙂and finally found the nested down culprit
Thanks for the advice
Since you came looking for help, forum etiquette would have tell all...
June 23, 2009 at 7:53 pm
And, for the record, I have made a simple correction to my code and have the results you are expecting: 3 and 6.
Show me what you can do with the...
June 23, 2009 at 6:40 pm
ahmet erispaha (6/23/2009)
June 23, 2009 at 6:36 pm
Give the following a try. If not completely successful, let us know what issues you run into.
Code is in the attachment. Once again I just can't seem to...
June 23, 2009 at 5:03 pm
When you applied the last transaction log, did you use the WITH RECOVERY clause or did you use the WITH NORECOVERY clause?
If the latter, try RESTORE DATABASE dbname WITH RECOVERY
June 23, 2009 at 4:46 pm
lmu92 (6/23/2009)
Lynn Pettis (6/23/2009)
First of all this:UPDATE tablename SET
@variablename = [i]columnname[/i] = somevalue
is a documented feature of Microsoft SQL Server. ...
Hi Lynn,
would you mind quoting the...
June 23, 2009 at 4:40 pm
Viewing 15 posts - 20,296 through 20,310 (of 26,490 total)