on 2017 Mar 21 4:43 PM
Hello,
I have been working to set up a SQL Anywhere v17 High Availability mirrored server system. In particular I'd like server logs and have a couple of questions:
1) I am using the -o option to create server message logs. We can cause some confusion if the log files are all just placed in a ./Logs directory. Are there any "best practices" for how to "segregate" log files here:
A) ./Logs/Primary, ./Logs/Mirror and ./Logs/Arbiter
B) Place a ./Logs directory in the each of the three (Primary, Mirror and Arbiter) database directories
2) Is there any recommended size for the -os option in the dbsrv17 launch command to limit the size of the log file before a new log file is created?
Thank you.
Request clarification before answering.
(1) There is no "best practices" other than "avoid confusion" which you already understand.
IMO the -o files should be named [whatever].txt because they are text files, not database.log files.
IMO the -o files should go in the same folders as the *.db files.
IMO the creation of extra folders increases confusion. For example, if the *.db, *.log and *.txt files are all going to be placed on the same drive, put them in the same folder. Of course, if the *.db and *.log files are being placed on different drives for performance, they must go in different folders.
(2) Choose a -os value depending on the program used to browse the files. For example, if memory serves, Wordpad has problems with files larger than 10M.
(3) Congratulations on using -o and -os! ...they are very important in a production environment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FWIW, I always keep the console log files in a separate directory, mainly for three reasons:
the DB engine may run several databases, and the log belongs to the engine, not to a particular database.
In test environments, the log may be used further on, while the DB files may be exchanged by a new set of those.
I like to keep the DB dir free from different files.
Just my 2 cents, anyway...
For a HA system, I would think each partner/arbiter should use a local console log folder. When using a "shared" folder (i.e. one not local to the engine's machine), you would have the problem that a missing connection may both lead to a failover and one of the servers would not be able to access it's log file so he cannot tell what has happened...
I'm a contrarian... is it a "best practice" or is it an "old habit"?
The practice of creating different folders for different file types often causes great confusion among maintenance staff. In some cases, there are legitimate technical reasons for keeping certain types of files segregated in separate folders (multiple transaction logs for a single replicating database, database and transaction logs stored on separate drives for performance, etc).
In the absence of real technical reasons, avoid unnecessary folder proliferation... 1 folder is simpler than 2, or 10.
I guess "my personal best practice" to prefer only database files in the database file directory has its root in the usage of SQL Remote/MobiLink, because - AFAIK - their offline transaction file dir should only contain log files (besides the .db files). As I'm commonly using the real database file directory for the offline logs, too, I keep that "clean". (And BTW, I also follow Breck's advice to prevent unneccessary folders...).
But as Breck has clearly stated, there are several different and reasonable approaches here, so there's no one single "best practice", methinks.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.