November 27, 2013 at 9:27 am
I'm upgrading a lot of Databases to SQL Server 2008 R2.
I can't get the syntax right.
I'm confused about what to do with the last logical file name?
Please see attached word screen shot.
Thanks.
Edit: I had a typo, syntax error. No pun intended.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 27, 2013 at 10:14 am
I atttached the word work with screen shot and tried to open myself but I could not open it?
How can I embed an image intop my post?
Thanks.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 27, 2013 at 10:17 am
RESTORE FILELISTONLY
FROM DISK = 'M:\Backup_2005\Complete\YAFNET_backup_2013_11_21_192534_3162500.bak'
GO
LogicalNamePhysicalNameTypeFileGroupNameSize
YAFNETZ:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\YAFNET.mdfDPRIMARY4390912
YAFNET_logZ:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\YAFNET_log.LDFLNULL5308416
sysft_YafSearchZ:\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\YafSearchFPRIMARY468974
RESTORE FILELISTONLY
FROM DISK = 'M:\Backup_2005\Complete\YAFNET_backup_2013_11_21_192534_3162500.bak'
GO
RESTORE DATABASE YAFNET
FROM DISK =
WITH REPLACE,
RECOVERY,
MOVE '' TO 'M:\MSSQL\Data\',
MOVE '' TO 'M:\MSSQL\Log\'
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 27, 2013 at 11:14 am
Have you tried using the GUI to set up the restore, then generate the script to a query window ?
November 27, 2013 at 2:58 pm
homebrew01 (11/27/2013)
Have you tried using the GUI to set up the restore, then generate the script to a query window ?
Thanks. I restored through the GUI which I never do but it worked.
I'm not sure how to generate a script?
I was not sure what the 3rd file was for?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 27, 2013 at 3:45 pm
" ... I'm not sure how to generate a script? ... "
Open the GUI, get everything set the way you want. Instead of clicking "OK", select "Script" at the top of the GUI pane.
November 29, 2013 at 7:08 am
Welsh Corgi (11/27/2013)
I atttached the word work with screen shot and tried to open myself but I could not open it?How can I embed an image intop my post?
Thanks.
I opened it just fine
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
November 29, 2013 at 8:14 am
Thanks.:-)
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 29, 2013 at 8:22 am
which version\edition of sql server are you using?
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
November 29, 2013 at 8:43 am
Perry Whittle (11/29/2013)
which version\edition of sql server are you using?
I'm moving from SQL Server 2005 RTM to SQL Server 2008 R2 and 2012 in the near future.
The server has about 25 Databases on it and they are all on the new Server..
I really don't want to perform any upgrades for I do not want anything to go wrong. I know the risk is low but I do not know what has been to that Server. Reboot and it does not come up I loose a customer.
A bunch of stuff does not work. e.g. I can run a job based on a maintenance plan which is a pain.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 29, 2013 at 10:21 am
So these are native backups from 2005 rtm?
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
November 29, 2013 at 10:35 am
I created the maintenance plans and I had to copy and paste the T-SQL Code for the Plan/Job would not run.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
November 29, 2013 at 11:26 am
I don't understand what the current problem is. Did your restore scripts work ?
Are the maint plan & jobs related somehow, or a separate problem ?
December 4, 2013 at 4:49 pm
Well I know you've done it via the GUI now, but the 3rd file looks like a full text index.
You could have just specified the path in the same way as the other two, i.e.. WITH MOVE...
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply