Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was using testing a piece of software on a database that has not been backed up. I know I know stupid me. Anyway I was using it to insert a new table, and I apparently checked a button to drop the database if it already existed and the table got dropped. grrr, not a huge deal but I would really like to be able to recover the tables.
Can a Drop Database be rolled back without the use of backups?
I think it depends on your SLQ engine, and how it was set up.
For example:
Quote:
http://dev.mysql.com/doc/refman/5.0/en/commit.html
"By default, MySQL runs with autocommit mode enabled. This means that as soon as you execute a statement that updates (modifies) a table, MySQL stores the update on disk.
.
[SNIP]
.
To disable autocommit mode for a single series of statements, use the START TRANSACTION statement:
Code:
START TRANSACTION;
SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
UPDATE table2 SET summary=@A WHERE type=1;
COMMIT;
With START TRANSACTION, autocommit remains disabled until you end the transaction with COMMIT or ROLLBACK. The autocommit mode then reverts to its previous state"
As a general rule in RDBMSes (ime), DML (data manipulation lang eg SELECT/INSERT/UPDATE/DELETE) can be rolled back IFF you are using txns (as above).
HOWEVER, DDL (data definition lang eg DROP/CREATE etc) usually can't, even with txns.
Check the docs for your DB.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.