Groups | Blog | Home
all groups > sql server msde > april 2006 >

sql server msde : List database names..?


Rod Janson
4/25/2006 12:00:00 AM
Hi,

I need to backup a MSDE database with

sql -E -q "BACKUP DATABASE <database name> TO DISK = 'E:\Database.BAK'"

- but I don't know the name of the database. I have tried with '*' without
success (as I know there is only one database). However how can I list the
MSDE database to know the correct name to insert in the statement above?

Also which parameter do I set for the backup to ensure a full backup each
time and not an incremental type which grow the backup file for each day...?

Thanks a lot for comments on this

regards

Rod

Geir Holmavatn
4/25/2006 12:00:00 AM
"Jens" <Jens@sqlserver2005.de> skrev i melding
news:1145953700.666569.308380@t31g2000cwb.googlegroups.com...
A list of databases can be retrieved with select statement:

SELECT * FROM sysdatabases

Thanks Jens, but from where do I enter this statement?

This is a 3rd party application using a plain MSDE install.

Does such a basic MSDE contain a tool to issue SQL statements?

regards

Rod

Jens
4/25/2006 1:28:20 AM
A list of databases can be retrieved with select statement:

SELECT * FROM sysdatabases

unless you don=B4t specify the DIFFERNETIAL keyword a full backup is
done every time.

HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---
Jens
4/25/2006 6:14:55 AM
YOu were right using it : OSQL.EXE

OSQL -E -Q"Select * from sysdatabases"

HTH, jens Suessmeyer.
AddThis Social Bookmark Button