MSDE Backup

  • Thread starter Thread starter Bruce A. Julseth
  • Start date Start date
B

Bruce A. Julseth

Can I use Access 2002 to back up my MSDE database? If so, how? I looked at
it today and couldn't find anything obvious on how to do it.

Thank you..
 
Lookup the T-SQL command "BACKUP DATABASE"... simply execute this command
(with appropriate arguments) and the database will be backed up.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
William (Bill) Vaughn said:
Lookup the T-SQL command "BACKUP DATABASE"... simply execute this command
(with appropriate arguments) and the database will be backed up.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________

I searched the KB and found a T-SQL procedure to backup a database. When I
run the procedure from the command line I get the error

Could not find stored procedure 'sp_add_job'

Do I need something in my path?

Thanks....
 
use

backup database MyDatabase to disk='c:\db_backup\MyDatabase.bak'

you have to create the directory where backup will be stored.

I also created for one of my solutions a script that generated name of the
backup
related to time of execution of the script. I ran this script in a batch
file that
called osql utility. Batch was scheduled to run by standard windows
scheduler.


Peter
 
Rogas69 said:
use

backup database MyDatabase to disk='c:\db_backup\MyDatabase.bak'

you have to create the directory where backup will be stored.

I also created for one of my solutions a script that generated name of the
backup
related to time of execution of the script. I ran this script in a batch
file that
called osql utility. Batch was scheduled to run by standard windows
scheduler.


Peter

I haven't written a batch file in 20 years.. Can you point me to reference
on how to write them?

Thanks...
 
You don't really need to. Just create a Command object with the appropriate
syntax and execute it.
To start with you need to create (for the first time only) a "backup
device". The following (excerpted from Books Online) creates a backup device
called "MyNwind_1" on a "disk" (it could be tape) on the C: drive at the
given path. It can be anywhere. Use the following commands as a single
string in the CommandText.

-- Create a logical backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_1',
DISK ='c:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\MyNwind_1.dat'Next, backup the database. This is the
string you execute whenever you want to backup the data. No, you don't have
to create the dump device each time.
-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_1
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
William (Bill) Vaughn said:
You don't really need to. Just create a Command object with the
appropriate syntax and execute it.
To start with you need to create (for the first time only) a "backup
device". The following (excerpted from Books Online) creates a backup
device called "MyNwind_1" on a "disk" (it could be tape) on the C: drive
at the given path. It can be anywhere. Use the following commands as a
single string in the CommandText.

-- Create a logical backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_1',
DISK ='c:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\MyNwind_1.dat'Next, backup the database. This is the
string you execute whenever you want to backup the data. No, you don't
have to create the dump device each time.
-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_1
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.

Yes, but such approach usually generates more problems as it solves and it
is more complicated.
Without enterprise manager you have to exec additional code to view contents
of the backup device. The solution I meant in my previous post generates
full backups - around 50MB each. They are easy to restore, easy to delete,
easy to backup to tape. Of course this approach is applicable for relatively
small databases.

I believe that for MSDE based applications simpler solutions should be
well - 'better' :)

Regards

Peter
 
well at start you could read help file of windows. click once on desktop to
activate it and press F1

hth

Peter
 
Back
Top