Differences between revisions 5 and 7 (spanning 2 versions)
Revision 5 as of 2008-05-16 05:58:06
Size: 1785
Comment:
Revision 7 as of 2008-10-31 05:49:09
Size: 2004
Editor: DannyCheung
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This instruction will help you understand how CONTROL and SQL database works together. Also this instruction will be helpful to troubleshoot or implementing sql database for the client. SQL Mirroring
Line 3: Line 3:
Steps to configure sql database and control This instruction will help you understand how CONTROL and SQL database works together. Also this instruction will be helpful to troubleshoot or implementing SQL database for the client.
Line 5: Line 5:
 * Install SQL database. This could be either on same server that control reside or different.
 * Also download and install odbc driver for your database. This will put the file in /etc/odbc.ini which you will need to configure:
  * [control] - this is a connection name that you use for database
  * Driver: - this is driver that is used
  * Databasename: dabasename that you create
  * login:
  * password:
 * Create database now using following command
  * #createdb databasename
 * Create table command
  * #createtb --help ( to see option)
  * #createtb -d databasename
 * kill all control users
 * Set flag in cooad. i.e Enable update of odbc data file =y . Now this flag will start loging in dblog.dat.
 * If the sql database is not used from the begining of control, all files will not be logged in dblog.dat to update in sql database. So simple enabling flag will not logged old files of control to dblog.dat, only the new files will be logged. To update old and as well as old , use this command.
All control data files are store in .dat files and .idx is a header which works like index page for .dat file.

Steps to configure SQL database and control

 1. Install SQL database. This could be either on same server that Control resides on or a different server.
 1. Download and install odbc driver for your database.
 {{{
# yum install unixODBC}}}
 1. Configure /etc/odbc.ini which you will need to configure:
  * [control] -> This is a connection name that you use for database
  * Driver: -> This is driver that is used
  * Databasename: -> Name of database that you create
  * login: -> SQL login name
  * password: -> SQL password

 1. Create database now using following command
#createdb databasename

 1. Create table command
#createtb --help ( to see option) #createtb -d <databasename>

 1. Kill all Control users
 1. Set flag in cooad.
 {{{
Enable update of odbc data file = Y}}}
 Now this flag will start loging in dblog.dat.
 1. If the sql database is not used from the begining of control, all files will not be logged in dblog.dat to update in sql database. So simple enabling flag will not logged old files of control to dblog.dat, only the new files will be logged. To update old and as well as old , use this command.
Line 21: Line 33:
 * use #dblogdump command to check contents of dblog.dat
 * Now to start dumping control data to sql database. use this command
 1. use #dblogdump command to check contents of dblog.dat
 1. Now to start dumping control data to sql database. use this command
Line 25: Line 37:
 * To test to see if the data dumping is successful.  1. To test to see if the data dumping is successful.
Line 28: Line 40:
 * Now after everything is done, you have to put this in cronjob to do automatic update. See the example in braun server cronjob how incremental_dumb script is used in crontab  1. Now after everything is done, you have to put this in cronjob to do automatic update. See the example in braun server cronjob how incremental_dumb script is used in crontab

SQL Mirroring

This instruction will help you understand how CONTROL and SQL database works together. Also this instruction will be helpful to troubleshoot or implementing SQL database for the client.

All control data files are store in .dat files and .idx is a header which works like index page for .dat file.

Steps to configure SQL database and control

  1. Install SQL database. This could be either on same server that Control resides on or a different server.
  2. Download and install odbc driver for your database.
    # yum install unixODBC
  3. Configure /etc/odbc.ini which you will need to configure:
    • [control] -> This is a connection name that you use for database

    • Driver: -> This is driver that is used

    • Databasename: -> Name of database that you create

    • login: -> SQL login name

    • password: -> SQL password

  4. Create database now using following command

#createdb databasename

  1. Create table command

#createtb --help ( to see option) #createtb -d <databasename>

  1. Kill all Control users
  2. Set flag in cooad.
    Enable update of odbc data file = Y
    Now this flag will start loging in dblog.dat.
  3. If the sql database is not used from the begining of control, all files will not be logged in dblog.dat to update in sql database. So simple enabling flag will not logged old files of control to dblog.dat, only the new files will be logged. To update old and as well as old , use this command.
    • #fdb2log
  4. use #dblogdump command to check contents of dblog.dat
  5. Now to start dumping control data to sql database. use this command
    • #log2odbc --help
    • #log2odbc -d
  6. To test to see if the data dumping is successful.
    • #psql dannydb postgresql
    • #select * from stock; ( if you see data you are looking for then is working)
  7. Now after everything is done, you have to put this in cronjob to do automatic update. See the example in braun server cronjob how incremental_dumb script is used in crontab

SQL_Mirroring (last edited 2013-09-18 06:09:33 by localhost)