Warning |
---|
It's potentially dangerous to execute Executing custom SQL statements on the database and can lead to result in data loss or corruption. Run this procedure only when requested to do so by X-Formation Support. |
Info |
---|
We To avoid data loss or corruption, we recommend that you make a backup of always back up your database before before performing any operations in order to avoid data loss or corruption. |
Initial statements
on the database. |
About running a custom SQL script
In rare cases, X-Formation Support
...
may ask you to run a custom SQL script to fix
...
problems
...
with the database.
- All example commands shown below are using You can run a custom SQL script on either an embedded database or an external database, as described below. All commands shown in the examples below use the default installation path. Adjust the commands to reflect your environment if as necessary.
- More For more details about using the mysql_* scripts scripts delivered with License Statistics are available on the , see Backing up and restoring an embedded database page.
Running a custom SQL script on
...
an embedded database
If you are using an embedded MySQL database, you can run a custom SQL script by using the following the procedure:
- Create a backup of your database.
- Stop License Statistics.
- Open a terminal/console in administration mode.
- Go to the mysql in the License Statistics installation directory.
For Windows:
Code Block language bash cd C:\Program Files\X-Formation\License Statistics\mysql
For Linux:
Code Block language bash cd /optusr/x-formationxflicstat/licstat/mysql
- Start an embedded MySQL database using the mysql_start script.
For Windows:
Code Block language bash mysql_start.bat
For Linux:
Code Block language bash sh mysql_start.sh
- Execute the SQL script delivered to you by X-Formation Support.
For Windows:
Code Block language bash mysql.exe -hlocalhost -uroot xformation_licstat < [download_file_directory]\script.sql
For Linux:
Code Block language bash mysql -hlocalhost -uroot xformation_licstat < [download_file_directory]/script.sql
- Stop the embedded MySQL database using the mysql_stop script.
For Windows:
Code Block language bash mysql_stop.bat
For Linux:
Code Block language bash sh mysql_stop.sh
- Start License Statistics.
Running a custom SQL script on
...
an external database
If you are using an external database (recommended), you need to perform the same steps as described above for an embedded database (except steps 5 . and 7.), but with paths and credentials adjusted to for your environment.