[DB2] SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=<USERNAME>.USER_TABLES, DRIVER=3.59.81" when using "Database Conversion Utility"
Dev/DB 2012. 7. 19. 16:14Technote (troubleshooting)
Problem(Abstract)
Administrator creates a new DB2 database, which is going to be the Data Mart database. Administrator logs onto the Controller application server, and launches "Controller Configuration". Inside "Database Connections" administrator creates a connection to the new Data Mart target database. Administrator clicks green "Play" button to launch "Database Conversion Utility" (DbConv.exe). Administrator clicks "Connect". User receives error.
Symptom
** ERROR: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=FASTNET.USER_TABLES, DRIVER=3.59.81
Cause
There are several possible causes for this error:
- Scenario #1 - DB2 database server has not been configured to be Oracle-compatible.
- Scenario #2 - DB2 database server has "Enable operating system security for DB2 objects" enabled.
Environment
Controller Data Mart database hosted on DB2.
Diagnosing the problem
Scenario #1
Use the command DB2SET to check the DB2 server's settings.
For
example, if your DB2 database server is installed on Windows then:
- Click "Start - Programs - IBM DB2 - DB2COPY1 (Default) - Command Line Tools - Command Window"
- Type "db2set"
On a correctly-configured server, the settings should include the following:
- DB2_DEFERRED_PREPARE_SEMANTICS=YES
DB2_COMPATIBILITY_VECTOR=ORA
Resolving the problem
Scenario #1
Modify the DB2 database server to be Oracle compatible. Specifically, reconfigure it so that DB2_COMPATIBILITY_VECTOR=ORA.
- TIP: This setting may have adverse consequences for other (non-Controller) software, so please check before making the change.
- Obtain some downtime (nobody using ANY databases hosted on the DB2 server)
- Shutdown Controller application server
- Logon to DB2 database server as an administrator
- Click "Start - Programs - IBM DB2 - DB2COPY1 (Default) - Command Line Tools - Command Window"
- Type the following: db2set DB2_COMPATIBILITY_VECTOR=ORA
- If necessary, also type: db2set DB2_DEFERRED_PREPARE_SEMANTICS=YES
- Type: db2stop
- Type: db2start
- Restart Controller application server
- Test.
Steps:
Assuming your DB2 database server is hosted on Windows:
Scenario #2
Either:
- Uninstall DB2 server, and re-install DB2 server - during the installation wizard do NOT enable "Enable operating system security for DB2 objects"
- or simply add the group "Everyone" to the local
group "DB2USERS" on the DB2 server
- For more information see separate IBM Technote #1504470
'Dev > DB' 카테고리의 다른 글
[DB2] order by sum() (0) | 2012.07.20 |
---|---|
[DB2] fetch-first-clause (0) | 2012.07.20 |
[DB2] SQLCODE=-613, SQLSTATE=54008 (0) | 2012.07.20 |
[DB2] Export to relational database fails with SQL error: SQLCODE=-286, SQLSTATE=42727 (0) | 2012.07.19 |