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?

Similar Messages

  • 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-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

  • 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/

  • 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 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)
    /

  • 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

  • ORA-22: invalid session id;access denied

    Hi,
    I am getting the error: ORA-22: invalid session id;access denied when i switch responsability in fron end;
    How to solve this anyone have any idea...
    Thanks,
    kr

    What is the application release?
    Was this working before? If yes, what changes have you done recently?
    Try to regenerate the forms and relink the application executable files via adadmin, bounce the application services, and check then.
    [Note: 150860.1 - ORA-1001 and ORA-22 Navigating in Forms or Switching Responsibility|https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=150860.1]

  • ORA-20515: Invalid session

    Hi
    I find following error messages in my glassfish.log file. The applications are running fine but don't know why this error comes every now and then in the log file only.
    Operating System: CentOS 6.4 64bit
    Oracle XE 11G
    Apex 4.2.3.00.08
    Apex Listener 2.0.5
    Glasfish 3.1.2.2
    I am also using Nginx as reverse proxy server.
    [#|2013-11-06T12:02:10.103-0500|SEVERE|glassfish3.1.2|null|_ThreadID=83;_ThreadName=Thread-2;|ORA-20515: Invalid session
    ORA-06512: at "APEX_040200.WWV_FLOW_DML", line 2045
    ORA-06512: at "APEX_040200.HTMLDB_UTIL", line 2659
    ORA-06512: at line 2
    java.sql.SQLException: ORA-20515: Invalid session
    ORA-06512: at "APEX_040200.WWV_FLOW_DML", line 2045
    ORA-06512: at "APEX_040200.HTMLDB_UTIL", line 2659
    ORA-06512: at line 2
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:205)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1043)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3713)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4755)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378)
      at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
    Any help will be much appreciated.
    Habib

    Hi Habib,
    this error can occur when requests to APEX_UTIL.GET_BLOB_FILE to download BLOB content on a DML Form page pass an invalid or expired session id. You should be able find accompanying requests to APEX_UTIL.GET_BLOB_FILE or HTMLDB_UTIL.GET_BLOB_FILE in your web server log files.
    Regards,
    Christian

  • 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

  • ORA-04043: object SYS.DELTA$SESSION does not exist

    Dear Friends
    after I import my data by using the follwoing import script :
    IMP JCC/P_MANUF FILE =JCC.DMP FULL
    and at the end give this message import has been imported succesfully without warning
    then when I use this script :
    SQL> SELECT TNAME FROM TAB
    2 WHERE TNAME LIKE 'USER_SESSION'
    3 /
    TNAME
    USER_SESSION
    The table USER_SESSION is exist but when I try to desplay the structure of the USER_SESSION by using this :
    SQL> DESC USER_SESSION
    ERROR:
    ORA-04043: object SYS.DELTA$SESSION does not exist
    and when I try to use the select statment as the following
    SELECT * FROM USER_SESSION
    ERROR at line 1:
    ORA-00980: synonym translation is no longer valid
    Waiting for your valuable answer.
    Best regards
    Jamil Alshaibani

    SQL> select * from V$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Linux: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL> !uname -a
    Linux KAD-VMWARE 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
    SQL> sho user
    USER is "SYS"
    SQL> select object_type,status from dba_objects where object_name = 'K_DRWDWN_GRP' and OWNER = 'SYS';
    no rows selected
    Is any thing wrong with my dictionary? please let me know if i missed anything?
    Edited by: sanora600 on Oct 16, 2010 12:34 AM

  • Automatic Row Processing fetch error (ORA-00936: missing expression)

    Hi there,
    I have a bit of a problem setting up automatic row processing. The Apex processing is causing an error, but I'm not sure what PL/SQL code is being run (obviously, I don't have access to the Apex code) and all I get is the error following:
    0.13: Processing point: AFTER_HEADER
    0.13: ...Process "Notes load": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:PUPIL_NOTE:P29_PUPIL_ID:PUPIL_ID:P29_ACHIEVEMENT_SET_ID:ACHIEVEMENT_SET_ID
    0.16: Show ERROR page...
    and then the following exception report on the page:
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Can anyone tell me how I can diagnose the problem?
    Many thanks,
    Robert
    Message was edited to change subject

    I am having a very similiar problem
    0.02: Fetch session state from database
    0.03: Branch point: BEFORE_HEADER
    0.03: Fetch application meta data
    0.03: Computation point: BEFORE_HEADER
    0.03: Processing point: BEFORE_HEADER
    0.04: ...DML_FETCH_ROW (BEFORE_HEADER) F|#OWNER#:JOH:P66_JOH_ID:JOH_ID
    0.49: Show ERROR page...
    0.50: Processing point: AFTER_ERROR_HEADER
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    JOH was a synonym (allowing other shemas to access the table) but @I delted those
    P66_JOH_ID is a DB column (which it wasnt)
    but I still get the error
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Any ideas how I can track this down?

Maybe you are looking for

  • Minimized apps not showing in dock

    I'm on Yosemite 10.10.3 and when I minimize my apps they don't show in the dock. For example if I have multiple Chrome accounts open and I minimize two of the three windows they collapse into the Chrome icon instead of appearing on the right side of

  • License not present. With the trail version only limited replays are allowed... Qtp automation

    Hi All.          We are doing QTP automation testing for our flex application. But after running all 30 tests it is showing License not present. with the trail version only limited replays are allowed. We are using  flex sdk 3.5 and flash builder 4 p

  • Background job for invoice

    Hello, Not sure if this is the correct forum to post this question, if not please advise which forum to post to. We are dividing our background invoicing up in three steps in three different jobs. 1) Create only R/3 invoice (done in several jobs run

  • Flipping the visibility of a screen element.

    how to change the visibility of a screen element if a specified condition is satisfied?

  • About octroi configuration

    pls anyone tell me about octroi cofiguration in sd CIN in TAXINN.