By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,652 Members | 1,842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,652 IT Pros & Developers. It's quick & easy.

Backing Up Database using code

P: 14
I am trying to find information on how to backup a database by simply clicking a button on a form. When the button is clicked a message box pops up asking the user where the backup should be placed and what it should be named. Any help on this subject would be very benefical to me.

Thank you in advanced,
Justin
May 10 '07 #1
Share this Question
Share on Google+
2 Replies


JConsulting
Expert 100+
P: 603
I am trying to find information on how to backup a database by simply clicking a button on a form. When the button is clicked a message box pops up asking the user where the backup should be placed and what it should be named. Any help on this subject would be very benefical to me.

Thank you in advanced,
Justin
Hi Justin,
If you're trying to do this with the database that you're actually in, this is a bad practice. Reason being, if the database is open, there may or may not be record or table locks open which more often than not, will result in corruption. Especially if this is a shared application, where one or more users may be using it at the same time.

You should create a batch file that you can run from your server's scheduler that makes a backup when you know that no one has the database open.
J
May 10 '07 #2

P: 6
I am trying to find information on how to backup a database by simply clicking a button on a form. When the button is clicked a message box pops up asking the user where the backup should be placed and what it should be named. Any help on this subject would be very benefical to me.

Thank you in advanced,
Justin
Hi Justin,
U Have Said that u want to perform database backup but u havent specified weather it is in Mysql,Sql server or oracle and some other database.Me too trying to do the same thing.If it is in mysql u can use mysqldump command .I have used the same in mysql on linux.But in my situation when u click button it sees weather it is that sceduled day and time and then one console window rises if it is scheduled date and time and then it perform commands automatically.If this u require i can help u regarding this.

Regards,
Vishnu
May 11 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.