| |

VerySource

 Forgot password?
 Register
Search
View: 725|Reply: 2

How to backup and restore the ASA database, thank you

[Copy link]

1

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-6 14:50:01
| Show all posts |Read mode
How to back up and restore the ASA database, try to give the code, thank you
The online code is as follows, but failed
string mysqls, bfname
bfname = trim (sle_1.text)
bfname = left (bfname, len (bfname) -2)
mysqls = "BACKUP Database TO '" + bfname + "'"
execute immediate: mysqls USING SQLCA; // Use SQL statement to execute backup immediately
if sqlca.sqlcode = 0 then
messagebox ("Information Tip", 'Backup succeeded!', information!, OK!) // Provide information about the success of the backup
else
messagebox ("Information Tip", 'Backup failed!', information!, OK!)
end if
Reply

Use magic Report

1

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-6 15:21:01
| Show all posts
Even the following code does not work, no new database is created
string lsSql
lsSql = "dump database to D:\supermarket\New folder\new1.dup"
sqlca.AutoCommit = true
execute immediate: lsSql;
---------------------------
Not the following
string ls_directory
ls_directory = "dbbackup -c ~" eng = ckclgl; dbn = ckclgl; uid = dba; pwd = sql ~ "-y" + sle_1.text
run (ls_directory, Minimized!) // Application execution is complete
Can't complete the database backup in the specified directory, nothing. Thanks for your help
Reply

Use magic Report

1

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-8 13:27:01
| Show all posts
Brothers know, for the top code, modify it as follows
string mysqls, bfname
bfname = trim (sle_1.text)
bfname = left (bfname, len (bfname) -2)
mysqls = "BACKUP Database TO '" + bfname + "'"
execute immediate: mysqls USING SQLCA; // Use SQL statement to execute backup immediately
if sqlca.sqlcode = 0 then
messagebox ("Information Tip", 'Backup succeeded!', information!, OK!) // Provide information about the success of the backup
else
messagebox ("Information Tip", 'Backup failed!', information!, OK!)
end if
You have to block the left statement, otherwise you wo n’t have an extension.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list