migrating old db - enforce_strict_size

classic Classic list List threaded Threaded
4 messages Options
bar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

migrating old db - enforce_strict_size

bar
Hello,

I have an old hsqldb (<1.8) that unfortunately was not created with enforce_strict_size=true.
Now we're migrating to version 2.3 and are running into "data exception: string data, right truncation". Some varchar and double fields have values larger than originally expected.

The migration process requires that the db be opened with 2.3, so the plan is to:
1. open the db with enforce_strict_size=false
2. run an sql script that makes the problematic fields larger.
3. future uses of the db will use the default enforce_strict_size (of course together with app-level data validation!)

The problem is with step 1. The following jdbc still gives the "data exception" error.
jdbc:hsqldb:/Users/me/Documents/mydb/dbname;sql.enforce_strict_size=false

Any suggestions on how to open this db?
Thanks,
Bar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: migrating old db - enforce_strict_size

Fred Toussi-2
I will check and add improvements to code to allow loading such
databases with version 2.3.1.

Fred

On Sat, Sep 14, 2013, at 13:37, bar wrote:

> Hello,
>
> I have an old hsqldb (<1.8) that unfortunately was not created with
> enforce_strict_size=true.
> Now we're migrating to version 2.3 and are running into "data exception:
> string data, right truncation". Some varchar and double fields have
> values
> larger than originally expected.
>
> The migration process requires that the db be opened with 2.3, so the
> plan
> is to:
> 1. open the db with enforce_strict_size=false
> 2. run an sql script that makes the problematic fields larger.
> 3. future uses of the db will use the default enforce_strict_size (of
> course
> together with app-level data validation!)
>
> The problem is with step 1. The following jdbc still gives the "data
> exception" error.
> jdbc:hsqldb:/Users/me/Documents/mydb/dbname;sql.enforce_strict_size=false
>
> Any suggestions on how to open this db?
> Thanks,
> Bar
>
>
>
> --
> View this message in context:
> http://hsqldb.10974.n7.nabble.com/migrating-old-db-enforce-strict-size-tp3951.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
> _______________________________________________
> Hsqldb-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
bar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: migrating old db - enforce_strict_size

bar
Thanks Fred - that would be great!

If it were only a single db on my local machine it would be easy to do a migration using other means. In my case however I'm creating an update for an app that has been distributed to computers I have no direct access to.
What you describe below would be much appreciated.

Best,
Bar
 


On 18 Sep, 2013, at 11:09 AM, Fred Toussi-2 [via HSQLDB] wrote:

I will check and add improvements to code to allow loading such
databases with version 2.3.1.

Fred

On Sat, Sep 14, 2013, at 13:37, bar wrote:

> Hello,
>
> I have an old hsqldb (<1.8) that unfortunately was not created with
> enforce_strict_size=true.
> Now we're migrating to version 2.3 and are running into "data exception:
> string data, right truncation". Some varchar and double fields have
> values
> larger than originally expected.
>
> The migration process requires that the db be opened with 2.3, so the
> plan
> is to:
> 1. open the db with enforce_strict_size=false
> 2. run an sql script that makes the problematic fields larger.
> 3. future uses of the db will use the default enforce_strict_size (of
> course
> together with app-level data validation!)
>
> The problem is with step 1. The following jdbc still gives the "data
> exception" error.
> jdbc:hsqldb:/Users/me/Documents/mydb/dbname;sql.enforce_strict_size=false
>
> Any suggestions on how to open this db?
> Thanks,
> Bar
>
>
>
> --
> View this message in context:
> http://hsqldb.10974.n7.nabble.com/migrating-old-db-enforce-strict-size-tp3951.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
> _______________________________________________
> Hsqldb-user mailing list
> <a href="x-msg://25/user/SendEmail.jtp?type=node&amp;node=3952&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Hsqldb-user mailing list
<a href="x-msg://25/user/SendEmail.jtp?type=node&amp;node=3952&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user



If you reply to this email, your message will be added to the discussion below:
http://hsqldb.10974.n7.nabble.com/migrating-old-db-enforce-strict-size-tp3951p3952.html
To unsubscribe from migrating old db - enforce_strict_size, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: migrating old db - enforce_strict_size

Fred Toussi-2
I have checked the code and tested with a sample database which I modified to see how this issue came up.
 
Version 2.3.0 does no checks on the length of VARCHAR values when the database is opened. Exceptions are raised only when you insert / update into those tables.
 
Please try to isolate this with a small test database and send it to me direct so I can check it.
 
Fred
 
On Wed, Sep 18, 2013, at 12:09, bar wrote:
Thanks Fred - that would be great!
 
If it were only a single db on my local machine it would be easy to do a migration using other means. In my case however I'm creating an update for an app that has been distributed to computers I have no direct access to.
What you describe below would be much appreciated.
 
Best,
Bar
 
 

On 18 Sep, 2013, at 11:09 AM, Fred Toussi-2 [via HSQLDB] wrote:

I will check and add improvements to code to allow loading such
databases with version 2.3.1.

Fred

On Sat, Sep 14, 2013, at 13:37, bar wrote:

> Hello,
>
> I have an old hsqldb (<1.8) that unfortunately was not created with
> enforce_strict_size=true.
> Now we're migrating to version 2.3 and are running into "data exception:
> string data, right truncation". Some varchar and double fields have
> values
> larger than originally expected.
>
> The migration process requires that the db be opened with 2.3, so the
> plan
> is to:
> 1. open the db with enforce_strict_size=false
> 2. run an sql script that makes the problematic fields larger.
> 3. future uses of the db will use the default enforce_strict_size (of
> course
> together with app-level data validation!)
>
> The problem is with step 1. The following jdbc still gives the "data
> exception" error.
> jdbc:hsqldb:/Users/me/Documents/mydb/dbname;sql.enforce_strict_size=false
>
> Any suggestions on how to open this db?
> Thanks,
> Bar
>
>
>
> --
> View this message in context:
> http://hsqldb.10974.n7.nabble.com/migrating-old-db-enforce-strict-size-tp3951.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
> _______________________________________________
> Hsqldb-user mailing list
> <a href="x-msg://25/user/SendEmail.jtp?type=node&amp;node=3952&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Hsqldb-user mailing list
<a href="x-msg://25/user/SendEmail.jtp?type=node&amp;node=3952&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user



If you reply to this email, your message will be added to the discussion below:
http://hsqldb.10974.n7.nabble.com/migrating-old-db-enforce-strict-size-tp3951p3952.html
To unsubscribe from migrating old db - enforce_strict_size, click here.
NAML


View this message in context: Re: migrating old db - enforce_strict_size
Sent from the HSQLDB - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
_______________________________________________
Hsqldb-user mailing list
 

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Loading...