Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restoring a backup into another database
Message
De
01/09/2010 20:59:38
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Copies de sauvegarde
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01479690
Message ID:
01479709
Vues:
34
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform