I'm provided with a .bak file that contains a backup of a small database. My question is how do I restore it to the SQL Server. I used the import feature but it gave me all kinds of errors when attempting to import it.
Any ideas!
thanks!
Hi,
You can either use SQL server enterprise manager GUI to restore a database
ot use the Query analyzer ... RESTORE database command.
Enterprise manager
1. Open Enterprise manager -- connect to SQL server -- Right click above the
database -- All tasks -- CLick Restore database
2. In the Restore database as "Give a Database name"
3. IN the restore options choose "From Device"
4. Click select devices command button -- CLick add and choose the backup
file name (.BAK file)
5. Click OK
6. IN restore screen also CLICK OK
-- This will restore the database
From Query Analyzer:-
1. Login to Query Analyzer as 'SA' or user with sysadmin ort equalent server
roles.
2. Execute the below command
Restore database <dbname> from disk='d:\backup\dbname.bak' with stats=10
-- Change the directory and file name based on ur requierement.
Thanks
Hari
MCDBA
"sbinev" <sbinev@.discussions.microsoft.com> wrote in message
news:14AACC0D-9E5A-45E6-ABC1-15623DA32CD6@.microsoft.com...
> I'm provided with a .bak file that contains a backup of a small database.
My question is how do I restore it to the SQL Server. I used the import
feature but it gave me all kinds of errors when attempting to import it.
> Any ideas!
> thanks!
|||sbinev,
SQL Server Books Online (BOL) installs with SQL Server. I heartily
recommend you look here for how to restore a database. The documentation
is very clear and comprehensive and shows you many methods of
accomplishing this task.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
sbinev wrote:
> I'm provided with a .bak file that contains a backup of a small database. My question is how do I restore it to the SQL Server. I used the import feature but it gave me all kinds of errors when attempting to import it.
> Any ideas!
> thanks!
|||Thanks a lot guys!! )
The first method from the Enterprise Manager kept giving me errors, but I used T-SQL looked in the books online and with MOVE TO clause after the RESTORE... clause it worked. So thanks for your advice. It's hard to be novice!
"Hari Prasad" wrote:
> Hi,
> You can either use SQL server enterprise manager GUI to restore a database
> ot use the Query analyzer ... RESTORE database command.
> Enterprise manager
> 1. Open Enterprise manager -- connect to SQL server -- Right click above the
> database -- All tasks -- CLick Restore database
> 2. In the Restore database as "Give a Database name"
> 3. IN the restore options choose "From Device"
> 4. Click select devices command button -- CLick add and choose the backup
> file name (.BAK file)
> 5. Click OK
> 6. IN restore screen also CLICK OK
> -- This will restore the database
>
> From Query Analyzer:-
> 1. Login to Query Analyzer as 'SA' or user with sysadmin ort equalent server
> roles.
> 2. Execute the below command
> Restore database <dbname> from disk='d:\backup\dbname.bak' with stats=10
> -- Change the directory and file name based on ur requierement.
>
> --
> Thanks
> Hari
> MCDBA
> "sbinev" <sbinev@.discussions.microsoft.com> wrote in message
> news:14AACC0D-9E5A-45E6-ABC1-15623DA32CD6@.microsoft.com...
> My question is how do I restore it to the SQL Server. I used the import
> feature but it gave me all kinds of errors when attempting to import it.
>
>
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment