Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restoring from script
Message
 
To
10/06/2010 15:06:55
General information
Forum:
Microsoft SQL Server
Category:
Backups
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01468358
Message ID:
01468359
Views:
57
This message has been marked as the solution to the initial question of the thread.
>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?

USE Master
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform