Reputation: 11871
Been Googling this for awhile and no answer....can anyone help?
Upvotes: 30
Views: 106961
Reputation: 7689
You can use the following script if you don't wish to use Wizard;
RESTORE DATABASE myDB
FROM DISK = N'C:\BackupDB.bak'
WITH REPLACE,RECOVERY,
MOVE N'HRNET' TO N'C:\MSSQL\Data\myDB.mdf',
MOVE N'HRNET_LOG' TO N'C:\MSSQL\Data\myDB.ldf'
Upvotes: 1
Reputation: 305
Not sure why they removed the option to just right click on the database and restore like you could in SQL Server Management Studio 2008 and earlier, but as mentioned above you can restore from a .BAK
file with:
RESTORE DATABASE YourDB FROM DISK = 'D:BackUpYourBaackUpFile.bak' WITH REPLACE
But you will want WITH REPLACE
instead of WITH RESTORE
if your moving it from one server to another.
Upvotes: 4
Reputation: 46
.bak
is a backup file generated in SQL Server.
Backup files importing means restoring a database, you can restore on a database created in SQL Server 2012 but the backup file should be from SQL Server 2005, 2008, 2008 R2, 2012 database.
You restore database by using following command...
RESTORE DATABASE YourDB FROM DISK = 'D:BackUpYourBaackUpFile.bak' WITH Recovery
You want to learn about how to restore .bak
file follow the below link:
http://msdn.microsoft.com/en-us/library/ms186858(v=sql.90).aspx
Upvotes: 1
Reputation: 426
For SQL Server 2008, I would imagine the procedure is similar...?
Upvotes: 40