Viewing 15 posts - 166 through 180 (of 7,631 total)
Perry Whittle (8/30/2012)
SQL Kidu (8/30/2012)
Running on Windows 7 Professional Version with SP1
Interesting and never tried it, but SQL Server 2012...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 8:58 am
The real problem here though is that the OP never confirmed if the table names actually exist in the database. None of these three tricks will work if they...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 8:48 am
Right, this second wave of methods is similar to what I had in mind when I asked the OP "If the queries are all truly valid (i.e., actually compilable, with...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 8:47 am
Note also, that whatever account you execute the Restore under will become the Owner (and thus, DBO) of the Secondary. This cannot be changed later on, it can only...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 8:27 am
OK, here's a template of the command that I use:
RESTORE DATABASE [<YourDbName>]
FROM DISK = N'D:\Database_Backups\<YourDbName>_copy.bak'
WITH FILE = 1,
MOVE N'<LogicalDataFile_1>' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\<YourMDF_1>.mdf',...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 8:25 am
Yes, if you do it correctly.
Hmm, I might have a procedure around here somewhere for doing that ...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 8:07 am
And do the secondary databases need to be writeable as well, or can they be Read-Only copies?
(the reason for all of these questions is that there are over a dozen...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 7:57 am
RBarryYoung (8/30/2012)
...If you want to see a good example of how #1 and #3 are done, take a look at this procedure: http://www.sqlservercentral.com/scripts/Administration/69737/
Hmm, actually that's a pretty complicated example, plus...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 7:35 am
RBarryYoung (8/30/2012)
1. Removal of the...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 7:31 am
As someone who has written many "automation" procedures like this, this is a good first effort emreguldogan. Here are some improvements that you could make:
1. Removal of the Cursor...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 7:29 am
Lowell (8/30/2012)
SELECT definition,T1.*,T2.* from sys.sql_modules
CROSS APPLY dbo.DelimitedSplit8K(definition,' ') T1
CROSS APPLY dbo.DelimitedSplit8K(definition,' ')...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 7:06 am
Geez, I go to bed, get up, and there's twenty new posts!
Anyhoo...
dwain.c (8/29/2012)
RBarryYoung (8/29/2012)
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 30, 2012 at 6:57 am
Hmm, I almost never use the GUI ...
I think that you should probably enter the primary MDF. It contains the locations of all of the other MDFs, so that...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 29, 2012 at 8:10 pm
What error do you get?
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 29, 2012 at 7:38 pm
Try it like this:
begin
begin try
begin transaction
update fo_run_date
set fo_act_run_date = '123';-- <== this is int going into datetime field
commit transaction;
end try
BEGIN CATCH
DECLARE @ErrorMessage NVARCHAR(4000);
DECLARE @ErrorSeverity INT;
DECLARE @ErrorState INT;
Declare @ErrorLine int;
Declare @ErrorNumber...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 29, 2012 at 6:56 pm
Viewing 15 posts - 166 through 180 (of 7,631 total)