Restoring .bak files using query Analyzer [sql server]
I was wondering how to restore BAK files using query Analyzer as most of the hosting services will provide query Analyzer.
I got a script which works wonder and it’s damn simple.
1. create .bak file using Enterprise Manager
2. Store that in some location
3. Open Query analyzer and execute below command.
Alter Database db_Name
SET SINGLE_USER With ROLLBACK IMMEDIATE
RESTORE DATABASE db_Name
FROM DISK = ‘D:\dbName.bak’
That’s it here we go………..
One more solution is installing third party software http://www.sqlscripter.com/
Entry filed under: SQL.