Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-server-2005
I want to restore my Database backup file in a new created database For Example I have a db_test.bak bak file and want to restore to test_db database. please help me.
 

I want to restore back up through sql server 2005 query and c# .net
please help me its Urgent
I try this query
-----------------
 
RESTORE DATABASE test
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\db_Test.bak'
WITH MOVE 'db_Test' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test.mdf',
MOVE 'db_Test_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test.ldf'
 
but it is not helpfull to me.
I want sql query.
Regards
Er.Hem Rah Thakur
-----------------------
 
thanks in advance.
Posted 29-Sep-13 18:05pm
Edited 30-Sep-13 17:02pm
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

sql_server_2005_how_to_restore_database_backup/[^]
 
sql-server-restore-database-backup-using-sql-script-t-sql/[^]
 
Check the above links and choose according to your need..Hope it will help..
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

you can do this through GUI wazard.
1. Open SQL server Application.
2. Go to Object Explorer tab.
3. rt click on Database.
4. Select 'Restore files and file groups'.
5. Provide a name for new database.
6. select the radio button 'from device'.
7. locate the path of your bakup file by click on Add button in the new window.
8. select a restore source in below check box.
9. ok.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 375
1 Sergey Alexandrovich Kryukov 195
2 Prakriti Goyal 177
3 jlopez788 134
4 Kruti Joshi 117
0 OriginalGriff 6,742
1 Sergey Alexandrovich Kryukov 5,479
2 Maciej Los 3,474
3 Peter Leow 3,313
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 30 Sep 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100