RECOVERY table not created properly. Causes data truncation exception when
trying to log stored procedure execution.
--------------------------------------------------------------------------------------------------------------------
Key: SEQUOIA-1027
URL: https://forge.continuent.org/jira/browse/SEQUOIA-1027
Project: Sequoia
Type: Bug
Components: Recovery Log
Versions: Sequoia 2.9
Environment: Recovery running on: Windows Server - MS SQL 2000. Controller
running on Windows Server 2003 R2
Reporter: Tasso
The RECOVERY log table sql_param column is created to small by default.
The Exception:
ERROR sequoia.controller.recoverylog Failed to log {call ProcessTransaction(?,
?)}
java.sql.DataTruncation: Data truncation
at
net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:382)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at
net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at
net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at
net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505)
at
org.continuent.sequoia.controller.recoverylog.events.LogRequestEvent.execute(LogRequestEvent.java:102)
at
org.continuent.sequoia.controller.recoverylog.LoggerThread.run(LoggerThread.java:732)
2008-01-22 13:43:15,546 ERROR sequoia.controller.recoverylog Failed to log
{call ProcessTransaction(?, ?)}
java.sql.DataTruncation: Data truncation
at
net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:382)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at
net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at
net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at
net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505)
at
org.continuent.sequoia.controller.recoverylog.events.LogRequestEvent.execute(LogRequestEvent.java:102)
at
org.continuent.sequoia.controller.recoverylog.LoggerThread.run(LoggerThread.java:732)
2008-01-22 13:43:15,556 ERROR sequoia.controller.recoverylog WARNING! Your
recovery log is probably corrupted, you should perform a restore log operation
2008-01-22 13:43:15,556 ERROR sequoia.controller.recoverylog Logger thread was
unable to log LogRequestEvent: Log entry: log id2 (A) transactionId:0
requestId:3 vlogin:user status: E sql:{call ProcessTransaction(?, ?)}
params:<!%S|Hello from JAVA STLink|!%><!%V||!%><!%o|2,4|!%> because of
java.sql.DataTruncation: Data truncation
java.sql.DataTruncation: Data truncation
at
net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:382)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at
net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at
net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at
net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505)
at
org.continuent.sequoia.controller.recoverylog.events.LogRequestEvent.execute(LogRequestEvent.java:102)
at
org.continuent.sequoia.controller.recoverylog.LoggerThread.run(LoggerThread.java:732)
2008-01-22 13:43:15,566 ERROR sequoia.controller.recoverylog Recovery log was
unable to update request completion status: [EMAIL PROTECTED]
VDB config for the recovery log is taken from the MSSQL RAIDb1-mssql.xml
example.
<RecoveryLog
driver="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://exampledbserver03:1433/MSSQLExampleDBRecoveryDB"
login="example" password="example">
<RecoveryLogTable tableName="RECOVERY"
logIdColumnType="BIGINT NOT NULL"
vloginColumnType="VARCHAR(20) NOT NULL"
sqlColumnType="TEXT NOT NULL"
extraStatementDefinition=",PRIMARY KEY (log_id)"/>
<CheckpointTable tableName="CHECK_POINT"
checkpointNameColumnType="VARCHAR(127) NOT NULL"/>
<BackendTable tableName="BACKEND"
databaseNameColumnType="VARCHAR(50) NOT NULL"
backendNameColumnType="VARCHAR(50) NOT NULL"
checkpointNameColumnType="VARCHAR(127) NOT NULL"/>
<DumpTable tableName="SEQUOIA_DUMP"
dumpNameColumnType="TEXT NOT NULL"
dumpDateColumnType="DATETIME"
dumpPathColumnType="TEXT NOT NULL"
dumpFormatColumnType="TEXT NOT NULL"
checkpointNameColumnType="TEXT NOT NULL"
backendNameColumnType="TEXT NOT NULL"
tablesColumnType="TEXT NOT NULL"/>
</RecoveryLog>
The RECOVERY table is created as follows in the database.
CREATE TABLE [dbo].[RECOVERY] (
[log_id] [bigint] NOT NULL ,
[vlogin] [varchar] (20) NOT NULL ,
[sql] [text] NOT NULL ,
[sql_param] [varchar] (1) NULL , <-------------------------- This is to
small. I figure a decent size needs to be decided. Or it should be configurable?
[auto_conn_tran] [char] (1) NOT NULL ,
[transaction_id] [bigint] NOT NULL ,
[request_id] [bigint] NULL ,
[exec_status] [char] (1) NOT NULL ,
[exec_time] [bigint] NULL ,
[update_count] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia