|
Size: 187
Comment:
|
Size: 1785
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
Steps to configure sql database and control * 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. * #fdb2log * use #dblogdump command to check contents of dblog.dat * Now to start dumping control data to sql database. use this command * #log2odbc --help * #log2odbc -d * 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) * 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 |
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.
Steps to configure sql database and control
- 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.
- #fdb2log
- use #dblogdump command to check contents of dblog.dat
- Now to start dumping control data to sql database. use this command
- #log2odbc --help
- #log2odbc -d
- 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)
- 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
