ORA-02421: missing or invalid schema authorization identifier

Hello Evryone,
I am having a problem with schema user session. I am not able to change the schema even it exists.
SQL>ALTER session SET CURRENT_SCHEMA='QA'
Error report:
SQL Error: ORA-02421: missing or invalid schema authorization identifier
02421. 00000 -  "missing or invalid schema authorization identifier"
*Cause:    the schema name is missing or is incorrect in an authorization
           clause of a create schema statement.
*Action:   If the name is present, it must be the same as the current
           schema.
SQL>select username, account_status from DBA_USERS where username='QA';
USERNAME                       ACCOUNT_STATUS                  
QA                                        OPEN                            
SQL>SHOW user
USER is SYSTEM
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for HPUX: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

Try it without the single quotes.
Best Regards
mseberg
Test on mine :
Release 11.2.0.1.0 - 64bit Productio
I get the same error with quotes
ERROR at line 1:
ORA-02421: missing or invalid schema authorization identifier
Edited by: mseberg on Aug 15, 2011 2:50 PM
So this and then the verify
ALTER SESSION SET CURRENT_SCHEMA=QAYou can verify using this :
select sys_context('USERENV','SESSION_SCHEMA') from dual;Edited by: mseberg on Aug 15, 2011 3:08 PM

Similar Messages

  • IFS Install (Config) Fails with "ORA-00922: missing or invalid option"

    Greetings:
    Thanks for your help in advance...
    Towards the end of IFS installation, I get the following error in my
    IfsConfigOut.log file (This happens towards the end of the installation). I
    am Installing IFS on Oracle 9i (9.0.1.1 version) instance on Win 2K (P-III,
    800Mhz, 512Mb) . After this installation error, all the 9iFS directories
    and nodes are detected under OEM but when I start the domain I get no
    response for the same.
    ConfigOut File pasted below
    CONFIGURATION: SCHEMA CREATION TYPE
    Configuring Oracle Internet File System 9.0.1.1.0 configuration started on:
    Mon May 20 09:45:28 GMT+05:30 2002
    saving user configuration settings to file:
    saving:E:\oracle\ora90\9ifs\settings\oracle\ifs\installer\properties\IfsConf
    ig.properties
    saving:
    E:\oracle\ora90\9ifs\settings\oracle\ifs\server\properties\IfsDefault.proper
    ties
    Old schema name in IfsDefault.properties file = ifssys
    New schema name pointing to now = IFSSYS
    Create Schema = true
    Upgrading Schema = false
    Pointing to same schema as the old entry in IfsDefault.properties file =
    true
    Checking DC entries
    RUN DC = true
    Adding section for DC as there does not exist a section already
    Checking Node entries
    RUN NODE = true
    Adding Node section = Node
    saving: E:\oracle\ora90\9ifs\settings\Node.def
    saving: E:\oracle\ora90\9ifs\settings\HttpNode.def
    saving: E:\oracle\ora90\9ifs\settings\DomainController.def
    executing command:
    Empty command. Not executing
    executing command:
    Empty command. Not executing
    executing command:
    Empty command. Not executing
    creating database user (schema): IFSSYS
    java.sql.SQLException: ORA-00922: missing or invalid option
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
         at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java, Compiled
    Code)
         at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java, Compiled
    Code)
         at oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java,
    Compiled Code)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java,
    Compiled Code)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java,
    Compiled Code)
         at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
    , Compiled Code)
         at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java,
    Compiled Code)
         at oracle.ifs.utils.sql.SQLCommands.createUser(SQLCommands.java:352)
         at
    oracle.ifs.installer.IfsConfiguration$CreateSchemaAction.createIfsSchema(Ifs
    Configuration.java:546)
         at
    oracle.ifs.installer.IfsConfiguration$CreateSchemaAction.perform(IfsConfigur
    ation.java:476)
         at oracle.ifs.utils.action.ActionQueue.performActions(ActionQueue.java,
    Compiled Code)
         at oracle.ifs.utils.action.ActionQueue.run(ActionQueue.java:230)
         at java.lang.Thread.run(Thread.java:479)
    recording that configuration failed
    saving:E:\oracle\ora90\9ifs\settings\oracle\ifs\installer\properties\IfsConf
    ig.properties
    iFS configuration failed; the following error occurred:
    oracle.ifs.utils.action.ActionFailedException: java.sql.SQLException:
    ORA-00922: missing or invalid option
         at
    oracle.ifs.installer.IfsConfiguration$CreateSchemaAction.perform(IfsConfigur
    ation.java:526)
         at oracle.ifs.utils.action.ActionQueue.performActions(ActionQueue.java,
    Compiled Code)
         at oracle.ifs.utils.action.ActionQueue.run(ActionQueue.java:230)
         at java.lang.Thread.run(Thread.java:479)
    configuration failed on Mon May 20 09:45:35 GMT+05:30 2002

    Problem is Fixed !!!
    We were having this problem because IFS installation was not recognising a separate tablespace which we created for IFS, so we started using default USERS tablespace after which the installation was successful.
    Thanks.

  • ORA - 00922 Missing or Invalid option error while creating table

    I am tryin to create a table with the following syntax
    1 CREATE TABLE TEST_FOR_SCRIPT (
    2 TEST_A NUMBER NOT NULL
    3 ,TEST_B VARCHAR2(30) DEFAULT 'UNDEFINED' NOT NULL
    4 )
    5* @storage_parms_table_cmn
    6 /
    @storage_parms_table_cmn
    ERROR at line 5:
    ORA-00922: missing or invalid option
    Here, storage_parms_table_cmn.sql reads like this
    tablespace DBK_CMN_DATA
    Can anyone please guide me how to overcome this error.

    What is your Oracle Version?
    i can do it exactly what you did without error
    sql> CREATE TABLE vd.TEST_FOR_SCRIPT (
    2 TEST_A NUMBER NOT NULL
    3 ,TEST_B VARCHAR2(30) DEFAULT 'UNDEFINED' NOT NULL
    4 )
    5 @test1.sql
    6 /
    Table created.
    Cheers
    http://fiedizheng.blogspot.com/

  • ORA-00026: missing or invalid session ID

    I am receiving following error, while executing a procedure kill_session
    EXEC kill_session('USERNAME');
    4329 267 TARIQ_CORE
    ORA-00026: missing or invalid session ID
    create or replace
    procedure kill_session (usr_2_kill in varchar2)
    as
    vsid    number(6);
    vserial number(6);
    begin
      for s_info in (select * from v$session where username=usr_2_kill)
      loop
         vsid    := s_info.sid;
         vserial := s_info.serial#;
         dbms_output.put_line(vsid||'  '||vserial||'  '||usr_2_kill);
         execute immediate 'alter system kill session(:v1,:v2) immediate' using vsid,vserial;
      end loop;
       EXCEPTION
          WHEN OTHERS
          THEN
             dbms_output.put_line(SQLERRM);
       END;

    malhi wrote:
    I am receiving following error, while executing a procedure kill_session
    EXEC kill_session('USERNAME');
    4329 267 TARIQ_CORE
    ORA-00026: missing or invalid session ID
    create or replace
    procedure kill_session (usr_2_kill in varchar2)
    as
    vsid    number(6);
    vserial number(6);
    begin
    for s_info in (select * from v$session where username=usr_2_kill)
    loop
    vsid    := s_info.sid;
    vserial := s_info.serial#;
    dbms_output.put_line(vsid||'  '||vserial||'  '||usr_2_kill);
    execute immediate 'alter system kill session(:v1,:v2) immediate' using vsid,vserial;
    end loop;
    EXCEPTION
    WHEN OTHERS
    THEN
    dbms_output.put_line(SQLERRM);
    END;
    Check your syntax ... it's wrong.
    TUBBY_TUBBZ?alter system kill session (99,16840);
    alter system kill session (99,16840)
    ERROR at line 1:
    ORA-00026: missing or invalid session ID
    Elapsed: 00:00:00.89
    TUBBY_TUBBZ?alter system kill session '99,16840';
    System altered.
    Elapsed: 00:00:00.57
    TUBBY_TUBBZ?

  • ORA-00922: missing or invalid option

    I am using oracle 10g datbase.
    and trying to create a list of tables of 300 tables - a sampel is given below
    CREATE TABLE "SCHM1"."HOLIDAYS"
    ( "DATE" DATE NOT NULL ENABLE,
    "DESCR" VARCHAR2(40),
    "EXTRA_HOURS" NUMBER(2,0),
    "HOLIDAY_GROUP" VARCHAR2(5) NOT NULL ENABLE,
    "CREATED_BY" VARCHAR2(12),
    "CREATED_ON" DATE,
    "AMENDED_BY" VARCHAR2(12),
    "AMENDED_ON" DATE,
    CONSTRAINT "BANK_HOLIDAYSP1" PRIMARY KEY ("DATE", "HOLIDAY_GROUP")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_REF_INDEXES1" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_REF_DATA1"
    CREATE TABLE "SCHM1"."LODGEMENT"
    ( "BANK_LODGEMENT" NUMBER(10,0) NOT NULL ENABLE,
    "LODGEMENT_SLIP" NUMBER(12,0),
    "BRANCH" NUMBER(4,0),
    "EMPLOYEE" VARCHAR2(12),
    "LODGEMENT_DATIM" DATE,
    "SYS_DATIM" DATE,
    "TILL_DAT" DATE,
    "POSTED_FLG" VARCHAR2(1),
    "EMERGENCY_FLG" VARCHAR2(1),
    "CREATED_BY" VARCHAR2(12),
    "CREATED_ON" DATE,
    "AMENDED_BY" VARCHAR2(12),
    "AMENDED_ON" DATE,
    "LODGEMENT_GRP" NUMBER,
    CONSTRAINT "BANK_LODGEMENTP1" PRIMARY KEY ("BANK_LODGEMENT")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_INDEXES10" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_DATA10"
    when I executed this in sql window i get the error:
    ORA-00922: missing or invalid option
    when I run it from command prompt ,
    i get error like
    SP2-0734: unknown command beginning "USING INDE..." - rest of line ignored.
    SP2-0734: unknown command beginning "STORAGE(IN..." - rest of line ignored.
    SP2-0734: unknown command beginning "PCTINCREAS..." - rest of line ignored.
    SP2-0734: unknown command beginning "TABLESPACE..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    and it doesn't create the table. CAn someone let em know how I to create log of errors on execution so taht the session can be resumed and also
    help me in finding the error in this.
    Cheers
    Edited by: user1000979 on 02-Sep-2009 06:50

    Hi!
    there is just missing a sql terminator between the statements ...
    it is not a internal sql language ...
    i have no problems when execute it in sql*plus.
    tested with oracle 8i and XE
    CREATE TABLE "SCHM1"."HOLIDAYS"
    ( "DATE" DATE NOT NULL ENABLE,
    "DESCR" VARCHAR2(40),
    "EXTRA_HOURS" NUMBER(2,0),
    "HOLIDAY_GROUP" VARCHAR2(5) NOT NULL ENABLE,
    "CREATED_BY" VARCHAR2(12),
    "CREATED_ON" DATE,
    "AMENDED_BY" VARCHAR2(12),
    "AMENDED_ON" DATE,
    CONSTRAINT "BANK_HOLIDAYSP1" PRIMARY KEY ("DATE", "HOLIDAY_GROUP")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_REF_INDEXES1" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_REF_DATA1"
    CREATE TABLE "SCHM1"."LODGEMENT"
    ( "BANK_LODGEMENT" NUMBER(10,0) NOT NULL ENABLE,
    "LODGEMENT_SLIP" NUMBER(12,0),
    "BRANCH" NUMBER(4,0),
    "EMPLOYEE" VARCHAR2(12),
    "LODGEMENT_DATIM" DATE,
    "SYS_DATIM" DATE,
    "TILL_DAT" DATE,
    "POSTED_FLG" VARCHAR2(1),
    "EMERGENCY_FLG" VARCHAR2(1),
    "CREATED_BY" VARCHAR2(12),
    "CREATED_ON" DATE,
    "AMENDED_BY" VARCHAR2(12),
    "AMENDED_ON" DATE,
    "LODGEMENT_GRP" NUMBER,
    CONSTRAINT "BANK_LODGEMENTP1" PRIMARY KEY ("BANK_LODGEMENT")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_INDEXES10" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_DATA10"
    /Regards

  • ORA-00922: missing or invalid option in create seq, trigger

    Hi All,
    I am trying to create a table, sequence, and trigger with the following SQL and am getting the error:
    ORA-00922: missing or invalid option
    CREATE TABLE "DATA_INVENTORY"
    (     "ID" INTEGER NOT NULL ENABLE,
         "COE_CONTRACT_NUM" VARCHAR2(30),
         "PROJ_AREA" VARCHAR2(30),
         "STATE" VARCHAR2(30),
         "DATA_DATE" VARCHAR2(30) NOT NULL ENABLE,
         "NUM_OF_MEDIA" NUMBER,
         "DATA_TYPE" VARCHAR2(30)NOT NULL ENABLE,
         "MEDIA_TYPE" VARCHAR2(30)NOT NULL ENABLE,
         "EXTERNAL_DRIVE_DESCR" VARCHAR2(200),
         "ROOM_NUM" VARCHAR2(10)NOT NULL ENABLE,
         "DRAWER_NUM" VARCHAR2(30),
         "PROJ_CODE" VARCHAR2(30),
         "COMPANY" VARCHAR2(30),
         "DESCRIPTION" VARCHAR2(200),
         "NOTES" VARCHAR2(500),
         "INDEX" VARCHAR2(30),
         "INDEX_LINK" VARCHAR2(75),
         "DATA_LINK" VARCHAR2(75),
         "METADATA" VARCHAR2(75),
         "METADATA_LINK" VARCHAR2(75),
         "DISTRIBUTE" VARCHAR2(30)NOT NULL ENABLE,
         "CORPORATE" VARCHAR2(1)NOT NULL ENABLE,
         CONSTRAINT "DATA_INVENTORY_PK" PRIMARY KEY ("ID") ENABLE,
         CONSTRAINT "DATA_INVENTORY_UK1" UNIQUE ("COE_CONTRACT_NUM", "PROJ_AREA") ENABLE
    CREATE SEQUENCE "DATA_INVENTORY_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 324 CACHE 20 NOORDER NOCYCLE
    CREATE OR REPLACE TRIGGER "BI_DATA_INVENTORY"
    before insert on "DATA_INVENTORY"
    for each row
    begin
    select "DATA_INVENTORY_SEQ".nextval into :NEW.ID from dual;
    end;
    ALTER TRIGGER "BI_DATA_INVENTORY" ENABLE
    Does anyone see anything wrong with this?
    The create table part is alright but when I add the create sequence etc it causes the error
    Thanks,
    Kirk

    Hello Kirk,
    Your code work likes a charm. Check your privileges for creating sequences and triggers.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • Anyone to help with this problem: ora-00922 : missing or invalid option

    I am trying to call a function that i wrote.
    PS: i am new to oracle functions.
    The purpose of this function is to display each item with its suppliers displayed in a record. I hope what i wrote in my function is close to what i am trying to get as a result.
    Here what i run:
    CREATE TYPE ind_tab_supplier0 AS OBJECT
    (ITP_SUPPLIER_CODE VARCHAR2(50),
    ITP_SUPPLIER_NAME VARCHAR2(50));
    CREATE TYPE ind_tab_supplier1 IS VARRAY(6) OF VARCHAR2(30);
    CREATE TYPE ind_tab_supplier_table AS TABLE OF ind_tab_supplier1;
    than i tried to execute the following function but it gave me the error
    "ora-00922 : missing or invalid option". If anyone could tell me what is wrong with it:
    CREATE OR REPLACE CSRDBA."GET_SUPPLIERS" (itemCode IN
    ref_item.itm_id%TYPE) RETURN ind_tab_supplier_table PIPELINED
    IS
    TYPE ref0 IS REF CURSOR;
    cur0 ref0;
    TYPE ref1 IS REF CURSOR;
    cur1 ref1;
    out_rec0 ind_tab_supplier0
    := ind_tab_supplier0(NULL,NULL);
    out_rec1 ind_tab_supplier1
    := ind_tab_supplier1(NULL);
    BEGIN
    v_itemCode := itemCode;
    OPEN cur0 FOR
    ' select t.ven_id , (select s.ven_name from ref_ven_vendor s '||
    'where s.ven_id = t.ven_id)
    "supplier_name" '||
    ' from ref_item_vendor t where t.itm_id = :1 '
    USING v_itemCode;
    LOOP
    FETCH cur0 INTO out_rec0.itp_supplier_code,
    out_rec0.itp_supplier_name;
    IF cur0%NOTFOUND THEN
    RETURN;
    END IF;
    out_rec1.ind_tab_supplier1.extend;
    out_rec1.ind_tab_supplier1(out_rec1.ind_tab_supplier1.count) :=
    out_rec0.itp_supplier_code;
    out_rec1.ITP_SUPPLIER.extend;
    out_rec1.ITP_SUPPLIER(out_rec1.ITP_SUPPLIER.count) :=
    out_rec0.itp_supplier_name;
    END LOOP;
    PIPE ROW(out_rec1);
    CLOSE cur0;
    RETURN;
    END GET_SUPPLIERS;
    At the end what i want to do is to run the following query if possible:
    select item_code, item_name, GET_SUPPLIERS( item_code )
    from item_table
    Thank you in advance for your help.

    Hi,
    Try this :
    While creating TYPE remove semi colon from end of the statement and also dont use extra / as / means execute last statement so you may encounter error..
    CREATE TYPE ind_tab_supplier1 IS VARRAY(6) OF VARCHAR2(30)
    /

  • Impdp ORA-02421 on Oracle 10.2.0.1 and 10.2.0.2

    Hello,
    The impdp utility crashes the import process with ORA-02421 for a schema which starts with a number on both Oracle RDBMS versions : Oracle 10.2.0.1 and 10.2.0.2.
    I tried to apply patch 4671082 to Oracle 10.2.0.1 but it doesn't work and its a known issue.
    Eg.
    Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.PUT_DDL [PROCEDURE:"[b]233"."ADD_JOB_HISTORY"]
    ORA-02421: missing or invalid schema authorization identifier
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPW$WORKER", line 6273
    ----- PL/SQL Call Stack -----
    I need to migrate 1400 schemas (with passwords and all objects) witch starts with a number and I cant rename them.
    Is there a workarround to do this staff.
    Thank you
    Best regards,
    Max

    . Is this version of the database, this method works?yes as long as USER owns table EMPLOYEES

  • While creating Table it shows error as 'missing or invalid option

    I had log on to ap/ap@vis in sqlplus and try to create table but showing error.....here below is the table
    Create table Purchase_Order
    (Item varchar2(10),
    Item_Desc varchar2(100),
    Item_Cost Number(7),
    Item_Qty Number(7),
    Item_Date Date,
    Need_by_date date,
    Last_updated_date date,
    last_updated_by number(10),
    creation_date date,
    created_by number(10),
    Attributed_category varchar2(100),
    attribute1 varchar2(100),
    attribute2 varchar2(100),
    attribute3 varchar2(100),
    attribute4 varchar2(100),
    attribute5 varchar2(100),
    attribute6 varchar2(100));
    But it showing error as ORA-00922:missing or invalid option

    It works for me
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> Create table Purchase_Order
      2  (Item varchar2(10),
      3  Item_Desc varchar2(100),
      4  Item_Cost Number(7),
      5  Item_Qty Number(7),
      6  Item_Date Date,
      7  Need_by_date date,
      8  Last_updated_date date,
      9  last_updated_by number(10),
    10  creation_date date,
    11  created_by number(10),
    12  Attributed_category varchar2(100),
    13  attribute1 varchar2(100),
    14  attribute2 varchar2(100),
    15  attribute3 varchar2(100),
    16  attribute4 varchar2(100),
    17  attribute5 varchar2(100),
    18  attribute6 varchar2(100));
    Table created.
    SQL>

  • Failed to create DNS with ODBC Datadirect Driver - error missing or invalid option

    Dear All,
    I tried to post a first time and get my post thrown away. So please just tell me if that's not the place to post such questions. I tried this forum because I didn't find any revelant information yet on internet.
    I installed Informatica and Oracle 11g, tried to create my DSN with the Driver DataDirect Oracle Wire Protocol. I keep bumping into the message " [Informatica][ODBC Oracle wire protocol driver][Oracle] ora-00922: missing or invalid option".
    Can you please help to understand where the error comes from?
    Here are my current status :
    * My table in the Oracle database is created with every field followed by NOT NULL option, the table is successfully created.
    * The connection to the Oracle database using Oracle TNSNames Connection server name and TNSNames files seem to work, I tried to connect with another driver Oracle in OraDB 11g_home1. This one succeeds.
    * Listener.ora:
    # listener.ora Network Configuration File: C:\app\ql186003\product\11.2.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = C:\app\ql186003\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:C:\app\ql186003\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    ADR_BASE_LISTENER = C:\app\ql186003
    * Running lsnrctl STATUS:
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
    Start Date                22-FEB-2014 21:43:22
    Uptime                    0 days 1 hr. 8 min. 33 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   C:\app\ql186003\product\11.2.0\dbhome_1\network\admin\listener.ora
    Listener Log File         c:\app\ql186003\diag\tnslsnr\WBEQL186003-Q4G\listener\alert\log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
      Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "TESTDBXDB" has 1 instance(s).
      Instance "testdb", status READY, has 1 handler(s) for this service...
    Service "TEST_DB" has 1 instance(s).
      Instance "testdb", status READY, has 1 handler(s) for this service...
    Service "orcl.TD.TERADATA.COM" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB.TD.TERADATA.COM" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    Thank you very much for any guidance.
    Qiong

    Hi,
    Try this :
    While creating TYPE remove semi colon from end of the statement and also dont use extra / as / means execute last statement so you may encounter error..
    CREATE TYPE ind_tab_supplier1 IS VARRAY(6) OF VARCHAR2(30)
    /

  • Generate Create Script creates scripts that won't run: ORA-00922: missing..

    I'm having trouble running a script that I created by using the Generate Create Script tool in Oracle Explorer. I created the following script by running the Generate Create Script on a table called, "ASPNET_APPLICATIONS":
    CREATE TABLE "DEV"."ASPNET_APPLICATIONS" ("APPLICATIONID" NUMBER,"APPLICATIONNAME" VARCHAR2(256 BYTE),"DESCRIPTION" VARCHAR2(256 BYTE)) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 65536 MAXEXTENTS 2147483645 MINEXTENTS 1 )
    CREATE UNIQUE INDEX "DEV"."PK_APPS" ON "DEV"."ASPNET_APPLICATIONS" ("APPLICATIONID" ) TABLESPACE "USERS"
    CREATE UNIQUE INDEX "DEV"."IDX_APPS_APPNAME" ON "DEV"."ASPNET_APPLICATIONS" (LOWER(TRIM("APPLICATIONNAME")) ) TABLESPACE "USERS"
    ALTER TABLE "DEV"."ASPNET_APPLICATIONS" ADD ( CONSTRAINT "SYS_C004598" CHECK ("APPLICATIONNAME" IS NOT NULL) ENABLE VALIDATE )
    ALTER TABLE "DEV"."ASPNET_APPLICATIONS" ADD ( CONSTRAINT "SYS_C004597" CHECK ("APPLICATIONID" IS NOT NULL) ENABLE VALIDATE )
    I then deleted the table in my Oracle 10g database and ran the above script to recreate the table. The result is that I get an error the following error, ORA-00922: missing or invalid option. Does anyone know how to resolve this?
    Is anyone aware of any bugs in the Generate Create Script option of Oracle Explorer?

    Okay, I think I found my problem.
    I was trying to run the script created by Oracle Explorer directly from a Database project I added to my Solution in Visual Studio. Visual Studio is probably using some SQL Server specific tool when I select the Run or Run On option on the script.
    When running the same script directly in the Oracle 10g Home Page (Home > SQL > SQL Scripts), I had no problem. Everything executes correctly.
    Is anyone aware of another way to run Oracle scripts directly from Visual Studio? Do I have my project setup incorrectly? This is the first project I've used .NET and Oracle together, so if anyone has any suggestions, I'd really appreciate the help.
    Thanks,
    Mycole

  • Trying to use authorization schema but getting ORA-00907: missing right par

    Hi,
    I am fairly new to HMTLDB. I am busy going through the Issue Tracker Tutorial. I am on the last part of Tutorial. This part involves authorizing a user based on their roles in the company.
    I now keep getting the following when I load my pages
    ORA-00907: missing right parenthesis
    Error ERR-1082 Error in executing authorization scheme code.
    How do I go about debugging this error not sure where to start?

    if this helps I am using this PDF
    http://www.oracle.com/technology/products/database/application_express/pdf/issue_tracking_tutorial_1.6_0.pdf
    if you open the PDF file I am stuck on page 72-74. The page I am trying to open while i am logged on as FUNKYMONKEY is Page 4 which is in the documentation

  • Maintenance Wizard install: ORA-00931: missing identifier

    When installing the most recent Maintenance Wizard version 2.18, I am getting the error in the logfile. The installation does proceed and finish.
    <snip>
    Creating Wallet for password encryption...Done.
    Updating attributes...declare
    ERROR at line 1:
    ORA-00931: missing identifier
    ORA-06512: at "SYS.DBMS_UTILITY", line 127
    ORA-06512: at "SYS.DBMS_UTILITY", line 162
    ORA-06512: at "SYS.DBMS_UTILITY", line 204
    ORA-06512: at "MWIZ.EOF_UTIL", line 192
    ORA-06512: at line 8
    Thanks in advance

    I have also encountered this issue and have logged an SR, which has been open about a week with no progress.

  • ERROR: ORACLE prepare error: ORA-00936: missing expression

    Hello,
    I am required to run "pass-through" Oracle SQL, to extract data from tables into SAS for processing and manipulation. My code (attached) reads and writes (executes) but with zero records to test first. I cannot get past the Prepare Error.
    The query is very much like other queries that seem to work, but I cannot get past this prepare error. I have no other access to individauls with adequate knowledge of PL SQL, and as a last stop hoped others in the forum could quickly spot the source of errror.
    Thanks very much in advance for any assistance.
    Jeff
    1 ;*';*";*/;quit;run;
    2 OPTIONS PAGENO=MIN;
    3 %LET _CLIENTTASKLABEL=%NRBQUOTE(rx_biplr_v3_2);
    4 %LET _EGTASKLABEL=%NRBQUOTE(rx_biplr_v3_2);
    5 %LET _CLIENTPROJECTNAME=%NRBQUOTE();
    6 %LET _SASPROGRAMFILE=;
    7
    8 ODS _ALL_ CLOSE;
    NOTE: Some of your options or statements may not be supported with the Activex or Java series of devices. Graph defaults for these
    drivers may be different from other SAS/GRAPH device drivers. For further information, please contact Technical Support.
    9 OPTIONS DEV=ACTIVEX;
    10 FILENAME EGHTML TEMP;
    NOTE: Writing HTML(EGHTML) Body file: EGHTML
    11 ODS HTML(ID=EGHTML) FILE=EGHTML ENCODING='utf-8' STYLE=EGDefault
    11 ! STYLESHEET=(URL="file:///C:/Program%20Files/SAS/Shared%20Files/BIClientStyles/EGDefault.css")
    11 ! ATTRIBUTES=("CODEBASE"="http://www2.sas.com/codebase/graph/v91/sasgraph.exe") NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation
    11 ! ;
    12
    13 %gaccessible;
    14 /********************************************************/
    15 * RX_BIPLR_V3.SAS ;
    16 /********************************************************/
    17
    18 dm 'log;clear;out;clear';
    19 options linesize =120;
    20 Option obs=0 NoReplace;
    21
    22 ****************************************************************************************;
    23 *Date Programmer Reviewed By WHAT WAS DONE;
    24 *----- -------------- ------------ -----------------------------------------;
    25 *2005 David Boyd Program creation for test population;
    26 *;
    27 *02/06/2006 Ivon Jones Modified to include total population;
    28 *;
    29 *07/20/2006 Ivon Jones Identified data elements for exclusion;
    30 * or inclusion for consolidation with ;
    31 * Robin's report;
    32 *;
    33 *08/18/2006 Ivon Jones Updated the Specific Therapeutic Classes;
    34 * 10-2009 J Shaf - modified to extract actual or potential Bipolar Dx from UBH and Medical Claims;
    35 ****************************************************************************************;
    36
    37
    38
    39 *%let allclmorgn = ('M','A') ; /* all claims origin code */
    40 %let begdate='01SEP2009'd;
    41 %let enddate='30SEP2009'd;
    42 %let q = %str(%') ;
    43
    44
    45 data _null_ ;
    46 call symput('fdos',put(intnx('month',"&begdate"d,-27,'beginning'), date9.) ) ;
    47 call symput('ldos',put(intnx('month',"&enddate"d,-0,'ending'), date9.) ) ;
    48 run ;
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    2 The SAS System 11:44 Friday, October 30, 2009
    cpu time 0.01 seconds
    49
    50
    51
    52 **************************************************************;
    53 * ??Use the data _null_ step to create a macro variable for the ;
    54 * year and month based on the ldos macro variable in the data ;
    55 * step above?? ;
    56 **************************************************************;
    57
    58
    59 data _null_ ;
    60 if month("&ldos"d) < 10
    61 then call symput('yr_mo',compress(year("&ldos"d) || '0' || month("&ldos"d) ) ) ;
    62 else call symput('yr_mo',compress(year("&ldos"d) || month("&ldos"d) ) ) ;
    63 run ;
    NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
    61:39 61:64 62:39 62:57
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    cpu time 0.00 seconds
    64
    65 *%put &biplr_dx;
    66 %put &begdate ;
    '01SEP2009'd
    67 %put &enddate ;
    '30SEP2009'd
    68 %put &fdos ;
    01JUN2007
    69 %put &ldos ;
    30SEP2009
    70 %put &q ;
    71
    72
    73 libname biplr'/home/jshafi01/projects/adhoc/biplr_dprsn/data';
    NOTE: Libref BIPLR was successfully assigned as follows:
    Engine: V9
    Physical Name: /home/jshafi01/projects/adhoc/biplr_dprsn/data
    74 libname rosdwp oracle user="&oracle_user." pass="&oracle_pass." buffsize=32767 path='rosdwp';
    NOTE: Libref ROSDWP was successfully assigned as follows:
    Engine: ORACLE
    Physical Name: rosdwp
    75
    76 data work.biplr_up_v1;
    77 attrib mbr_id length=$26;
    78 set biplr.biplr_ubh_med_v1;
    79 run;
    NOTE: There were 0 observations read from the data set BIPLR.BIPLR_UBH_MED_V1.
    NOTE: The data set WORK.BIPLR_UP_V1 has 0 observations and 1 variables.
    NOTE: DATA statement used (Total process time):
    real time 0.01 seconds
    3 The SAS System 11:44 Friday, October 30, 2009
    cpu time 0.00 seconds
    80
    81 proc contents;
    82 run;
    NOTE: PROCEDURE CONTENTS used (Total process time):
    real time 0.03 seconds
    cpu time 0.03 seconds
    83
    84 proc datasets
    85      library = rosdwp nolist;
    86      delete biplr_up_v1;
    87 quit;
    NOTE: Deleting ROSDWP.BIPLR_UP_V1 (memtype=DATA).
    NOTE: PROCEDURE DATASETS used (Total process time):
    real time 3.74 seconds
    cpu time 0.03 seconds
    88
    89 proc datasets
    90      library=work nolist;
    91      copy out = rosdwp move;
    92      select biplr_up_v1 ;
    93 quit;
    NOTE: Moving WORK.BIPLR_UP_V1 to ROSDWP.BIPLR_UP_V1 (memtype=DATA).
    NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
    NOTE: There were 0 observations read from the data set WORK.BIPLR_UP_V1.
    NOTE: The data set ROSDWP.BIPLR_UP_V1 has 0 observations and 1 variables.
    NOTE: PROCEDURE DATASETS used (Total process time):
    real time 0.32 seconds
    cpu time 0.04 seconds
    94
    95
    96
    97 *****************************************************************************;
    98
    99 *execute(commit) by rosdwp
    100 ******************************************************************************;
    101
    102
    103 proc SQL noprint ;
    104 connect to oracle as rosdwp (user="&oracle_user." password="&oracle_pass" buffsize=32767 path='rosdwp'
    104 ! preserve_comments);
    105      execute(alter session set nls_date_format = 'ddmonyyyy') by rosdwp;
    106 CREATE table biplr_rx as
    107 SELECT
    108 mrb_id,
    109 pcp_spc,
    110 rx_date,
    4 The SAS System 11:44 Friday, October 30, 2009
    111 brand,
    112 generic,
    113 ahfs_cd,
    114 ahfs_dsc,
    115 lbl,
    116 strngth,
    117 unt,
    118 spc_tx_cls_cd,
    119 spc_tx_cls_dsc,
    120 gcn,
    121 rx_num,
    122 rx_ingrd,
    123 rx_paid,
    124 rx_cnt,
    125 rx_qty,
    126 rx_day
    127 FROM connection to rosdwp
    128 (SELECT
    129 mid.UNIQ_MBR_ID as mrb_id,
    130 pd.PRVDR_SPCLTY_DESC as pcp_spc,
    131 pcf.LAST_SRVC_DT as rx_date,
    132 dd.BRAND_NAME as brand,
    133 dd.GNRC_NAME as generic,
    134 dd.AHFS_THRPTC_CLS_CD as ahfs_cd,
    135 dd.AHFS_THRPTC_CLS_DESC as ahfs_dsc,
    136 dd.LABEL_NAME as lbl,
    137 dd.STRNGTH_NUM as strngth,
    138 dd.STRNGTH_UNIT_DESC as unt,
    139 dd.SPECF_THRPTC_CLS_CD as spc_tx_cls_cd,
    140 dd.SPECF_THRPTC_CLS_DESC as spc_tx_cls_dsc,
    141 dd.GCN_NUM as gcn,
    142 pcf.PRSCRPTN_NUM as rx_num,
    143 SUM(pcf.INGRDNT_AMT) as rx_ingrd,
    144 SUM(pcf.PD_AMT) as rx_paid,
    145 SUM(pcf.UNIT_SRVC_CNT) as rx_cnt,
    146 SUM(pcf.DSPNSD_QTY) as rx_qty,
    147 SUM(pcf.DAY_SUPLY_CNT) as rx_day
    148 FROM
    149 PHRMCY_CLM_FACT pcf,
    150 MBR_ID_DMNSN mid,
    151 DRUG_DMNSN dd,
    152 PRVDR_DMNSN pd,
    153           biplr_up_v1
    154 WHERE
    155 (
    156 (biplr_up_v1.mbr_id = MBR_ID_DMNSN.UNIQ_MBR_ID) And
    157 (PHRMCY_CLM_FACT.FINL_CLM_KEY = PHRMCY_FINL_CLM_DMNSN.FINL_CLM_KEY) AND
    158 (PHRMCY_CLM_FACT.MBR_KEY = MBR_ID_DMNSN.MBR_KEY) And
    159 (PHRMCY_CLM_FACT.BNFT_KEY = MBR_BNFT_DMNSN.BNFT_KEY) And
    160 (PHRMCY_CLM_FACT.DRUG_KEY = DRUG_DMNSN.DRUG_KEY) And
    161 (PHRMCY_FINL_CLM_DMNSN.CLM_ORGN_CD IN ('M','A')) AND
    162 (PHRMCY_CLM_FACT.LAST_SRVC_DT BETWEEN between &q.&fdos.&q and &q.&ldos.&q)
    163      )
    164 Group By
    165 mid.UNIQ_MBR_ID ,
    166 pd.PRVDR_SPCLTY_DESC ,
    167 pcf.LAST_SRVC_DT ,
    168 dd.BRAND_NAME ,
    5 The SAS System 11:44 Friday, October 30, 2009
    169 dd.GNRC_NAME ,
    170 dd.AHFS_THRPTC_CLS_CD ,
    171 dd.AHFS_THRPTC_CLS_DESC ,
    172 dd.LABEL_NAME ,
    173 dd.STRNGTH_NUM ,
    174 dd.STRNGTH_UNIT_DESC ,
    175 dd.SPECF_THRPTC_CLS_CD ,
    176 dd.SPECF_THRPTC_CLS_DESC ,
    177 dd.GCN_NUM ,
    178 pcf.PRSCRPTN_NUM
    179 );
    ERROR: ORACLE prepare error: ORA-00936: missing expression. SQL statement: SELECT mid.UNIQ_MBR_ID as mrb_id,
    pd.PRVDR_SPCLTY_DESC as pcp_spc, pcf.LAST_SRVC_DT as rx_date, dd.BRAND_NAME as brand, dd.GNRC_NAME as generic,
    dd.AHFS_THRPTC_CLS_CD as ahfs_cd, dd.AHFS_THRPTC_CLS_DESC as ahfs_dsc, dd.LABEL_NAME as lbl, dd.STRNGTH_NUM as
    strngth, dd.STRNGTH_UNIT_DESC as unt, dd.SPECF_THRPTC_CLS_CD as spc_tx_cls_cd, dd.SPECF_THRPTC_CLS_DESC as
    spc_tx_cls_dsc, dd.GCN_NUM as gcn, pcf.PRSCRPTN_NUM as rx_num, SUM(pcf.INGRDNT_AMT) as rx_ingrd, SUM(pcf.PD_AMT)
    as rx_paid, SUM(pcf.UNIT_SRVC_CNT) as rx_cnt, SUM(pcf.DSPNSD_QTY) as rx_qty, SUM(pcf.DAY_SUPLY_CNT) as rx_day
    FROM PHRMCY_CLM_FACT pcf, MBR_ID_DMNSN mid, DRUG_DMNSN dd, PRVDR_DMNSN pd, biplr_up_v1 WHERE (
    (biplr_up_v1.mbr_id = MBR_ID_DMNSN.UNIQ_MBR_ID) And (PHRMCY_CLM_FACT.FINL_CLM_KEY =
    PHRMCY_FINL_CLM_DMNSN.FINL_CLM_KEY) AND (PHRMCY_CLM_FACT.MBR_KEY = MBR_ID_DMNSN.MBR_KEY) And
    (PHRMCY_CLM_FACT.BNFT_KEY = MBR_BNFT_DMNSN.BNFT_KEY) And (PHRMCY_CLM_FACT.DRUG_KEY = DRUG_DMNSN.DRUG_KEY) And
    (PHRMCY_FINL_CLM_DMNSN.CLM_ORGN_CD IN ('M','A')) AND (PHRMCY_CLM_FACT.LAST_SRVC_DT BETWEEN between '01JUN2007'
    and '30SEP2009') ) Group By mid.UNIQ_MBR_ID , pd.PRVDR_SPCLTY_DESC , pcf.LAST_SRVC_DT , dd.BRAND_NAME ,
    dd.GNRC_NAME , dd.AHFS_THRPTC_CLS_CD , dd.AHFS_THRPTC_CLS_DESC , dd.LABEL_NAME , dd.STRNGTH_NUM ,
    dd.STRNGTH_UNIT_DESC , dd.SPECF_THRPTC_CLS_CD , dd.SPECF_THRPTC_CLS_DESC , dd.GCN_NUM , pcf.PRSCRPTN_NUM.
    NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
    180 execute (drop table biplr_up_v1) by rosdwp;
    NOTE: Statement not executed due to NOEXEC option.
    181 disconnect from rosdwp;
    NOTE: Statement not executed due to NOEXEC option.
    182 quit;
    NOTE: The SAS System stopped processing this step because of errors.
    NOTE: PROCEDURE SQL used (Total process time):
    real time 0.14 seconds
    cpu time 0.03 seconds
    183
    184

    Hello Again ,
    Wish Oracle was a bit more informative. Am using a SAS Institute Product called Enterprise Guide. A "hot fix" was installed to address an issue that the product appears unable to save the latest version of edited code changes (hence " BETWEEN between" remaining even after a prior edit). In any case, with the change, am now receiving this error:
    " ERROR: ORACLE prepare error: ORA-00904: "PHRMCY_CLM_FACT"."LAST_SRVC_DT": invalid identifier". (Log file appears below)
    -The error remains, regardless of whether one uses "pass through" code to pass the date range to Oracle (which looks ok from the log output below I believe), or if I hard code the date range into the PL SQL query itself.
    -The Prepare error always appears at end of the inner SELECT.
    -The Prepare error remains, with or without the GROUP BY clause.
    Is there anything else here I am missing? Someone suggested a reserve word - but from other ANSI SQL versions, I do not see that is the case. I have consulted SAS Tech Support and SAS List Serve at University of GA. but nothing definitive from these sources. Have requested facility to be able to run Oracle directly, outside this SAS Institute product - in process.
    Any suggestions are greatly appreciated. Thanks to everyone very much.
    Jeff
    14 /********************************************************/
    15 * RX_BIPLR_V3.SAS ;
    16 /********************************************************/
    17
    18 dm 'log;clear;out;clear';
    19 options linesize =120;
    20 Option obs=0 NoReplace;
    21
    22 ****************************************************************************************;
    23 *Date       Programmer         Reviewed By     WHAT WAS DONE;
    24 *-----      --------------     ------------    -----------------------------------------;
    25 *2005 D. Boyd Program creation for test population;
    26 *;
    27 *02/06/2006 I. Jones Modified to include total population;
    28 *;
    29 *07/20/2006 I. Jones Identified data elements for exclusion;
    30 * or inclusion for consolidation with ;
    31 * Robin's report;
    32 *;
    33 *08/18/2006 I Jones Updated the Specific Therapeutic Classes;
    34 * 10-2009 J Shaf - modified to extract actual or potential Bipolar Dx from UBH and Medical Claims;
    35 ****************************************************************************************;
    36
    37
    38
    39 *%let allclmorgn = ('M','A') ; /* all claims origin code */
    40 %let begdate='01SEP2009'd;
    41 %let enddate='30SEP2009'd;
    42 %let q = %str(%') ;
    43
    44
    45 data null ;
    46 call symput('fdos',put(intnx('month',"&begdate"d,-27,'beginning'), date9.) ) ;
    47 call symput('ldos',put(intnx('month',"&enddate"d,-0,'ending'), date9.) ) ;
    48 run ;
    2 The SAS System 12:46 Monday, November 2, 2009
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    cpu time 0.00 seconds
    49
    50
    51
    52 **************************************************************;
    53 * ??Use the data null step to create a macro variable for the ;
    54 * year and month based on the ldos macro variable in the data ;
    55 * step above?? ;
    56 **************************************************************;
    57
    58
    59 data null ;
    60 if month("&ldos"d) < 10
    61 then call symput('yr_mo',compress(year("&ldos"d) || '0' || month("&ldos"d) ) ) ;
    62 else call symput('yr_mo',compress(year("&ldos"d) || month("&ldos"d) ) ) ;
    63 run ;
    NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
    61:39 61:64 62:39 62:57
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    cpu time 0.01 seconds
    64
    65 *%put &biplr_dx;
    66 %put &begdate ;
    '01SEP2009'd
    67 %put &enddate ;
    '30SEP2009'd
    68 %put &fdos ;
    01JUN2007
    69 %put &ldos ;
    30SEP2009
    70 %put &q ;
    71
    72
    73 libname biplr'/home/jshafi01/projects/adhoc/biplr_dprsn/data';
    NOTE: Libref BIPLR was successfully assigned as follows:
    Engine: V9
    Physical Name: /home/jshafi01/projects/adhoc/biplr_dprsn/data
    74 libname rosdwp oracle user="&oracle_user." pass="&oracle_pass." buffsize=32767 path='rosdwp';
    NOTE: Libref ROSDWP was successfully assigned as follows:
    Engine: ORACLE
    Physical Name: rosdwp
    75
    76 data work.biplr_up_v1;
    77 attrib mbr_id length=$26;
    78 set biplr.biplr_ubh_med_v1;
    79 run;
    NOTE: There were 0 observations read from the data set BIPLR.BIPLR_UBH_MED_V1.
    NOTE: The data set WORK.BIPLR_UP_V1 has 0 observations and 1 variables.
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    cpu time 0.01 seconds
    80
    81 proc contents;
    82 run;
    NOTE: PROCEDURE CONTENTS used (Total process time):
    real time 0.02 seconds
    cpu time 0.02 seconds
    83
    84 proc datasets
    85      library = rosdwp nolist;
    86      delete biplr_up_v1;
    87 quit;
    NOTE: Deleting ROSDWP.BIPLR_UP_V1 (memtype=DATA).
    NOTE: PROCEDURE DATASETS used (Total process time):
    real time 0.61 seconds
    cpu time 0.01 seconds
    88
    89 proc datasets
    90      library=work nolist;
    91      copy out = rosdwp move;
    92      select biplr_up_v1 ;
    93 quit;
    NOTE: Moving WORK.BIPLR_UP_V1 to ROSDWP.BIPLR_UP_V1 (memtype=DATA).
    NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
    NOTE: There were 0 observations read from the data set WORK.BIPLR_UP_V1.
    NOTE: The data set ROSDWP.BIPLR_UP_V1 has 0 observations and 1 variables.
    NOTE: PROCEDURE DATASETS used (Total process time):
    real time 0.15 seconds
    cpu time 0.04 seconds
    94
    95
    96
    97 *****************************************************************************;
    98
    99 *execute(commit) by rosdwp
    100 ******************************************************************************;
    101
    102
    103 proc SQL noprint ;
    104 connect to oracle as rosdwp (user="&oracle_user." password="&oracle_pass" buffsize=32767 path='rosdwp'
    104 ! preserve_comments);
    105      execute(alter session set nls_date_format = 'ddmonyyyy') by rosdwp;
    106 CREATE table biplr_rx as
    107 SELECT
    108 mrb_id,
    109 uniq_mbr_id,
    110 pcp_spc,
    111 rx_date,
    112 brand,
    113 generic,
    114 ahfs_cd,
    115 ahfs_dsc,
    116 lbl,
    117 strngth,
    118 unt,
    119 spc_tx_cls_cd,
    120 spc_tx_cls_dsc,
    121 gcn,
    122 rx_num,
    123 rx_ingrd,
    124 rx_paid,
    125 rx_cnt,
    126 rx_qty,
    127 rx_day
    128 FROM connection to rosdwp
    129 (SELECT
    130 mid.UNIQ_MBR_ID as uniq_mrb_id,
    131 blpr.mrb_id.mbr_id,
    132 pd.PRVDR_SPCLTY_DESC as pcp_spc,
    133 pcf.LAST_SRVC_DT as rx_date,
    134 dd.BRAND_NAME as brand,
    135 dd.GNRC_NAME as generic,
    136 dd.AHFS_THRPTC_CLS_CD as ahfs_cd,
    137 dd.AHFS_THRPTC_CLS_DESC as ahfs_dsc,
    138 dd.LABEL_NAME as lbl,
    139 dd.STRNGTH_NUM as strngth,
    140 dd.STRNGTH_UNIT_DESC as unt,
    141 dd.SPECF_THRPTC_CLS_CD as spc_tx_cls_cd,
    142 dd.SPECF_THRPTC_CLS_DESC as spc_tx_cls_dsc,
    143 dd.GCN_NUM as gcn,
    144 pcf.PRSCRPTN_NUM as rx_num,
    145 SUM(pcf.INGRDNT_AMT) as rx_ingrd,
    146 SUM(pcf.PD_AMT) as rx_paid,
    147 SUM(pcf.UNIT_SRVC_CNT) as rx_cnt,
    148 SUM(pcf.DSPNSD_QTY) as rx_qty,
    149 SUM(pcf.DAY_SUPLY_CNT) as rx_day
    150 FROM
    151 PHRMCY_CLM_FACT pcf,
    152 MBR_ID_DMNSN mid,
    153 DRUG_DMNSN dd,
    154 PRVDR_DMNSN pd,
    155      BIPLR_UP_V1 blpr
    156 WHERE
    157 (BIPLR_UP_V1.mbr_id = MBR_ID_DMNSN.UNIQ_MBR_ID) And
    158 (PHRMCY_CLM_FACT.FINL_CLM_KEY = PHRMCY_FINL_CLM_DMNSN.FINL_CLM_KEY) AND
    159 (PHRMCY_CLM_FACT.MBR_KEY = MBR_ID_DMNSN.MBR_KEY) And
    160 (PHRMCY_CLM_FACT.BNFT_KEY = MBR_BNFT_DMNSN.BNFT_KEY) And
    161 (PHRMCY_CLM_FACT.DRUG_KEY = DRUG_DMNSN.DRUG_KEY) And
    162 (PHRMCY_FINL_CLM_DMNSN.CLM_ORGN_CD IN ('M','A')) AND
    163 (PHRMCY_CLM_FACT.LAST_SRVC_DT BETWEEN &q.&fdos.&q and &q.&ldos.&q)
    164 );
    ERROR: ORACLE prepare error: ORA-00904: "PHRMCY_CLM_FACT"."LAST_SRVC_DT": invalid identifier. SQL statement: SELECT
    mid.UNIQ_MBR_ID as uniq_mrb_id, blpr.mrb_id.mbr_id, pd.PRVDR_SPCLTY_DESC as pcp_spc, pcf.LAST_SRVC_DT as
    rx_date, dd.BRAND_NAME as brand, dd.GNRC_NAME as generic, dd.AHFS_THRPTC_CLS_CD as ahfs_cd,
    dd.AHFS_THRPTC_CLS_DESC as ahfs_dsc, dd.LABEL_NAME as lbl, dd.STRNGTH_NUM as strngth, dd.STRNGTH_UNIT_DESC as
    unt, dd.SPECF_THRPTC_CLS_CD as spc_tx_cls_cd, dd.SPECF_THRPTC_CLS_DESC as spc_tx_cls_dsc, dd.GCN_NUM as gcn,
    pcf.PRSCRPTN_NUM as rx_num, SUM(pcf.INGRDNT_AMT) as rx_ingrd, SUM(pcf.PD_AMT) as rx_paid, SUM(pcf.UNIT_SRVC_CNT)
    as rx_cnt, SUM(pcf.DSPNSD_QTY) as rx_qty, SUM(pcf.DAY_SUPLY_CNT) as rx_day FROM PHRMCY_CLM_FACT pcf,
    MBR_ID_DMNSN mid, DRUG_DMNSN dd, PRVDR_DMNSN pd, BIPLR_UP_V1 blpr WHERE (BIPLR_UP_V1.mbr_id =
    MBR_ID_DMNSN.UNIQ_MBR_ID) And (PHRMCY_CLM_FACT.FINL_CLM_KEY = PHRMCY_FINL_CLM_DMNSN.FINL_CLM_KEY) AND
    (PHRMCY_CLM_FACT.MBR_KEY = MBR_ID_DMNSN.MBR_KEY) And (PHRMCY_CLM_FACT.BNFT_KEY = MBR_BNFT_DMNSN.BNFT_KEY) And
    (PHRMCY_CLM_FACT.DRUG_KEY = DRUG_DMNSN.DRUG_KEY) And (PHRMCY_FINL_CLM_DMNSN.CLM_ORGN_CD IN ('M','A')) AND
    (PHRMCY_CLM_FACT.LAST_SRVC_DT BETWEEN '01JUN2007' and '30SEP2009').
    NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
    165 execute (drop table biplr_up_v1) by rosdwp;
    NOTE: Statement not executed due to NOEXEC option.
    166 disconnect from rosdwp;
    NOTE: Statement not executed due to NOEXEC option.
    167 quit;
    NOTE: The SAS System stopped processing this step because of errors.
    NOTE: PROCEDURE SQL used (Total process time):
    real time 0.24 seconds
    cpu time 0.02 seconds
    168
    Edited by: user12142482 on Nov 2, 2009 4:02 PM

  • Sql Profile Error ORA-13786: missing SQL text of statement object "1"

    Hi,
    I am testing a Sql Profile sample executiion with the hint result_cache for faster execution of a query. I have created a tuning task but got no recommendations. But when i tried to create sql profile with the pkg dbms_sqltune.accept_sql_profile i am getting an error. The db version is 11.1.0.7. Given below is the sql and the output.
    Please let me know if you have any suggestions.
    -- Accept SQL Profiles
    SET SERVEROUTPUT ON
    DECLARE
    l_sql_tune_task_id VARCHAR2(2000);
    BEGIN
    l_sql_tune_task_id := DBMS_SQLTUNE.accept_sql_profile (
    task_name => 'Permissionstab_tuning_task',
    name => 'Permissionstab_profile',
    description => 'sql profile for Permissionstab_profile',
    force_match => TRUE);
    --profile_type => DBMS_SQLTUNE.PX_PROFILE);
    DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    END;
    with profile_type commented out output
    DECLARE
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "Permissionstab_tuning_task"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 11049
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 30
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 5836
    ORA-06512: at line 4
    including profile_type
    profile_type => DBMS_SQLTUNE.PX_PROFILE);
    ERROR at line 9:
    ORA-06550: line 9, column 35:
    PLS-00302: component 'PX_PROFILE' must be declared
    ORA-06550: line 4, column 5:
    PL/SQL: Statement ignored
    Given below is the complete script and output
    CONN / AS SYSDBA
    GRANT CREATE ANY SQL PROFILE TO ariba;
    GRANT DROP ANY SQL PROFILE TO ariba;
    GRANT ALTER ANY SQL PROFILE TO ariba;
    conn ariba/****;
    EXEC DBMS_SQLTUNE.DROP_TUNING_TASK('Permissionstab_tuning_task');
    -- Tuning task created for a manually specified statement.
    DECLARE
    l_sql VARCHAR2(4000);
    l_sql_tune_task_id VARCHAR2(1000);
    BEGIN
    l_sql := 'SELECT /*+ result_cache */ rootId, pe_DefaultingSetBits, pe_Version, pe_Creator, pe_Active, pe_AdapterSource, pe_AdapterFlag, pe_PartitionN
    umber, '||
    'pe_PurgeState, pe_TimeCreated, pe_TimeUpdated, pe_CommonId, pe_ServerVersion, pe_UniqueName, pe_Name, mls_DefaultingSetBits, '||
    'mls_PrimaryString, mls_MaxTranslationID, mls_Translations, mls_PrimaryStringLanguageID, mls_LocalizationKey, pe_Description, '||
    'mls0_DefaultingSetBits, mls0_PrimaryString, mls0_MaxTranslationID, mls0_Translations, mls0_PrimaryStringLanguageID, '||
    'mls0_LocalizationKey, pe_Created, pe_Modified '||
    'FROM PermissionTab '||
    'where pe_UniqueName = '||''''||'PurchasingAgent'||''''||' '||
    'and ( pe_PurgeState = :1 ) AND pe_PartitionNumber = :2';
    l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
    sql_text => l_sql,
    user_name => 'ARIBA',
    scope => DBMS_SQLTUNE.scope_comprehensive,
    time_limit => 60,
    task_name => 'Permissionstab_tuning_task',
    description => 'Tuning task for an Permissionstab query.');
    DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    END;
    EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'Permissionstab_tuning_task');
    SELECT task_name, status FROM dba_advisor_log WHERE owner = 'ARIBA';
    SET LONG 10000;
    SET PAGESIZE 1000
    SET LINESIZE 200
    SELECT DBMS_SQLTUNE.report_tuning_task('Permissionstab_tuning_task') AS recommendations FROM dual;
    SET PAGESIZE 24
    -- Accept SQL Profiles
    SET SERVEROUTPUT ON
    DECLARE
    l_sql_tune_task_id VARCHAR2(2000);
    BEGIN
    l_sql_tune_task_id := DBMS_SQLTUNE.accept_sql_profile (
    task_name => 'Permissionstab_tuning_task',
    name => 'Permissionstab_profile',
    description => 'sql profile for Permissionstab_profile',
    force_match => TRUE,
    profile_type => DBMS_SQLTUNE.PX_PROFILE);
    DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    END;
    11:17:17 SYS@FLBUYPM 02-APR-13> @sql_profile_result_cache.sql
    Connected.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Connected.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    TASK_NAME STATUS
    Permissionstab_tuning_task COMPLETED
    RECOMMENDATIONS
    GENERAL INFORMATION SECTION
    Tuning Task Name : Permissionstab_tuning_task
    Tuning Task Owner : ARIBA
    Workload Type : Single SQL Statement
    Scope : COMPREHENSIVE
    Time Limit(seconds): 60
    Completion Status : COMPLETED
    Started at : 04/02/2013 11:17:20
    Completed at : 04/02/2013 11:17:20
    Schema Name: ARIBA
    SQL ID : 2y6yar7r71tj1
    SQL Text : SELECT /*+ result_cache */ rootId, pe_DefaultingSetBits,
    pe_Version, pe_Creator, pe_Active, pe_AdapterSource,
    pe_AdapterFlag, pe_PartitionNumber, pe_PurgeState,
    pe_TimeCreated, pe_TimeUpdated, pe_CommonId, pe_ServerVersion,
    pe_UniqueName, pe_Name, mls_DefaultingSetBits,
    mls_PrimaryString, mls_MaxTranslationID, mls_Translations,
    mls_PrimaryStringLanguageID, mls_LocalizationKey,
    pe_Description, mls0_DefaultingSetBits, mls0_PrimaryString,
    mls0_MaxTranslationID, mls0_Translations,
    mls0_PrimaryStringLanguageID, mls0_LocalizationKey, pe_Created,
    pe_Modified FROM PermissionTab where pe_UniqueName =
    'PurchasingAgent' and ( pe_PurgeState = :1 ) AND
    pe_PartitionNumber = :2
    ADDITIONAL INFORMATION SECTION
    - At least one important bind value was missing for this sql statement. The
    accuracy of the advisor's analysis may depend on all important bind values
    being supplied.
    EXPLAIN PLANS SECTION
    1- Original
    Plan hash value: 778402129
    | Id | Operation | Name | Rows | Byte
    s | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 29
    8 | 1 (0)| 00:00:01 |
    | 1 | RESULT CACHE | 9qsg9vxnpk5r13h9gb3wcgujg1 | |
    | | |
    |* 2 | TABLE ACCESS BY INDEX ROWID| PERMISSIONTAB | 1 | 29
    8 | 1 (0)| 00:00:01 |
    |* 3 | INDEX UNIQUE SCAN | ARIBAINDEX341 | 1 |
    | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("PE_PURGESTATE"=TO_NUMBER(:1))
    3 - access("PE_UNIQUENAME"='PurchasingAgent' AND "PE_PARTITIONNUMBER"=TO_NUMB
    ER(:2))
    Result Cache Information (identified by operation id):
    1 - column-count=30; dependencies=(ARIBA.PERMISSIONTAB); attributes=(single-r
    ow); parameters=(nls, :1, :2); name="SELECT /*+ result_cache */ rootId, pe_Defau
    ltingSetBits, pe_Version, pe_Creator, pe_Active, pe_AdapterSource, pe_AdapterFla
    g, pe"
    DECLARE
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "Permissionstab_tuning_task"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 11049
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 30
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 5836
    ORA-06512: at line 4
    11:17:20 ARIBA@FLBUYPM 02-APR-13>
    profile_type => DBMS_SQLTUNE.PX_PROFILE);
    ERROR at line 9:
    ORA-06550: line 9, column 35:
    PLS-00302: component 'PX_PROFILE' must be declared
    ORA-06550: line 4, column 5:
    PL/SQL: Statement ignored
    Edited by: 997562 on Apr 2, 2013 8:34 AM

    Hi Experts,
    i too getting this error while attaching the tuning task to the sql profiler, below are the details, appreciate any help on this.
    SQL> SQL> VAR profile_name VARCHAR2(30);
    SQL> BEGIN
       :profile_name := DBMS_SQLTUNE.ACCEPT_SQL_PROFILE(task_name => 'sql_tuning_task');
    END;
    /  2    3    4
    BEGIN
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "sql_tuning_task"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16442
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
    ORA-06512: at line 2
    SQL> select banner from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production

Maybe you are looking for

  • Report date 2007.10.31 is invalid for this report(S_ALR_87011963)

    Hi,    We checked 2007/10 Asset balance via report(S_ALR_87011963). We get the following error. Could you pls let me know why we can't run 2007/10 Asset balance?Thanks. ======================= Report date 2007.10.31 is invalid for this report Message

  • How do I get rid of IMatch and ICloud and go back to manual syncing?

    I often find myself with little or no service living in a rural town or working outside and this always having to download a song every time I want to hear it is a pain in the @$$. I just want to go back to the ways of the 3GS and have to Sync up son

  • How do I connect to wi-fi previous network ?

    I am having trouble re-connecting to my network. How do I regain access to my secure network which was available only a few hours ago? It seems to have disappeared on us.

  • Database Updation and Insertion using Modify Statement

    Hi All, I am using Modify statment for data insertion and updation MODIFY zmpit_ven_bgg_rg FROM TABLE t_ven_bgg . But I am getting error The type of the database table and work area (or internal table) "T_VEN_BGG" are not compatible. I have defined m

  • Unable to order prints from iPhoto online

    After I download photos from my camera to iPhoto and attempt to upload to Walgreens, Wal-Mart, Costco, etc., I receive an error indicating that the resolution is too low. I've recently converted over to the mac from PC and didn't have this problem be