Salesforce

Database Troubleshooting (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Database Troubleshooting (Magic xpi 4.5)

Q1

What should I do if the date_format environment variable is not set correctly when I install Magic xpi on MS Server 2000 and 2003, with a German version of the MSSQL Server?

A1

You should set the date_format environment variable manually, in the magic.ini file, so that it matches your internal database date format.

Q2

Why can't I connect to the internal database with Windows authentication?

A2

After the installation, if you want Magic xpi to connect to the internal database with Windows authentication, you have to make changes in the datasource.xml file. This file is located at: <Magic xpi installation>\Runtime\config.

  1. Remove the username and password properties. For example, remove the following text: username="magicxpi4_1" password="MagicPass#3".

  2. Add ;integratedSecurity=true to the url property. For example, your file would look something like the text below. The username and password are removed and you would add the red text:

<datasources>

<datasource id="1" hibernate.default_schema="dbo"

hibernate.dialect="org.hibernate.dialect.SQLServerDialect"

hibernate.default_catalog = "magicxpi4_1"

driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"

url="jdbc:sqlserver://AVI-8-LP\SQLEXPRESS:1433;databaseName=magicxpi4_1;integratedSecurity=true"/>

</datasources>

Oracle databases

Q3

Why am I getting the "System Property oracle.net.tns_admin was empty" error?

A3

You might get this error when trying to change your internal database to an Oracle database.

To solve this issue, update the GigaSpaces/bin/magicxpi-setenv.bat > ADDITIONAL_OPTIONS property with the oracle.net.tns_admin jvm argument, which contains the path to the folder containing the TNSNAMES.ORA file. For example:

set ADDITIONAL_OPTIONS=%ADDITIONAL_OPTIONS% -Dcom.magicsoftware.ibolt.home=%MAGIC_XPI_HOME%\runtime -Doracle.net.tns_admin=$ORACLE_HOME/network/admin

Q4

Why does the ORA-01858 database error message occur in the Magic xpi Monitor?

A4

The ORA-01858 database error message means that a non-numeric character appears where a digit was expected.

This error is related to the format of the Date field, and occurs when an invalid date format is given.

To prevent this problem from arising, make sure that you enter the correct date format. The date_format field in the [MAGIC_LOGICAL_NAMES] section of the Magic.ini should be the same as the internal database's date format.

Q5

Why does the Select count (*) statement from the Oracle database return a picture as N22?

A5

The N22 picture, which is not valid in Magic xpi, is actually coming from Oracle. To prevent this from happening, you should add casting to the statement. This casts the value to something that Magic xpi can handle.

Nevertheless, the Checker alerts you to any invalid numeric pictures.

Q6

When I try to work with numeric values, I get the ORA-01722 error. How can I overcome this?

A6

The ORA-01722 error indicates that a number was sent to the database in the wrong format. Magic xpi can only work with a decimal separator which is set to dot (.). You should check the following:

  1. In your regional settings, verify that the decimal separator is set to dot (.) and the thousand separator is set to comma (,).

  2. Check the server settings by running the following command:
    select * from nls_database_parameters;
    The NLS_NUMERIC_CHARACTERS should be dot (.) comma (,). (The NLS_NUMERIC_CHARACTERS .,).

  3. Check your machine’s registry for the Oracle settings in software\Oracle for a 32-bit machine and in software\wow6432Node\Oracle for a 64-bit machine.
    The NLS_TERRITORY should be AMERICA. For example, AMERICAN_AMERICA.WE8MSWIN1252.

MySQL databases

Q7

When using the MySQL database, why am I getting an error about an incorrect time value?

A7

When using the Time function, you might see the following error if you are using MySQL 5.1.4 database:

- Error 9804: [MySQL][ODBC 5.1 Driver][mysqld-5.6.20]Incorrect time value: '14:39:23''14:39:2' for column 'time_1' at row 1

To solve this issue, install MySQL 5.3.4 or above.

Reference
Attachment 
Attachment