com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=AK51602;CREATE TABLE;DSNDB04, DRIVER=4.19.26

  1. 0

    Spring batch -BatchDatabaseInitializer : Invocation of init method failed

    Stack Overflow | 3 months ago | Abdul Gaffar Khan
    com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=AK51602;CREATE TABLE;DSNDB04, DRIVER=4.19.26
  2. 0

    could not get next sequence value in DB2 10.5 when testing DAO class with JUnit

    Stack Overflow | 2 years ago | reddy1234
    com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=user;USAGE;SEQUENCE_ID, DRIVER=3.66.46
  3. 0

    When using liquibase against DB2 on z/OS, it only seems to work if the schema name is the same as user name, but since you can have many schemas under one database, and can have different users access the schemas, liquibase does not seem to use the username and always defaults to using the schema name as the user name. I see in the generated SQL things like "...**CREATE TABLE FOR USER CFANNA*..." Example: database is *DFI6* schema name is *CFANNA* username is *FIA1Q15* commandLine liquibase is: C:\liquibase3.3.2>liquibase --changeLogFile=test.changelog.xml --logLevel=debug --url="jdbc:db2://somehost:40600/DFI6" --username=FIA1Q15 --password=somepassword --defaultSchemaName=CFANNA migrate DEBUG 2/3/15 7:55 PM: liquibase: Connected to FIA1Q15@jdbc:db2://somehost:40600/DFI6 DEBUG 2/3/15 7:55 PM: liquibase: Setting auto commit to false from true DEBUG 2/3/15 7:55 PM: liquibase: Computed checksum for 1423022144363 as 92d309ed1af61a268a93e2b0343bcbe6 DEBUG 2/3/15 7:55 PM: liquibase: Create Database Lock Table DEBUG 2/3/15 7:55 PM: liquibase: Executing EXECUTE database command: CREATE TABLE CFANNA.DATABASECHANGELOGLOCK (ID INTEGER NOT N ULL, LOCKED SMALLINT NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DBCHGLOGLOCK PRIMARY KEY (ID)) Unexpected error running Liquibase: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQL ERRMC=FIA1Q15;*CREATE TABLE FOR USER CFANNA*;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 SEVERE 2/3/15 7:55 PM: liquibase: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLER RMC=FIA1Q15;CREATE TABLE FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 liquibase.exception.LockException: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Er ror: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=FIA1Q15;CREATE TABLE FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:215) at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:154) at liquibase.Liquibase.update(Liquibase.java:186) at liquibase.integration.commandline.Main.doMigration(Main.java:1044) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) Caused by: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLST ATE=42501, SQLERRMC=FIA1Q15;CREATE TABLE FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:112) at liquibase.lockservice.StandardLockService.init(StandardLockService.java:87) at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:188) ... 5 more Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=FIA1Q15;CREATE TABL E FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 at com.ibm.db2.jcc.am.ed.a(ed.java:676) at com.ibm.db2.jcc.am.ed.a(ed.java:60) at com.ibm.db2.jcc.am.ed.a(ed.java:127) at com.ibm.db2.jcc.am.gn.c(gn.java:2554) at com.ibm.db2.jcc.am.gn.d(gn.java:2542) at com.ibm.db2.jcc.am.gn.b(gn.java:1974) at com.ibm.db2.jcc.t4.cb.h(cb.java:224) at com.ibm.db2.jcc.t4.cb.b(cb.java:47) at com.ibm.db2.jcc.t4.q.b(q.java:38) at com.ibm.db2.jcc.t4.rb.h(rb.java:114) at com.ibm.db2.jcc.am.gn.fb(gn.java:1969) at com.ibm.db2.jcc.am.gn.a(gn.java:3065) at com.ibm.db2.jcc.am.gn.e(gn.java:1029) at com.ibm.db2.jcc.am.gn.execute(gn.java:1013) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314) ... 10 more

    JIRA | 2 years ago | Anna Nicotera
    liquibase.exception.LockException: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Er ror: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=FIA1Q15;CREATE TABLE FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When using liquibase against DB2 on z/OS, it only seems to work if the schema name is the same as user name, but since you can have many schemas under one database, and can have different users access the schemas, liquibase does not seem to use the username and always defaults to using the schema name as the user name. I see in the generated SQL things like "...**CREATE TABLE FOR USER CFANNA*..." Example: database is *DFI6* schema name is *CFANNA* username is *FIA1Q15* commandLine liquibase is: C:\liquibase3.3.2>liquibase --changeLogFile=test.changelog.xml --logLevel=debug --url="jdbc:db2://somehost:40600/DFI6" --username=FIA1Q15 --password=somepassword --defaultSchemaName=CFANNA migrate DEBUG 2/3/15 7:55 PM: liquibase: Connected to FIA1Q15@jdbc:db2://somehost:40600/DFI6 DEBUG 2/3/15 7:55 PM: liquibase: Setting auto commit to false from true DEBUG 2/3/15 7:55 PM: liquibase: Computed checksum for 1423022144363 as 92d309ed1af61a268a93e2b0343bcbe6 DEBUG 2/3/15 7:55 PM: liquibase: Create Database Lock Table DEBUG 2/3/15 7:55 PM: liquibase: Executing EXECUTE database command: CREATE TABLE CFANNA.DATABASECHANGELOGLOCK (ID INTEGER NOT N ULL, LOCKED SMALLINT NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DBCHGLOGLOCK PRIMARY KEY (ID)) Unexpected error running Liquibase: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQL ERRMC=FIA1Q15;*CREATE TABLE FOR USER CFANNA*;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 SEVERE 2/3/15 7:55 PM: liquibase: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLER RMC=FIA1Q15;CREATE TABLE FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 liquibase.exception.LockException: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Er ror: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=FIA1Q15;CREATE TABLE FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:215) at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:154) at liquibase.Liquibase.update(Liquibase.java:186) at liquibase.integration.commandline.Main.doMigration(Main.java:1044) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) Caused by: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLST ATE=42501, SQLERRMC=FIA1Q15;CREATE TABLE FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:112) at liquibase.lockservice.StandardLockService.init(StandardLockService.java:87) at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:188) ... 5 more Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=FIA1Q15;CREATE TABL E FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75 at com.ibm.db2.jcc.am.ed.a(ed.java:676) at com.ibm.db2.jcc.am.ed.a(ed.java:60) at com.ibm.db2.jcc.am.ed.a(ed.java:127) at com.ibm.db2.jcc.am.gn.c(gn.java:2554) at com.ibm.db2.jcc.am.gn.d(gn.java:2542) at com.ibm.db2.jcc.am.gn.b(gn.java:1974) at com.ibm.db2.jcc.t4.cb.h(cb.java:224) at com.ibm.db2.jcc.t4.cb.b(cb.java:47) at com.ibm.db2.jcc.t4.q.b(q.java:38) at com.ibm.db2.jcc.t4.rb.h(rb.java:114) at com.ibm.db2.jcc.am.gn.fb(gn.java:1969) at com.ibm.db2.jcc.am.gn.a(gn.java:3065) at com.ibm.db2.jcc.am.gn.e(gn.java:1029) at com.ibm.db2.jcc.am.gn.execute(gn.java:1013) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314) ... 10 more

    JIRA | 2 years ago | Anna Nicotera
    liquibase.exception.LockException: liquibase.exception.DatabaseException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Er ror: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=FIA1Q15;CREATE TABLE FOR USER CFANNA;CFANNA.DATABASECHANGELOGLOCK, DRIVER=3.61.75
  6. 0

    Sqoop import DB2 to DSE Cassandra - Stack Overflow

    dluat.com | 1 year ago
    com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=, DRIVER=3.66.46

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.ibm.db2.jcc.am.SqlSyntaxErrorException

      DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=AK51602;CREATE TABLE;DSNDB04, DRIVER=4.19.26

      at com.ibm.db2.jcc.am.kd.a()
    2. IBM DB2
      kd.a
      1. com.ibm.db2.jcc.am.kd.a(Unknown Source)
      2. com.ibm.db2.jcc.am.kd.a(Unknown Source)
      2 frames