Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring Database using Transact SQL

Status
Not open for further replies.

SilentWings

Programmer
Apr 24, 2002
27
0
0
PT
Hi ppl,
I have a transact sql that create a database. It works.
Then I need to put the database on the server.
I need a transact sql that restores a complete database that I have saved in a folder imagine 'c:\tem\mydb.bck'
Can you give-me that TSQL?
Note: The server where I am restoring the database never had this database on it.

Thanks in advance
 
restore database {database_name} from disk='c:\tem\mydb.bck'

See restore database in BOL for full syntax options.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
For your information:

BOL=Books OnLine=Microsoft SQL Server's HELP
Installed as part of the Client Tools
Found at Start>Programs>Microsoft SQL Server>Books OnLine

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top