Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 11-22-2005, 06:13 PM
Majid_ag Majid_ag is offline
Junior Member
 
Join Date: Jul 2005
Posts: 22
Default Backup SQL Server DataBase in delphi

Hi.

Can you tell me how can I create backup form a sqlserver2000 database , please ?

Thank you.

bye.
Reply With Quote
  #2  
Old 11-22-2005, 07:11 PM
atulparmar atulparmar is offline
Senior Member
 
Join Date: Aug 2004
Posts: 305
Default RE: Backup SQL Server DataBase in delphi

Create SP that accepts backup filename as parameter and execute it from delphi.

Accept As Answer if it helps

Atul
Reply With Quote
  #3  
Old 11-22-2005, 08:15 PM
dcet99 dcet99 is offline
Member
 
Join Date: Oct 2005
Posts: 46
Default RE: Backup SQL Server DataBase in delphi

a simple way to take backup from delpi ... u can execute this TSQL


BackupName := 'C:\mydbbkp' ;
ADOQuery1.SQL.Text := 'BACKUP DATABASE myDB TO DISK = '+QuotedStr(BackupName) ;
ADOQuery1.ExecSQL ;

and for more information plz see this :

Syntax
Backing up an entire database:

BACKUP DATABASE { database_name | @database_name_var }
TO < backup_device > [ ,...n ]
[ WITH
[ BLOCKSIZE = { blocksize | @blocksize_variable } ]
[ [ , ] DESCRIPTION = { 'text' | @text_variable } ]
[ [ , ] DIFFERENTIAL ]
[ [ , ] EXPIREDATE = { date | @date_var }
| RETAINDAYS = { days | @days_var } ]
[ [ , ] PASSWORD = { password | @password_variable } ]
[ [ , ] FORMAT | NOFORMAT ]
[ [ , ] { INIT | NOINIT } ]
[ [ , ] MEDIADESCRIPTION = { 'text' | @text_variable } ]
[ [ , ] MEDIANAME = { media_name | @media_name_variable } ]
[ [ , ] MEDIAPASSWORD = { mediapassword | @mediapassword_variable } ]
[ [ , ] NAME = { backup_set_name | @backup_set_name_var } ]
[ [ , ] { NOSKIP | SKIP } ]
[ [ , ] { NOREWIND | REWIND } ]
[ [ , ] { NOUNLOAD | UNLOAD } ]
[ [ , ] RESTART ]
[ [ , ] STATS [ = percentage ] ]
]

accept if it help.

regards
AHK
Reply With Quote
  #4  
Old 11-23-2005, 09:17 AM
johnjces johnjces is offline
Senior Member
 
Join Date: Oct 2001
Posts: 444
Default RE: Backup SQL Server DataBase in delphi

Better to use an ADOCommand rather than an ADOQuery, but it will work.

John
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 06:39 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.