Hi Ishara,

Any reason for having / as the statement terminator in DB2 script? The
default DB2 statement terminator is ;

API Manager had the same issue and we fixed it.

[1] :
https://www.ibm.com/support/knowledgecenter/SS62YD_2.2.1/com.ibm.datatools.sqlxeditor.doc/topics/tchngstmtterm.html
[2] :
https://dba.stackexchange.com/questions/122652/what-is-the-formal-statement-terminator-with-db2-sql


On Sat, May 6, 2017 at 11:16 AM, Ishara Karunarathna <isha...@wso2.com>
wrote:

> Thanks Rajith for finding out this.
>
> @Dinali Can you please update the scripts.
>
> -Ishara
>
> On Fri, May 5, 2017 at 11:52 PM, Rajith Roshan <raji...@wso2.com> wrote:
>
>> The migration resources for db2 specified in step 11 of doc [1] is giving
>> errors. It tries to insert boolean values to columns which have type
>> smallint. They should be replaced with 0s and 1s. Please find the modified
>> script below [2]
>>
>> [1] - https://docs.wso2.com/display/IS520/Upgrading+from+a+
>> Previous+Release
>>
>> [2] -
>> INSERT INTO UM_CLAIM (
>>             UM_DIALECT_ID,
>>             UM_CLAIM_URI,
>>             UM_DISPLAY_TAG,
>>             UM_DESCRIPTION,
>>             UM_MAPPED_ATTRIBUTE,
>>             UM_TENANT_ID,
>>             UM_READ_ONLY,
>>    UM_SUPPORTED,
>>    UM_REQUIRED,
>>    UM_DISPLAY_ORDER,
>>    UM_CHECKED_ATTRIBUTE)
>> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
>> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
>> 'http://wso2.org/claims/identity/lastLoginTime','Last Login Time','Last
>> Login Time','carLicense',-1234,1,0,0,7,0)/
>>
>>
>> INSERT INTO UM_CLAIM (
>>            UM_DIALECT_ID,
>>            UM_CLAIM_URI,
>>            UM_DISPLAY_TAG,
>>            UM_DESCRIPTION,
>>            UM_MAPPED_ATTRIBUTE,
>>            UM_TENANT_ID,
>>            UM_READ_ONLY)
>>
>> SELECT DIALECT.UM_ID,
>>   'http://wso2.org/claims/identity/lastLoginTime',
>>            'Last Login Time',
>>            'Last Login Time',
>>            'carLicense',
>>   DIALECT.UM_TENANT_ID,
>>            1
>>            FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
>> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
>> /wso2.org/claims'/
>>
>>
>> INSERT INTO UM_CLAIM (
>>             UM_DIALECT_ID,
>>             UM_CLAIM_URI,
>>             UM_DISPLAY_TAG,
>>             UM_DESCRIPTION,
>>             UM_MAPPED_ATTRIBUTE,
>>             UM_TENANT_ID,
>>             UM_READ_ONLY,
>>    UM_SUPPORTED,
>>    UM_REQUIRED,
>>    UM_DISPLAY_ORDER,
>>    UM_CHECKED_ATTRIBUTE)
>> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
>> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
>> 'http://wso2.org/claims/identity/lastPasswordUpdateTime','Last Password
>> Update','Last Password Update','businessCategory',-1234,1,0,0,7,0)/
>>
>>
>> INSERT INTO UM_CLAIM (
>>            UM_DIALECT_ID,
>>            UM_CLAIM_URI,
>>            UM_DISPLAY_TAG,
>>            UM_DESCRIPTION,
>>            UM_MAPPED_ATTRIBUTE,
>>            UM_TENANT_ID,
>>            UM_READ_ONLY)
>>
>> SELECT DIALECT.UM_ID,
>> 'http://wso2.org/claims/identity/lastPasswordUpdateTime',
>>         'Last Password Update',
>>         'Last Password Update',
>>         'businessCategory',
>>         DIALECT.UM_TENANT_ID,
>>         1
>>         FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
>> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
>> /wso2.org/claims'/
>>
>>
>> CREATE INDEX REG_LOG_IND_BY_P1
>>     ON REG_LOG(REG_LOGGED_TIME, REG_TENANT_ID)/
>>
>> CREATE INDEX REG_RESOURCE_IND_3
>>     ON REG_RESOURCE(REG_UUID)/
>>
>> CREATE INDEX REG_RESOURCE_IND_4
>>     ON REG_RESOURCE(REG_TENANT_ID, REG_UUID)/
>>
>> CREATE INDEX REG_RESOURCE_IND_5
>>     ON REG_RESOURCE(REG_TENANT_ID, REG_MEDIA_TYPE)/
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>
>
>
> --
> Ishara Karunarathna
> Associate Technical Lead
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> email: isha...@wso2.com,   blog: isharaaruna.blogspot.com,   mobile:
> +94717996791 <+94%2071%20799%206791>
>
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Email : abima...@wso2.com
Mobile : +94 773922820

<http://stackoverflow.com/users/515034>
<http://lk.linkedin.com/in/abimaran>  <http://www.lkabimaran.blogspot.com/>
<https://github.com/abimarank>  <https://twitter.com/abimaran>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to