```
lang=php, name=Code fragment
$application->Conn->Query('SELECT * FROM inp_SlaveOnly');
```
* in Database Manager:
# create new database as copy/paste from database used in In-Portal
# in copied database (not original one) create `inp_SlaveOnly` database table
# remember created database name
* in IDE:
# open `/tools/cron.php` file for editing
# after `$application->Init();` line add code shown above test plan
# save changes
# open `/tools/run_event.php` file for editing
# after `$application->Init();` line add code shown above test plan
# save changes
# change `/system/config.php` file to:
* enable support for load balancing (see example in http://community.in-portal.org/x/Npkk and you can use same server as both slave & master)
* for slave connection add `DBName` key (even though it's not listed in Confluence) with above copied database name
* basically what we need is `inp_SlaveOnly` table to be present on slave (copied) database only, but not on master database
# in `core/kernel/db/db_load_balancer.php` file change `\kDBLoadBalancer::reallyOpenConnection` method change `$this->servers[0]['DBName']` to `$server['DBName']` (allows to use different DB name for slave, that was added in `config.php` file)
* in CLI (command line)
# go to folder, where In-Portal is located
# execute `php tools/cron.php`
# confirm, that no SQL error happened
# execute `php tools/run_event.php adm:OnBuild b674006f3edb1d9cd4d838c150b0567d`
# confirm, that no SQL error happened