backup and Restore MSDE 2000 database?

desmondtan

Active member
Joined
Dec 24, 2002
Messages
40
Does anyone knows how to backup and restore as well as attach anda detach databse from a MSDE 2000 Sql server ?
 
Hi joteke , need advice form you .

Do you have any experience to deploy the MSDE 2000 databse to another machine ?

If I would like deploy my MSDE databse to another machine , which method is going to use - "backup/restore or attch/detach".

"osql" can only run at command prompt , how to I run on Windows form based ?
 
If you use Windows Forms, then youd use ADO.NET to connect to the db. In that case I would use sp_attach_db and sp_detach_db procedures. Just note that they are run agains master database and you need to be sa to do it.
 
Hi joteke, thank you very much .

I have one question to ask :
1. when attach/detach database using osql , we must specified the servername\instance , eg:

osql -E -S servename\instance - i sp_attach.sql

In Vb.net , we can replace the servername with [local] ( if msde is on local), but osql doesnt allow . How to I do it if I want to create a batch file for this command sp that it can run on diffrent machine (assume that the instance is same)
 
Why would you use osql in case you do it from remote machine? Couldnt tou just use ADO.NET and run procedures against master db?

heres about osqls syntax:

S server_name[\instance_name]

Specifies the instance of Microsoft
 
very that I still new in Vb.net , the MSDE is installed on local machine, deployed together with the program .

Could you show me where I can find explanation on how to use ADO.NET to backup/restore database ?
 
Yes . I get it.

In the batch , I do this way :

SET para=hostname
osql -E -S %hostanme%\instance ..........

At command prompt , type the batchfilename . You can execute the osql in differnet machine.
 
Back
Top