SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 19/07/2016, 10:31 PM   #231
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,772
Reputation: 854
Default Re: [BETA] BUD - Blazing User DB

Quote:
Originally Posted by Uberanwar View Post
Hi there!
BUD::Setting( opt.Asynchronous, true);
I heard, this will make it faster, however if something happens-database will be corrupted, can anyone explain about this? What if I want to keep it on, how do I prevent getting the database corrupted are there any possible ways?
Synchronous OFF mode basically writes the data without any sort of backup. If your program terminates or computer shuts down unexpectedly, you will have data loss and your db file will get corrupted if your have it OFF.

There are 3 types of syncs:
0 = OFF | 1 = NORMAL | 2 = FULL
(default is always FULL (2))

To avoid chances of corrupting database file, we use timers or close the database after some time to write changes to the .db file.


* If you trust your server, it will never crash, then use sync off without any worries and save data after good time intervals.
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 20/07/2016, 12:07 AM   #232
Slice
High-roller
 
Join Date: Mar 2008
Posts: 1,831
Reputation: 1607
Default Re: [BETA] BUD - Blazing User DB

Quote:
Originally Posted by Gammix View Post
Synchronous OFF mode basically writes the data without any sort of backup. If your program terminates or computer shuts down unexpectedly, you will have data loss and your db file will get corrupted if your have it OFF.

There are 3 types of syncs:
0 = OFF | 1 = NORMAL | 2 = FULL
(default is always FULL (2))

To avoid chances of corrupting database file, we use timers or close the database after some time to write changes to the .db file.


* If you trust your server, it will never crash, then use sync off without any worries and save data after good time intervals.
Closing the database won't guarantee safety in the event of a crash. In fact, I doubt it does more than just keeping it open.

Personally, I use the following, which gives both performance and safety:
pawn Code:
db_exec(db, "PRAGMA synchronous = NORMAL");
    db_exec(db, "PRAGMA journal_mode = WAL");
Luckily the horribly outdated SQLite implementation supports WAL.

@FrAnKiN1: Try now, I contacted ****** to remove that warning..
Slice is offline   Reply With Quote
Old 30/07/2017, 12:05 AM   #233
crukk11
Huge Clucker
 
crukk11's Avatar
 
Join Date: Jan 2017
Location: Malaysia
Posts: 313
Reputation: 5
Default Re: [BETA] BUD - Blazing User DB

anyone have new tutorial bud
crukk11 is offline   Reply With Quote
Old 01/09/2018, 03:24 PM   #234
jojo5528
Little Clucker
 
Join Date: May 2018
Posts: 2
Reputation: 0
Default Re: [BETA] BUD - Blazing User DB

link down, anyone mirror pls?
jojo5528 is offline   Reply With Quote
Old 09/12/2019, 02:04 PM   #235
Hoangkhaihoang
Little Clucker
 
Join Date: Dec 2019
Posts: 2
Reputation: 0
Default Re: [BETA] BUD - Blazing User DB

link die
Hoangkhaihoang is offline   Reply With Quote
Old 09/12/2019, 02:34 PM   #236
Hoangkhaihoang
Little Clucker
 
Join Date: Dec 2019
Posts: 2
Reputation: 0
Default Re: [BETA] BUD - Blazing User DB

link nhu cc
Hoangkhaihoang is offline   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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad user name Programie Server Support 9 06/04/2011 03:36 PM
User Tracks Freddy Z Everything and Nothing 14 04/03/2010 08:13 PM
user mattyross55 Client Support 1 19/09/2009 09:52 PM
If user press key X... carlos- Help Archive 5 21/07/2009 11:27 PM


All times are GMT. The time now is 12:26 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.