Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #46  
Old 12-27-2013, 04:05 PM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
So after the server shutdown on Christmas, i logged in and used the SQL explorer, which is an awesome tool btw =]. However i got an error " SQL Explorer Error: database disk image is malformed
Query: SELECT name FROM 'sqlite_master' WHERE type = 'table' ORDER BY name"

In my knowledge my server does not call this query. Also everything now says "loading" and i cannot even get to the schema for anything.
Reply With Quote
  #47  
Old 12-27-2013, 04:33 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by JohnnyChimpo View Post
So after the server shutdown on Christmas, i logged in and used the SQL explorer, which is an awesome tool btw =]. However i got an error " SQL Explorer Error: database disk image is malformed
Query: SELECT name FROM 'sqlite_master' WHERE type = 'table' ORDER BY name"

In my knowledge my server does not call this query. Also everything now says "loading" and i cannot even get to the schema for anything.
Sounds like the database is corrupted. You may want to contact Stefan. You can also try downloading it and recovering data yourself (there is information on trying to recover data from damaged SQLite databases online).
__________________
Reply With Quote
  #48  
Old 12-27-2013, 04:42 PM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
Is there any way to avoid these situations? How could it have been made corrupt?
Reply With Quote
  #49  
Old 12-27-2013, 06:22 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by JohnnyChimpo View Post
Is there any way to avoid these situations? How could it have been made corrupt?
I don't really know what happened but if there was a sudden failure (power outage, server crash, etc.) there is potential for corruption. It's also possible there was disk or memory corruption but that sounds unlikely since it coincided with some kind of server crash.

Given that the recommended mode for running your databases in Graal is with SYNCHRONOUS set to OFF, it's kind of surprising it took this long for a database to become corrupted. From the SQLite docs (emphasis mine):

Quote:
When synchronous is FULL (2), the SQLite database engine will use the xSync method of the VFS to ensure that all content is safely written to the disk surface prior to continuing. This ensures that an operating system crash or power failure will not corrupt the database. FULL synchronous is very safe, but it is also slower. When synchronous is NORMAL (1), the SQLite database engine will still sync at the most critical moments, but less often than in FULL mode. There is a very small (though non-zero) chance that a power failure at just the wrong time could corrupt the database in NORMAL mode. But in practice, you are more likely to suffer a catastrophic disk failure or some other unrecoverable hardware fault. With synchronous OFF (0), SQLite continues without syncing as soon as it has handed data off to the operating system. If the application running SQLite crashes, the data will be safe, but the database might become corrupted if the operating system crashes or the computer loses power before that data has been written to the disk surface. On the other hand, some operations are as much as 50 or more times faster with synchronous OFF.
This is mostly speculation and maybe Stefan or someone else can provide more information as I don't really know what happened.
__________________
Reply With Quote
  #50  
Old 12-27-2013, 06:50 PM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
Assuming that my database did go to complete ****, like i think it did. How do i get it to reset so i can add back the stuff i lost. Ive tried deleting the DB in the databases folder, that did nothing. I also tried erasing the contents and uploading it back into the folder, which did nothing.
Reply With Quote
  #51  
Old 12-27-2013, 08:25 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by JohnnyChimpo View Post
Assuming that my database did go to complete ****, like i think it did. How do i get it to reset so i can add back the stuff i lost. Ive tried deleting the DB in the databases folder, that did nothing. I also tried erasing the contents and uploading it back into the folder, which did nothing.
If deleting it from the databases directory doesn't work, you might want to contact Stefan. You might also try deleting it while the NPC-server is offline.

In the meantime you could also just create another database and switch everything to use your new database (in case it takes Stefan a while to respond).
__________________
Reply With Quote
  #52  
Old 12-27-2013, 08:51 PM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
Could you give me the steps to do that because im pretty sure i did it right and it didnt work. (create another db)
Reply With Quote
  #53  
Old 12-27-2013, 11:27 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by JohnnyChimpo View Post
Could you give me the steps to do that because im pretty sure i did it right and it didnt work. (create another db)
Just add another databases= line to server options. You'll probably need to give it a new name and change your scripts to reflect that (or maybe you can remap "default", idk).
__________________
Reply With Quote
  #54  
Old 06-02-2014, 08:15 PM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
Just out of curiosity, do the newer versions support importing .db files yet? I know they can be exported and viewed in other programs for backup purposes, but an option to import it all back in would be sweet.
Reply With Quote
  #55  
Old 06-02-2014, 08:36 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Quote:
Originally Posted by Draenin View Post
Just out of curiosity, do the newer versions support importing .db files yet? I know they can be exported and viewed in other programs for backup purposes, but an option to import it all back in would be sweet.
Pretty sure you can over-write the file in databases folder
(rw databases/*)
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #56  
Old 06-05-2014, 04:42 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
Ah, okay. I'll be sure to test that out.

Really wanna try the new version, but I wanted to be sure I wouldn't be losing the stuff I've already entered.
Reply With Quote
Reply


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 Off

Forum Jump


All times are GMT +2. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.