[ 
https://issues.apache.org/jira/browse/OOZIE-1645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13882766#comment-13882766
 ] 

Ostap commented on OOZIE-1645:
------------------------------

Yes, i agree with first. I will change name to UPDATE_DELIMITER_VER_TWO.

About second: UPDATE_DELIMITER_VER_TWO was :
{quote}
UPDATE COORD_ACTIONS SET MISSING_DEPENDENCIES = 
REPLACE(MISSING_DEPENDENCIES,';','!!')
{quote}
where MISSING_DEPENDENCIES is TEXT column.
The problem was that REPLACE function in MSSQL works just with VARCHAR. So in 
new query we first convert it to VARCHAR(MAX) and then use replace function. 
Converting even to VARCHAR(1024) can cut some text from MISSING_DEPENDENCIES.

> Oozie upgrade DB command fails due to missing dependencies for mssql
> --------------------------------------------------------------------
>
>                 Key: OOZIE-1645
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1645
>             Project: Oozie
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: Ostap
>            Assignee: Ostap
>         Attachments: Fix_OozieDBCLI_for_mssql.patch, 
> Fix_OozieDBCLI_for_mssql_2.patch
>
>
> upgrade DB command fails with following stacktrace
> D:\hdp\oozie-4.0.0.2.0.6.0-1432\oozie-win-distro\bin>ooziedb.cmd upgrade -run
> {quote}
> Validate DB Connection
> DONE
> Check DB schema exists
> DONE
> Verify there are not active Workflow Jobs
> DONE
> Check OOZIE_SYS table does not exist
> DONE
> Upgrade SQL schema
> DONE
> Create OOZIE_SYS table
> DONE
> Post-upgrade COORD_JOBS new columns default values
> DONE
> Post-upgrade COORD_JOBS & COORD_ACTIONS status values
> DONE
> Post-upgrade MISSING_DEPENDENCIES column
> Error: Argument data type text is invalid for argument 1 of replace function.
> Stack trace for the error was (for debug purposes):
> --------------------------------------
> com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type text is 
> inva
> lid for argument 1 of replace function.
>         at 
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
> (SQLServerException.java:197)
>         at 
> com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServ
> erStatement.java:1493)
>         at 
> com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQ
> LServerStatement.java:775)
>         at 
> com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute
> (SQLServerStatement.java:676)
>         at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4615)
>         at 
> com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
> rverConnection.java:1400)
>         at 
> com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLSer
> verStatement.java:179)
>         at 
> com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLS
> erverStatement.java:154)
>         at 
> com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServ
> erStatement.java:633)
>         at 
> org.apache.oozie.tools.OozieDBCLI.postUpgradeTasks(OozieDBCLI.java:36
> 1)
>         at 
> org.apache.oozie.tools.OozieDBCLI.upgradeDBTo40(OozieDBCLI.java:220)
>         at org.apache.oozie.tools.OozieDBCLI.upgradeDB(OozieDBCLI.java:192)
>         at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:119)
>         at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:67)
> {quote}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to