Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restoring a backup into another database
Message
From
01/09/2010 20:59:38
 
General information
Forum:
Microsoft SQL Server
Category:
Backups
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01479690
Message ID:
01479709
Views:
33
>Here is a script:
>
>
>
>RESTORE DATABASE [DbTest] FROM  DISK = N'C:\SQL DB Backups\AW.bak' WITH  FILE = 1,  
>MOVE N'AdventureWorks_Data' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DBTest.mdf',  
>MOVE N'AdventureWorks_Log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DBTest.ldf',  
>NOUNLOAD,  REPLACE,  STATS = 10
>
>
>If you do this in SSMS, type the new name in the restore to dialog (in the options). This is generated as MOVE option in RESTORE command.
>
>See attached screen - you need to type the new name where I show - type here.

Thanks, I have a bunch of .ndf which I do not need to restore. Is there a way to adjust this script to only restore the mdf and the log?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform