-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue - Handles cannot be shared between threads driver may need a clone method #20
Comments
Hi, Well I've not tested latest code over Windows operating system and was pretty sure that the new fork system won't works on it. Now I'm really sure, it won't works :-) Sorry for that, if you want to use Ora2Pg please use an Unix like system. Saying that, please consider that data export with Ora2Pg is not something that should be run on a desktop computer unless you have small gigabytes of data. Other types of export should still work because they don't use call to fork(). Regards, |
Hi, Thanks a lot for your quick reply ! $self->{dbh} -> is not using in sub multiprocess_progressbar. Sorry for troubling you...Don't take it serious if I type non-sense here I am a beginner , not a perl expert. |
This 2 lines are use to not disconnect from the Oracle database when the child is destroyed, as this child will be terminated at end of the export I think you can remove them safely, Ora2Pg could warn later but things were done. Don't know about your configuration and the command line but I think you don't see the progress bar because you are in debug mode, please set DEBUG to 0 in your configuration file. |
Hi, Will Any other old version works on windows 7 ? |
Yes, versions before 11.0 should works. |
Thanks a lot...10.1 worked.Nice.... |
Hi, |
You have to set the right values to NLS_LANG and CLIENT_ENCODING into ora2pg.conf. You can get these values by running the following command:
Please try it and send me the result of the above command if you still have the error. Note that the encoding should be set automatically by ora2pg but there was a bug that is only fixed in 11.0. |
Hi, This is the result : |
Ok, You have to set your ora2pg.conf as follow:
then execute the following:
You will have one file per table under the data/ directory. You can either try to load your data using table.sql global file and detect wich file is causing an encoding error. In each file with error replace the client_encoding value to UTF8 instead of WIN1252, let me know. Regards, |
Hi,
thanks |
Yes this is normal, a good practice is to load constraints, indexes, sequences and triggers at the end when all data are imported. If you can I really recommend you proceed like that, data import will be speediest. To do so activate FILE_PER_INDEX and FILE_PER_CONSTRAINT to separate them from the schema export. Here to solve the issue with out restarting from the begining you can try to enable DROP_FKEY in configuration file and run again "ora2pg -t COPY -c /path/to/ora2pg.conf -b data/ -o table.sql" after removing everything in the data/ directory. |
Hi, Almost data imported well, but at last, getting this error |
Hi, psql:data/KM_MAST_FF_table.sql:3941: ERROR: invalid byte sequence for encoding waiting for your reply, |
During schema export the table named "gid" was not imported, may be an error was encountered, please look at the shema output file to see how the relation is created. |
Hi, psql:data/KM_MAST_FF_table.sql:3941: ERROR: invalid byte sequence for encoding waiting for your reply, |
In this case you may try other encoding, like LATIN1 or if you just have one or two errors replace the bad encoding characters in your data. |
Hi , Ok.I will try that. thanks a lot |
Why do you need them uppercase ? PostgreSQL is case insensitive so you may not have problem with that unless all object's name are between quotes in your queries, is that the reason ? |
Hi, LATIN1 Worked for that table thanks... ALTER SEQUENCE GID RESTART WITH 12801; - this is not working , I think SEQUENCE GID is not created... Thanks |
You can force Ora2Pg to use the same case than in Oracle, but I'm not sure it will solve your problem as all objects names will need to be enclosed between double quote. You just have to enable the directive CASE_SENSITIVE in your ora2pg.conf. To export sequence, proceed as follow:
this will export all sequences from Oracle into file sequences.sql. The usual way is to only load sequences after all data being loaded, when exporting data you must set DISABLE_SEQUENCE to 1 to not add sequences restart order at end of data import file. |
Hi,
|
Hi,
I am a beginner.I am trying to migrate from my oracle to pg.But when I keep TYPE INSERT or TYPE COPY in the conf file , I am getting an error Handles cannot be shared between threads driver may need a clone method ,but if I keep TYPE TABLE , it is working fine.Please help me
The text was updated successfully, but these errors were encountered: