Error Sqlcode=-204 Sqlstate=42704 Sqlerrmc
Contents |
clicking "Upgrade" inside "Database Conversion Utility" dbconv Technote (troubleshooting) Problem(Abstract) User launches "Controller Configuration". User opens "Database Connections" and chooses connection. User clicks green db2 sql error sqlcode 204 sqlstate 42704 "play" button to open "Database Conversion Utility". User chooses UDL file, and sqlcode 204 sqlstate 42704 ibm-db2 clicks 'Connect'. User clicks "upgrade". After a while, an error message appears. Symptom Creating a Controller application database:
Is An Undefined Name.. Sqlcode=-204, Sqlstate=42704
...Running script: script/db2/TRG_XDB99.sql Running DB Step: 822 Running DB Step: 823 Running script batch: script/db2_823.batch Running script: script/db2/alter_CRDICBAL.sql Running script: script/db2/create_CRDICBALLANDDIFF.sql ** ERROR: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704,
Sql0204n Is An Undefined Name. Sqlstate=42704
SQLERRMC=CONTROLLER_TABLE, DRIVER=3.59.81 Creating a Controller Data Mart: ...Running DB Step: 42 Running script batch: script/db2_42.batch Running script: script/db2/dmtracurr_db2.tab ** ERROR: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=CONTROLLER_TABLE, DRIVER=3.59.81 Cause Required tablespace "CONTROLLER_TABLE" had not been created inside the Controller database. Environment Controller database hosted on DB2. Resolving the problem Ensure that all scripts have been correctly run for the sqlcode=-727, sqlstate=56098 Controller application repository database, to ensure that bufferpools/tablespaces etc. have been correctly created. For example, for most customer's needs, the following scripts should be run: CREATE BUFFERPOOL BP16K IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 16 K ; CREATE BUFFERPOOL BP32K IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 32 K ; CREATE REGULAR TABLESPACE CONTROLLER_TABLE PAGESIZE 16 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4 OVERHEAD 10.5 PREFETCHSIZE 16 TRANSFERRATE 0.14 BUFFERPOOL BP16K DROPPED TABLE RECOVERY ON; CREATE REGULAR TABLESPACE CONTROLLER_XDB PAGESIZE 16 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 16 OVERHEAD 10.5 PREFETCHSIZE 16 TRANSFERRATE 0.14 BUFFERPOOL BP16K DROPPED TABLE RECOVERY ON; CREATE REGULAR TABLESPACE CONTROLLER_INDEX PAGESIZE 16 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4 OVERHEAD 10.5 PREFETCHSIZE 16 TRANSFERRATE 0.14 BUFFERPOOL BP16K DROPPED TABLE RECOVERY ON; CREATE LARGE TABLESPACE CONTROLLER_LOBS PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4 OVERHEAD 10.5 PREFETCHSIZE 16 TRANSFERRATE 0.14 BUFFERPOOL BP32K ; CREATE USER TEMPORARY TABLESPACE CONTROLLER_TEMP PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 16 OVERHEAD 10.5 PREFETCHSIZE 16 TRANSFERRATE 0.14 BUFFERPOOL BP32K ; CREATE SYSTEM TEMPORARY TABLESPACE CONTROLLER_SYS PAGESIZE 32 K MANA
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us
Sqlcode=-204 Sqlstate=42704 In Mainframe
Learn more about Stack Overflow the company Business Learn more about hiring developers or sqlstate 42704 postgresql posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow sqlcode=-727, sqlstate=56098, sqlerrmc=2;-204;42704 Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why do I get SQLCODE=-204, SQLSTATE=42704 with DB2 http://www-01.ibm.com/support/docview.wss?uid=swg21503879 LUW and WebSphere App Server? up vote 3 down vote favorite There are numerous web pages where people show this message as a symptom (with the value after SQLERRMC and the driver level varying): DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=M51Dev.CUSTOMER, DRIVER=3.61.65 including several here on StackOverflow. The error codes mean that an object -- nearly always a table -- is not found, and the value of the SQLERRMC http://stackoverflow.com/questions/24144538/why-do-i-get-sqlcode-204-sqlstate-42704-with-db2-luw-and-websphere-app-server parameter contains the name of the object in question. In every other occurrence of this I can find, the solution was just that they needed to qualify the table name with the schema name. However, as you can see from the line above, that isn't the case here. The schema is M51Dev, and the table is CUSTOMER, and both of them exist. The environment is WebSphere Application Server (7.0.0.31 in this particular case, but I somehow doubt that's relevant) running on Windows Server 2003 R2, with DB2 9.7.300.3885 on an old XP machine. The datasource is defined in WAS and retrieved via JNDI. the application is written in Java, and our SQL is executed using JDBC via Spring's JdbcTemplates. The datasource definition in WAS includes a custom property called currentSchema, which is set to M51Dev. This is the relevant line of SQL (or one of them, as we get the same symptom for every table): SELECT rundateOverride FROM customer WHERE customerId=1 And here's an extract from the stack trace. I can provide more if it helps. bad SQL grammar [SELECT rundateOverride FROM customer WHERE customerId=1]; nested exception is com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=M51Dev.CUSTOMER, DRIVER=3.61.65 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:233) at org.springframework.jdbc.support.AbstractFallbackSQLExc
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://stackoverflow.com/questions/20919298/db2-sql-error-sqlcode-204-sqlstate-42704 the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow https://web.liferay.com/community/forums/-/message_boards/message/896814 Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each 204 sqlstate other. Join them; it only takes a minute: Sign up DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704 up vote 4 down vote favorite 1 I created local database in DB2 called "TestDB" then I created table called "TestTable". I found that the table is put under schema name is "yasmin". I am trying to connect to the DB2 database using sqlcode 204 sqlstate JDBC but I got this exception R SQLException information [1/4/14 11:32:59:289 EST] 0000004d SystemErr R Error msg: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.TESTTABLE, DRIVER=3.61.86 [1/4/14 11:32:59:290 EST] 0000004d SystemErr R SQLSTATE: 42704 [1/4/14 11:32:59:290 EST] 0000004d SystemErr R Error code: -204 [1/4/14 11:32:59:290 EST] 0000004d SystemErr R com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.TESTTABLE, DRIVER=3.61.86 I tried many solutions on the internet Like set schema but unfortunately doesn't work. This is the JDBC code I used String urlPrefix = "jdbc:db2:"; String url; String user; String password; String empNo; Connection con; Statement stmt; ResultSet rs; url = urlPrefix + "//127.0.0.1:50000/TestDB"; user = "db2admin"; password = "db2admin"; try { // Load the driver Class.forName("com.ibm.db2.jcc.DB2Driver"); System.out.println("**** Loaded the JDBC driver"); // Create the connection using the IBM Data Server Driver for JDBC and SQLJ con = DriverManager.getConnection (url, user, password); // Commit changes manually con.setAutoCommit(false); System.out.println("**** Created a JDBC connection to the data source"); stmt = con.createStatement(); con.createStatement(); System.out.println("**** Created JDBC Statement object"); // Execute a query and generate a ResultSet instance rs = stmt.executeQuery("se
English » 1. Installation / Deployment / Setup Recent Posts Statistics RSS (Opens New Window) Answer (Unmark) Mark as an Answer Threads [ Previous | Next ] HELP:DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 petar banicevic May 27, 2008 5:05 PM RE: HELP:DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 petar banicevic July 12, 2008 12:38 PM RE: HELP:DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 Namrata Hangal August 7, 2012 1:43 AM RE: HELP:DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 Boris Yurkevich October 31, 2012 3:22 AM RE: HELP:DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 Hitoshi Ozawa November 1, 2012 5:01 PM RE: HELP:DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 Henri Charles July 14, 2016 11:39 PM HELP:DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 May 27, 2008 5:05 PM Answer petar banicevic Rank: Junior Member Posts: 72 Join Date: May 27, 2008 Recent Posts QUESTION:What mean these warnings and can I ignore them?Can I fix them ???Thank youPS:I created database on db2 with UTF-8 codeset ==================================(e.g. CREATE DATABASE LPORTAL ON 'C:' USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM; )And when launching portal I get following messages:==================================Starting Liferay Enterprise Portal 5.0.1 (Luther / Build 5001 / April 14, 2008)22:12:56,484 INFO [DynamicDialect:80] Determining dialect for DB2/NT 822:12:56,500 INFO [DynamicDialect:106] Using dialect org.hibernate.dialect.DB2Dialect22:12:58,125 INFO [PortalImpl:184] Portal lib url /C:/Program Files/liferay-portal-tomcat-6.0-5.0.1/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/util/PortalImpl.class22:12:58,125 INFO [PortalImpl:209] Portal lib directory /C:/Program Files/liferay-portal-tomcat-6.0-5.0.1/webapps/ROOT/WEB-INF/lib/22:13:02,609 WARN [ReleaseLocalServiceImpl:83] DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: DB2ADMIN.RELEASE_22:13:02,609 INFO [ReleaseLocalServiceImpl:96] Create tables and populate with default data22:13:07,281 WARN [DBUtil:365] DB2 SQL error: SQLCODE: -614, SQLSTATE: 54008, SQLERRMC: IX_7020130F22:13:08,250 INFO [StartupAction:203] Running verification com.liferay.portal.verify.VerifyProcessSuite22:13:08,250 INFO [VerifyProcessSuite:37] Verifying22:13:08,250 INFO [VerifyProperties:40] Verifying22:13:08,250 INFO [VerifyLucene:39] Verifying22:13:08,250 INFO [VerifyCounter:44] Verifying22:13:08,265 INFO [VerifyOracle:52] Verifying22:13:08,281 INFO [VerifyBlogs:42] Verifying22:13:08,281 INFO [CustomSQLUtil:110] Database name DB2/NT22:13:08,281 INFO [CustomSQLUtil