Using ü ö ä caracters in SQLPLUS

I did create a DATABASE with WE8ISO8859P15 so the German character are supported and there are correctly saved in the database but ....
1/ in SQLPLUS, when I do a "select table_name from all_tables" the table ACTIVITÄT for example in to see as ACTIVIT[]T (with [] a small square)
2/ in SQLPLUS, when i do a "select * from ACTIVITÄT" come the error :
ORA-00911: invalid character
note: I did set in my UNIX shell NLS_LANG=americna_america.WE8ISO8859P15

Hi Yves,
Hope you're not running through the same issue like me. :(
Try to use an other application (e.g: iSQL*PLUS,instead of SQL*PLUS).
lam

Similar Messages

  • How to use bash within sqlplus?

    How to use bash within sqlplus?
    meaning I am doing something like this to look for files within a particular directory with some condition.
    N=0
    for i in $(find . -path \*/waiting/* -type f -not -name "SS*" -mmin +120 -print) ; do
    testarray[$N]="$i"
    echo "$i"
    let "N= $N + 1"
    done
    Output from above script is as follows:
    /d1/d2/d3/d4/waiting/abcd.txt
    /d1/d2/d31/d42/waiting/pqrs.txt
    /d1/d2/d32/d43/waiting/xyz.txt
    And now I want to input this data into database with help of insert.
    and here is the little pl/sql block to insert the data with looping thing.
    sqlplus $CONNECT <<-EOF
    DECLARE
    Counter integer :=1;
    BEGIN
    WHILE Counter <= ${no_of_files} LOOP
    INSERT INTO stuck_files(COL_DATE,SER_NAME,TYPE_FILE,FILENAME,FILE_STATUS) VALUES (sysdate,'pqrs','pqrs','pqrs','pqrs');
    Counter := Counter + 1;
    END LOOP;
    END;
    commit;
    exit;
    EOF
    Mapping is as follows:
    COL_DATE,SER_NAME,TYPE_FILE,FILEFILENAME,FILE_STATUS
    sysdate,d3,d4,abcd.txt,waiting
    sysdate,d31,d42,pqrs.txt,waiting
    sysdate,d32,d3,xyz.txt,waiting
    any idea how to do that?
    Edited by: user9274197 on Apr 28, 2013 5:09 PM

    user9274197 wrote:
    How to use bash within sqlplus?
    meaning I am doing something like this to look for files within a particular directory with some condition.
    N=0
    for i in $(find . -path \*/waiting/* -type f -not -name "SS*" -mmin +120 -print) ; do
    testarray[$N]="$i"
    echo "$i"
    let "N= $N + 1"
    done
    Output from above script is as follows:
    /d1/d2/d3/d4/waiting/abcd.txt
    /d1/d2/d31/d42/waiting/pqrs.txt
    /d1/d2/d32/d43/waiting/xyz.txt
    And now I want to input this data into database with help of insert.
    and here is the little pl/sql block to insert the data with looping thing.
    sqlplus $CONNECT <<-EOF
    DECLARE
    Counter integer :=1;
    BEGIN
    WHILE Counter <= ${no_of_files} LOOP
    INSERT INTO stuck_files(COL_DATE,SER_NAME,TYPE_FILE,FILENAME,FILE_STATUS) VALUES (sysdate,'pqrs','pqrs','pqrs','pqrs');
    Counter := Counter + 1;
    END LOOP;
    END;
    commit;
    exit;
    EOF
    Mapping is as follows:
    COL_DATE,SER_NAME,TYPE_FILE,FILEFILENAME,FILE_STATUS
    sysdate,d3,d4,abcd.txt,waiting
    sysdate,d31,d42,pqrs.txt,waiting
    sysdate,d32,d3,xyz.txt,waiting
    any idea how to do that?
    Edited by: user9274197 on Apr 28, 2013 5:09 PMhttp://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:439619916584
    Cheers,

  • How to use Operating System Commands while using define in sqlplus

    How to use Operating System Commands while using define in sqlplus . The Host OS is Linux
    define report_name=PROD_${host date "+%b"}.html
    The above is not working.
    The output should be 
    define report_name=PROD_JAN.html
    Regards,
    DB

    of course I was talking nonsense: the problem here is the mixing of bind variables and DEFINE variables.
    With the following changes the script should work (the conditions for begin_interval_time are perhaps not what you want):
    variable snap1 number
    variable snap2 number
    variable rptname varchar2(20)
    begin
    SELECT min(snap_id) into :snap1 FROM dba_hist_snapshot WHERE CAST(begin_interval_time AS DATE) >= SYSDATE-1;
    SELECT max(snap_id) into :snap2 FROM dba_hist_snapshot WHERE CAST(begin_interval_time AS DATE) >= SYSDATE-1;
    end;
    col file_name_value new_value report_name noprint
    select 'PROD_'|| to_char(sysdate,'MON') || '_' ||  to_char(sysdate,'DD') file_name_value  from dual;
    define  report_type  = 'html'
    define num_days=2
    define begin_snap=:snap1
    define end_snap=:snap2
    @@?/rdbms/admin/awrrpt.sql

  • Unable to connect to Oracle using OS authentication (sqlplus / as sysdba)

    Hello,
    When I try to connect locally ,using OS authentication ( sqlplus / as sysdba ), on a Oracle database, I get "ORA-01031: insufficient privileges" error.
    OS: Windows XP
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod.
    connecting as sysdba using sys/pasword works.
    I have setup :
    -> Log on as a batch job
    -> Log on as a service
    I am also member of ORA_DBA group.
    I mention that connecting "/ as sysdba" worked many months after I've installed the Oracle database. But at some moment in time connecting "/ as sysdba" was no longer possible.
    C:\>sqlplus / as sysdba
    SQL*Plus: Release 10.1.0.3.0 - Production on Wed May 23 11:08:52 2007
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-01031: insufficient privileges.
    Thank you for any suggestion.

    Hi,
    I have the same issues from the beginning..
    I have two Oracle homes ( One for earlier installed SOA10g, and another for current installing SOA11g).
    I have the right sqlora.net file. I have removed the old path and reset to point the new oracle home. I have this home entry as the first entry in my Universal installer too.
    I AM ABLE TO CONNECT WITH sys USER AS SYSDBA on THE SAME SYSTEM ( I MEAN WHERE i INSTALLED THE DATABASE) USING THE command prompt.
    But I am not able to connect as the SYSDBA with sys ACCOUNT through the SQLDeveloper tool. or RCU tool? Any help please. Again I am able to connect as a normal user through the SQL developer using the SYSTEM account.
    -- Khaleel

  • Why I have to use -s after sqlplus in a shell script?

    Hi,
    sqlplus -s "/as sysdba" is in my script. But why I have to use -s?

    Hi
    Run sqlplus /? from your command line and you see that option means silent mode, i.e. suppression of SQL*Plus banner, echo's and prompts.
    Bye Auke
    Message was edited by:
    aukequist

  • How to view one table used percentage in sqlplus?

    if the table only one record in dba_free_space,then use
    'select round(block_id/blocks,4)*100
    from dba_free_space
    where tablespace_name='xxx'"
    could list used percentage,
    but one table have many records in dba_free_space,
    how to display this table's used percentage?

    DBA_FREE_SPACE displays free extents in all tablespaces: there is no direct relationship with any given table.
    If you want to get free space in a existing table you should use DBMS_SPACE package. Here a a old but nice demo on AskTom.

  • How to connect to database using sqlplusW (windows based  sqlPlus)

    Hi
    Thank you for reading my post
    I did some search and i find that i should use some kind of SYSTEM/SYSTEM@ORCLE
    to connect to database using windows based sqlplus.
    in the above SYSTEM is username and password and ORCLE is SID.
    but sqlplusw says that
    could not resolve the connect identifier specified.
    where i can find complete information about HOST string ?
    thanks

    You can look inside yours tnsnames.ora file it can be found in %ORACLE_HOME%\network\admin
    MOB92 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxx)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = MOB92.world)
    Here my network service name in MOB92 so in sqlplus I would use:
    system
    password
    mob92
    and it should work. If you have no such entry in tnsnames.ora file you can use for example Network Configuration Assistant to configure your network service name.
    Best Regards
    Krystian Zieja / mob

  • Tables created using Enterprise Console Manager do not show up in SQLPLUS

    I am struggling with Enterprise console manager and command line SQLPLUS.
    I have tried scott/tiger , system/manager and the new user that I have created. But I am having the following problems:
    1. I cannot connect as NORMAL through Enterprise Console Manager if I use scott/tiger OR new/paswd. Only way I can connect as NORMAL is using system/manager
    2. The tables that I create using Enterprise Console Manager (while connected as system/manager in NORMAL mode) do not show up in the command line SQLPLUS. I am check this by running the following command:
    SELECT OWNER, OBJECT_NAME FROM ALL_OBJECTS WHERE OBJECT_NAME LIKE '%TEST%';
    While running the above command I am conected to SQLPLUS using system/manager WITHOUT SYSDBA
    3. Lastly, I have a JAVA class which establishes as connection to the database using system/manager. But I can access only the tables that I create using the Enterprise Console Manager. If I create a table using command line SQLPLUS (while connected as system/manager), I cannot access it through Java program.
    I am struggling with this since last morning and now I have run out ways to debug what is happening. Can anybody suggest any ways to tackle this?
    Thanks in advance,
    Mahesh

    Prior to 11g, when you created a table or whatever, you automatically allocated one extent.
    This is now no longer true and depends on a parameter I don't remember.
    dba_segments is a summary of dba_extents.
    Obviously, if there is no extent allocated, the table (view is defined with inner join) will not show up.
    You could qualify this is as a bug and submit a SR to Oracle. But then the performance impact may be huge.
    Sybrand Bakker
    Senior Oracle DBA

  • Up and down arrow keys are not working properly when using SQL CLI on Linux

    Every time I hit up, down, left, and right arrow keys to return to a previous sql command I got ^[[D, please any hints to fix this issue?
    The backspace works fine with me. I tried to use stty to fix this issue with no luck.
    Thanks
    Mohamed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Which SQL client and Linux version are we talking about?
    Assuming you are using the Oracle sqlplus client... it does not support command line editing and history using the arrow keys. For this to work you will have to install a product called Readline Wrapper. See my answer at the General Database forum:
    sqlplus command line editing

  • Call unix command in sqlplus script

    Hello, I wanna to know how to call a unix command in the sqlplus script.
    For exemple,
    I've a sqlplus script to lauch a oracle report, after the report is generated, I wanne to replace the output file in an other directory.
    So that, I have to call the unix command mv here in the sqlplus script
    How can I do it?**
    I completed my situation:
    I don't have dbms_scheduler untility in my database.
    Thanks a lot for your help
    Edited by: user11930885 on 17 janv. 2010 14:53

    Yes, at the begining, I'll tried the unix shell by calling SQL.
    I've the problem of passing the parameters through.
    It seems to me
    we can use
    Host in the SQLPLUS to run the unix command.
    but I've written it in my sqlplus script, it doesn't work. so I wanna to find an exemple how to use HOST in sqlplus script?
    I would have loved to give you an example..but its not unix on my laptop.
    But what i can tell you is...u should be doing otherway round.
    Not calling Unix commands from SQL but calling SQL's form unix.
    You got shell scripts for that.
    Write a shell script. Login to SQL execute your code.
    exit from sql and then move your file with MV. That's it.
    Do post how far you get after trying this.

  • SQLPLUS spool to create .dat files - problems

    I am using spool from sqlplus to generate
    .dat files for sqlldr. The problem is with
    numeric fields. I have SET numwidth, numformat to no avail. The fields defined with specific numeric size number(n) always get spooled with a longer column size.
    Also, the COLSEP character does not appear
    after all columns. Any ideas out there ?
    (I realize export/import is an easier solution )

    Try using TO_CHAR, LPAD, SUBSTR and other character functions to achieve the same. Also, if you have not SET HEAD OFF, then do that, or use alias for the formatted columns in case you need headings.

  • Connecting to a database using xp

    I've downloaded and installed the SQL developer and Oracle Database 10g Express Edition. I'm using WinXP. The tutorial is located at:
    http://www.oracle.com/technology/getting-started/sqldev.html
    I've followed the instructions but when I test the defined connection I get the following error:
    status : Failure- Io exception:The Network Adapter could not establish the connection.
    The Connection descriptor used by the client was:
    localhost:1521:XE
    In the tutorial it is localhost:1521:ORCL
    Both XE and ORCL are not working.
    I would appreciate any insights that would help me get this tutorial going

    QUestions:
    1) Is the system using a fixed IP address? Or DHCP?
    2) If DHCP, did you install the loopback adapter?
    3) Is the TNSListener service running?
    4) What happens when you enter (command line) lsnrctl status?
    5) Which firewalls and AV programs are running?
    6) Can you get in using (commadnn line) sqlplus / as sysdba

  • RAC + oratab + sqlplus

    This one should be simple, I'v searched online and just can't seem to find a solid answer for this.
    After installing a database with dbca on a 2 node Rac cluster, (db_name = SEED, instances = SEED1, SEED2), I'm left with this in /etc/oratab
    SEED:/u01/app/oracle/product/10.2.0/devdb_1:N
    I have a net service entry setup with a name of SEED that is load balanced between the two, and then 2 individual service names SEED1, and SEED2 that go to the specific instances.
    I modified /usr/local/bin/oratab to include this at the bottom.
    TWO_TASK=$ORACLE_SID
    I'm running this on RHEL 4.6 (64-bit)
    My understanding was that if I set the TWO_TASK variable, then sqlplus would treat the statement 'sqlplus / as sysdba' the same as 'sqlplus sys/password@SEED as sysdba
    But I get the following.
    [oracle@node-name ~]$ . oraenv
    ORACLE_SID = [SEED] ? SEED
    [oracle@node-name ~]$ echo $TWO_TASK
    SEED
    [oracle@node-name ~]$ echo $LOCAL
    SEED
    [oracle@node-name ~]$ echo $ORACLE_SID
    SEED
    [oracle@node-name ~]$ echo $ORACLE_HOME
    /u01/app/oracle/product/10.2.0/devdb_1
    [oracle@node-name ~]$ sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.3.0 - Production on Wed Mar 11 08:11:39 2009
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Connected to an idle instance.
    SQL>
    When running 'sqlplus sys/password@SEED as sysdba' works correctly.
    If I change ORACLE_SID=SEED1, then 'sqlplus / as sysdba' will work correctly.
    I know how to make this work, but I'm not sure what the best practice is here. Should add the following to /etc/oratab, for each instance
    SEED1:/u01/app/oracle/product/10.2.0/devdb_1:N
    SEED2:/u01/app/oracle/product/10.2.0/devdb_1:N
    and then use
    . oraenv
    SEED1
    sqlplus / as sysdba
    I see some people have modified oraenv to append the instance number to the end of ORACLE_SID
    I would be fine with using the net service name, if the TWO_TASK varaible was working correctly, but it does not seem to work the way the documentation says.
    Am I missing something here?

    Hello,
    It's good idea to add entries for each RAC instance in oratab and setup in a way when you login it sets up env for one instance say rac11 which is the primary instance for the node. Now here in this case , i got 2 different RAC instances and I have setup RAC11 for node1 and RAC12 env as default. So I don't have to set env when i login but i do change env when I go RAC21 and RAC22 instances. As far as the best practices goes, i see more what work for you and how easy is to manage.
    +ASM1:/u01/app/oracle/product/10.2.0/database:Y:10.2.0:
    rac1:/u01/app/oracle/product/10.2.0/database:Y:10.2.0:
    rac11:/u01/app/oracle/product/10.2.0/database:Y:10.2.0:
    rac12:/u01/app/oracle/product/10.2.0/database:Y:10.2.0:
    rac2:/u01/app/oracle/product/10.2.0/database:Y:10.2.0:
    rac21:/u01/app/oracle/product/10.2.0/database:Y:10.2.0:
    rac22:/u01/app/oracle/product/10.2.0/database:Y:10.2.0:Regards

  • Tables created in Enterprise Manager dont show up in SQLPLUS

    I am struggling with Enterprise console manager and command line SQLPLUS.
    I have tried scott/tiger , system/manager and the new user that I have created. But I am having the following problems:
    1. I cannot connect as NORMAL through Enterprise Console Manager if I use scott/tiger OR new/paswd. Only way I can connect as NORMAL is using system/manager
    2. The tables that I create using Enterprise Console Manager (while connected as system/manager in NORMAL mode) do not show up in the command line SQLPLUS. I am check this by running the following command:
    SELECT OWNER, OBJECT_NAME FROM ALL_OBJECTS WHERE OBJECT_NAME LIKE '%TEST%';
    While running the above command I am conected to SQLPLUS using system/manager WITHOUT SYSDBA
    3. Lastly, I have a JAVA class which establishes as connection to the database using system/manager. But I can access only the tables that I create using the Enterprise Console Manager. If I create a table using command line SQLPLUS (while connected as system/manager), I cannot access it through Java program.
    I am struggling with this since last morning and now I have run out ways to debug what is happening. Can anybody suggest any ways to tackle this?
    Thanks in advance,
    Mahesh

    If you are using oracle below version 9 then I suggest you use DBA Studio for creating tables otherwise just create tables from SQLPLUS.

  • About using cursor expressions in Oracle Reports

    I've just discovered a rather old syntax of the mighty select statement. It seems related to the concept of inline view or more precisely scalar view. It's the cursor syntax in a select statement.
    Example:
    select d.dname
    ,cursor(select e.empno,e.ename,sal
    from scott.emp e
    where e.deptno = d.deptno)
    from scott.dept d
    I have two questions:
    1) Performance: how is the performance of this select in comparison to standard join?
    2) Usage: I've use this from sqlplus and it's ok, but can't use it on a tool like Oracle Reports. Although the select statement is correctly processed, can't display it since the datatype is Database - Unknown ...
    It seems there´s no way to use cursor expressions at least if datasource is a SQL Query.
    Thanks in advance ....

    I think you have answered your own question: CURSOR is not something you can display.

Maybe you are looking for