I export data in Oracle SQL Developer v17.2 using Tools > Database Export ... . This gives me .sql file with sql statements.
I then try to import it using SQLPlus v12.2. Oracle SQL Developer generates me insert statements where time is formatted like this: to_timestamp('06.10.2021 12:30:22,593000000','DD.MM.RRRR HH24:MI:SSXFF')
. These run fine when I run them using Oracle SQL Developer. But when I use SQLPlus I get error:
ORA-01830: date format picture ends before converting entire input string
Is there way to make export that works with SQLPlus?
I know there is DBA view in Oracle SQL Developer but it says I don't have DBA privileges therefore I am looking to work with options that I have.
CodePudding user response:
Your SQL Developer and SQL*Plus sessions are set up differently; probably different locales, but the relevant part here is the NLS_NUMERIC_CHARACTERS
setting in each environment, which is usually inherited form the territory.
Your to_date()
format model uses X
for the 'local radix character'. In SQL Developer that is a comma; in SQL*Plus it appears to be a period.
If you don't want to touch the statements, you can change your SQL*Plus session to match:
alter session set NLS_NUMERIC_CHARACTERS = ',.'
db<>fiddle showing the problem and fix.