Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restoring from script
Message
De
10/06/2010 15:06:55
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Copies de sauvegarde
Titre:
Restoring from script
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01468358
Message ID:
01468358
Vues:
105
Instead of always using the interface, I thought I would script the restore procedure. So, I tried this:
RESTORE DATABASE [LevelExtreme] FROM  DISK = N'D:\Data\Level Extreme\LevelExtreme.bak'
 WITH  FILE = 1,  NOUNLOAD,  REPLACE,  STATS = 10
GO
But, I obtain this:

Msg 3102, Level 16, State 1, Line 1
RESTORE cannot process database 'LevelExtreme' because it is in use by this session. It is recommended that the master database be used when performing this operation.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

What else is missing in this script so I can execute it?
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform