Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SP for restoring a DB?

Author  Topic 

Passero
Starting Member

12 Posts

Posted - 2008-01-23 : 06:38:42
IS there a system SP for restoring a DB from a file?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-01-23 : 07:08:17
Yes.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-01-23 : 07:08:49
If not sure which one, or even the name, have a look at Books Online for RESTORE command.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-23 : 07:11:46
quote:
Originally posted by Passero

IS there a system SP for restoring a DB from a file?


Yes if the file is a backup file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Passero
Starting Member

12 Posts

Posted - 2008-01-23 : 07:16:30
does anybody know the name of the sp?

I'll give a short explenation why we need this...
We want to create a batch import. We get a backup file from a customer on a specific location. We download the file by java and we place the backup where we want (configured in the batch).
We want to use jdbc to restore that DB so that's why we want to use a sp because we can use sp from java.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-23 : 07:24:18
Restore database db_name from disk='file path'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-01-23 : 07:30:21
quote:
Originally posted by Passero

does anybody know the name of the sp?
Yes. As I wrote in my previous response, the name is RESTORE.


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -