Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RESOLVED [SQLDev on windows] do not execute with same encoding with @ execution

3318263Sep 22 2016 — edited Sep 23 2016

Hi,

I'm facing an issue when executing the same script twice, with 2 different methods:

1. Opening the script and execute it

2. Opening a parent script that executes the first script using @ command

Both scripts are encoded in Unix UTF8.

SQLDeveloper's encoding in Preferences is set to UTF8.

I tried overriding the NLS_LANG in Windows with value UTF8 with no succesful result.

Content of the 1st script

SET DEFINE OFF;

TRUNCATE TABLE T_TFISCA;

INSERT INTO T_TFISCA (TFI_IDENT,TFI_CODE,TFI_SEQ,TFI_LIBELLE,TFI_PRESENCE,TFI_REGLE1,TFI_REGLE2,TFI_SITUATION) VALUES(69, 'FCEMT', 69, 'France métropolitaine', 'OUI', 'OUI', 'OUI', null);

commit;

select * from T_TFISCA;

Result is OK

TFI_IDENT              TFI_CODE TFI_SEQ                TFI_LIBELLE                                                                                          TFI_PRESENCE TFI_REGLE1 TFI_REGLE2 TFI_SITUATION      

---------------------- -------- ---------------------- ---------------------------------------------------------------------------------------------------- ------------ ---------- ---------- --------------------

69                  FCEMT 69                 France métropolitaine                                                             OUI      OUI    OUI                       

Content of the 2nd script:

@"D:\Integration\Scripts\ExtractPROD\T_TFISCA.sql"

Result is KO

TFI_IDENT              TFI_CODE TFI_SEQ                TFI_LIBELLE                                                                                          TFI_PRESENCE TFI_REGLE1 TFI_REGLE2 TFI_SITUATION      

---------------------- -------- ---------------------- ---------------------------------------------------------------------------------------------------- ------------ ---------- ---------- --------------------

69                  FCEMT 69                  France métropolitaine                                                          OUI      OUI    OUI                       

I tried to execute these script with sqlplus, in 2 separate dos command, with no success for both (UTF8 fails like in SQLDeveloper):

SET NLS_LANGUAGE=FRENCH_FRANCE.WE8MSWIN1252

echo exit | C:\APPLICLI\ORACLE\product\11.2.0\client_1\BIN\sqlplus V9_DBA_MIG/V9_DBA_MIG@//UV5BD101:1525/SIARD @"D:\Integration\Scripts\ExtractPROD\T_TFISCA.sql"

SET NLS_LANGUAGE=FRENCH_FRANCE.AL32UTF8

echo exit | C:\APPLICLI\ORACLE\product\11.2.0\client_1\BIN\sqlplus V9_DBA_MIG/V9_DBA_MIG@//UV5BD101:1525/SIARD @"D:\Integration\Scripts\ExtractPROD\T_TFISCA.sql"

Can you confirm that executing a script with @ in SQLDevleoper calls the utility SQLPlus?

Any idea on what happened?

Thank you.

Best regards, Rudy

This post has been answered by Dermot ONeill-Oracle on Sep 22 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2016
Added on Sep 22 2016
4 comments
1,342 views