1

I want to take data base back up, so is there any sql script to take that, like how we use the sql script to get table content as "SELECT * FROM tblname" ,

Thanks in advance

bluish
  • 26,356
  • 27
  • 122
  • 180
Sowmya
  • 693
  • 3
  • 9
  • 19
  • 1
    I have no idea what you are asking... Also, many RDBMs include at least rudamentary backup/restore utilities, what's wrong with using those? – user Feb 22 '11 at 13:15

3 Answers3

1

Looks like hes talking about SQL Server 2008.

To do a full database backup to File/Query you can use the 'Generate Scripts...' option on the Database.

Open SQL Server Management studio, right click on the database and choose 'Tasks->Generate Scripts...'

Then use the wizard to backup the database. You can script the whole database or parts of it. Two important options: In the 'Advanced' section, you will probably want to ensure 'Type of backup = 'Schema and Data' and the 'Script Statistics' is on.

This will produce a *.sql file that you can use as a backup.

Simon
  • 9,197
  • 13
  • 72
  • 115
0

What Database?

May be missing what's being asked here but have you looked at each database's backup utility for example mysqldump?

mysqldump

ncremins
  • 9,140
  • 2
  • 25
  • 24
0

Try DBSourceTools.
http://dbsourcetools.codeplex.com
It is specifically designed to script all database objects and data to disk.
You can then place these files under source-code control to effectively take a "snapshot" of the database.
All you need to do then is to define a deployment target database, and DBSourceTools will re-create the target database from source.
It also has a table Data View from which you can generate insert scripts.

blorkfish
  • 21,800
  • 4
  • 33
  • 24