Stored procedure accessing system table

I am using a stored procedure to access tables in other schemas. I pass the schema and table name as parameters to the stored procedure. I use these two variables to create a cursor of column names from all_tab_columns table. When I access all_tab_columns from SQL Plus, the right result is returned. When the procedure executes the same select statement in the same schema and using the same search criteria, the table I am looking for can not be found.
Example:
select count(column_name) from all_tab_columns where owner = 'MYADM' and table_name = 'MYTABLE';
This will return the correct number of columns when executed in SQL Plus.
cursor mycursor is
select count(column_name) from all_tab_columns where owner = p_owner and table_name = p_table;
This cursor, when used in my stored procedure, finds nothing when p_owner is set to MYADM and p_table is set to MYTABLE.
I've tried granting all permissions to the calling schema with no positive results. I am aware that the calling schema is not required to have the necessary privileges when a procedure accesses data in other schemas. So I don't understand what the problem is. I greatly appreciate anyone's help.
Cyrus

Hi,
try this, probaly this'll give you the desired output :
Procedure Column_cnt
( p_owner IN varchar2,
p_table IN varchar2 ) IS
cursor c1 is
select count(column_name) col_cnt from all_tab_columns where owner = upper(p_owner)
and table_name = upper(p_table);
BEGIN
for i in c1 loop
dbms_output.put_line(i.col_cnt);
end loop;
END;
Now from SQLPLUS type :
exec column_cnt('OWNER','TABLE_NAME')
Note: parameters are in Varchar2, so they should be within quotes.
But do you really want a cursor to store a single row, single column value, cursors are for fetching multiple rows/columns that means for a result set.
if you want to get only count(column_name) then you could re-write the procedure like this way :
Procedure Column_cnt
( p_owner IN varchar2,
p_table IN varchar2 ) IS
col_cnt number;
BEGIN
select count(column_name) into col_cnt from all_tab_columns where owner = upper(p_owner)and table_name = upper(p_table);
dbms_output.put_line(i.col_cnt);
END;
Thanks
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by cyrus eslami ([email protected]):
I am compiling and invoking the procedure in a schema that has the correct privileges granted to it.
-Cyrus<HR></BLOCKQUOTE>
null

Similar Messages

  • Stored procedures for User Tables

    Can somebody please help me with this matter?. I need to add stored procedures for user tables. Is there any way  of doing so?.
    Thanks in advance.
    Ernesto.

    Ernesto,
    You have posted multiple threads for the same question.  Please check the other thread and close this one:
    Stored procedures in User Tables
    Thanks,
    Gordon

  • Stored procedure for creating tables

    Is it possible to create a stored procedure which only contains create tables? I prepare everything on an environment and want to transfer everything, except the data, on anothe environment. Therfore I thought of an stored procedure which does everything automatically. Additional I want to create a package which contains all necessary stored procedures (which are already finished). Is it better to insert the create-table-lines in the package?
    Thanks for your help!

    PL/SQL is not the appropriate tool for this.
    What does Oracle RDBMS products like Apex use to install? SQL*Plus scripts. A combination of SQL code and anonymous PL/SQL blocks.
    This is also what we use to install any one of a dozen Oracle systems we have developed.. it is as simple as running 'sqlplus "/ as sysdba" @installer <tablespace> <schema> <password>'.
    Trying to do this type of thing in PL/SQL... lots of disadvantages, lots of complexities, and very little (if any) benefit.

  • Query in Stored Procedure accessing another schema

    Hi - this is going to sound kind of strange and even i can't come up with an explanation. My JDK 1.1.7 applet uses a type 4 JDBC thin driver (i think v 8.04.06) to access an Oracle 7.3.4 database. We also have a link with full grants and synonymns to another Oracle schema in an Oracle 8 database. Has never been a problem - we can access anything we need to through queries or stored procedures from either of these databases.
    So, i have a new stored procedure that needs to be called through JDBC that queries a table in the Oracle 8 database. For some reason, whenever i execute this stored procedure from java it hangs on this query and the instance needs to be restarted. If i execute that same stored procedure from SQL Plus, it runs fine.
    I tried a little test. I put a straight query in my java code that goes directly to that table (no stored procedure involved). It runs great through java!
    is this weird or what? my dbas have checked out all privelages and it seems that i have access to everything i could possibly need.
    If anyone has any suggestions i would love to hear them.
    thanks for your help...
    Lori - [email protected]
    null

    You can only access an object in another user's schema if you either:
    (a) Specify the 'other' schema name explicitly: SCHEMA.OBJECT
    (b) A synonymn has been created to access the object: CREATE SYNONYM OBJECT FOR SCHEMA.OBJECT.
    The user requiring the synonym should create it, or the user owning the object can create a PUBLIC synonym, if they have the authority.
    To check my hypothesis, try typing 'DESCRIBE procedure_name' from SQL*Plus as both users.

  • Expose Stored Procedure with Dynamic Table Parameters

    Hi,
    I know Oracle 11g allows access via web service to all stored procedures.
    The basic idea of what we intend is to create groups of users.
    What I need, and I'm not sure if it's possible, is to expose a PLSQL that has the group's attributes and an xml:sequence of users that belong to that group. The procedure would be something like this:
    TYPE user IS RECORD (
      uid   NUMBER,
      name   VARCHAR2(100),
    TYPE users IS TABLE OF user INDEX BY BINARY_INTEGER;
    PROCEDURE add_group(g_name IN VARCHAR2(100), g_users IN users, ...) IS
    BEGIN
    END;
    The Procedure will be called from a BPEL Process as if it was a web service.
    Q:
    - Can this be done?
    - How will it map users?
    Thanks in advance :-)

    So, being as we don't have Oracle DB 11g that exposes WebServices natively to access the stored procedures, what would be the best way to access the stored procedure like a web service?
    What we are thinking of doing now is http://guidoschmutz.wordpress.com/2010/08/08/oracle-service-bus-11g-and-db-adapter-a-different-more-integrated-approach/
    Thanks again!

  • Stored Procedure uses Temp Tables

    C#, asp.net app.
    I have a stored procudure that outputs data to temp tables. The data in these tables is only there for the life of that connection. The stored procedure does NOT return data.
    Options I see so far:
    1) If I open a connection and execute the stored procudure, how can I get crystal to use the SAME connection object?
    2) Can I get crystal to call the stored procedure for me first (but remember, it doesn't use the sp as the actual data source). Would I still be able to supply parameters to the SP?
    3) I guess I could do everything myself, even load all the data out of the temp tables into local datasets. And then supply the datasets to the tables. I tried this and I called SetDataSource on all my tables but then it looks like it still tried to go to the server again as I got a login screen.

    Hello Happy,
    No, Crystal does not have any access to those temp tables. They are locked by the owner who made the call and we have no API available in .NET that you can ride on to get access. Unless you can figure out a way at runtime to give full permission to the temp table then CR can use it. You just need to set the datasource to the temp table name at runtime. You will need to create the table so a report can be designed off it first but once done as long as the structure doesn't change the report will continue to work.
    Other options are as you have tried using data sets. Another option is to export that data into a database so CR has access to it rather than using temp tables. Once the report is done you can use MS API's to delete all rows of data.
    Thank you
    Don

  • OBIEE execute stored procedure to load tables before running report

    Hi..
    I want to execute a stored procedure to load database tables before running a report in OBIEE .
    I need to pass 2 parameters to the stored procedure which loads into tables.
    In the Connection Pool --> Connection Script Tab --> Execute before query, I wrote the below query using the repository variables VAR1 & VAR2 to execute the
    DECLARE VAR1 number; VAR2 number;
    BEGIN
    schema_name.package_name1.package_body('VALUE OF(VAR1)', 'VALUE OF(VAR2)'); COMMIT;
    schema_name.package_name2.package_body('VALUE OF(VAR1)', 'VALUE OF(VAR2)'); COMMIT;
    END;
    I am receiving the following error to declare the schema_name.package_name
    +++Administrator:2a0000:2a0004:----2010/06/21 14:29:00
    -------------------- Sending query to database named ACBS-OCC (id: <<49419>>):
    BEGIN schema_name.package_name1.package_body1('VALUE OF(VAR1', 'VALUE OF(VAR2'); COMMIT; schema_name.package_name2.package_body2('VALUE OF(VAR1)', 'VALUE OF(VAR2)'); COMMIT;END;
    +++Administrator:2a0000:2a0004:----2010/06/21 14:29:00
    -------------------- Query Status: Query Failed: [nQSError: 16001] ODBC error state: S1000 code: 6550 message: [Oracle][ODBC][Ora]ORA-06550: line 1, column 7:
    PLS-00201: identifier 'SCHEMA_NAME.PACKAGE_NAME1' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ORA-06550: line 1, column 93:
    PLS-00201: identifier 'SCHEMA_NAME.PACKAGE_NAME2' must be declared
    ORA-06550: line 1, column 93:
    PL/SQL: Statement ignored.
    [nQSError: 16015] SQL statement execution failed.
    Please suggest how to declare and execute the stored procedure.
    Thanks in advance.

    Hi,
    I know that any Function / Procedure needs to be called using a EVALUATE function in OBIEE.
    Thanks,
    Vijay

  • Calling a stored procedure with a table of custom types as a out parameter

    Hi,
    I'm trying to use toplink 11.1.1.0.0 to call a stored procudure with 4 in paramrs and a single out parameter of type gsearch_type which is a userdefined type defined as below
    CREATE or replace TYPE search_object as object (mdlnumber varchar2(12), hit clob);
    create or replace type gsearch_type as table of search_object;
    Is it possible to get the return value from this stored procedure using toplink.
    Thanks in advance for any help.
    - Sunil

    Currently TopLink can't directly handle that kind of output parameter.
    As a workaround you would need a wrapper for the stored procedure - it could be either another stored procedure or an anonymous block which would return the components of the complex parameter as several simple parameters.

  • Java call stored procedure with nested table type parameter?

    Hi experts!
    I need to call stored procedure that contains nested table type parameter, but I don't know how to handle it.
    The following is my pl/sql code:
    create or replace package test_package as
    type row_abc is record(
    col1 varchar2(16),
    col2 varchar2(16),
    col3 varchar2(16 )
    type matrix_abc is table of row_abc index by binary_integer;
    PROCEDURE test_matrix(p_arg1 IN VARCHAR2,
    p_arg2 IN VARCHAR2,
    p_arg3 IN VARCHAR2,
    p_out OUT matrix_abc
    END test_package;
    create or replace package body test_package as
    PROCEDURE test_matrix(p_arg1 IN VARCHAR2,
    p_arg2 IN VARCHAR2,
    p_arg3 IN VARCHAR2,
    p_out OUT matrix_abc
    IS
    v_sn NUMBER(8):=0 ;
    BEGIN
    LOOP
    EXIT WHEN v_sn>5 ;
    v_sn := v_sn + 1;
    p_out(v_sn).col1 := 'col1_'||to_char(v_sn)|| p_arg1 ;
    p_out(v_sn).col2 := 'col2_'||to_char(v_sn)||p_arg2 ;
    p_out(v_sn).col3 := 'col3_'||to_char(v_sn)||p_arg3 ;
    END LOOP ;
    END ;
    END test_package ;
    My java code is following, it doesn't work:
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    Connection con = DriverManager.getConnection
    ("jdbc:oracle:thin:@10.16.102.176:1540:dev", "scott", "tiger");
    con.setAutoCommit(false);
    CallableStatement ps = null;
    String sql = " begin test_package.test_matrix( ?, ? , ? , ? ); end ; ";
    ps = con.prepareCall(sql);
    ps.setString(1,"p1");
    ps.setString(2,"p2");
    ps.setString(3,"p3");
    ps.registerOutParameter(4,OracleTypes.CURSOR);
    ps.execute();
    ResultSet rset = (ResultSet) ps.getObject(1);
    error message :
    PLS-00306: wrong number or types of arguments in call to 'TEST_MATRIX'
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    Regards
    Louis

    Louis,
    If I'm not mistaken, record types are not allowed. However, you can use object types instead. However, they must be database types. In other words, something like:
    create or replace type ROW_ABC as object (
    col1 varchar2(16),
    col2 varchar2(16),
    col3 varchar2(16 )
    create or replace type MATRIX_ABC as table of ROW_ABC
    /Then you can use the "ARRAY" and "STRUCT" (SQL) types in your java code. If I remember correctly, I recently answered a similar question either in this forum, or at JavaRanch -- but I'm too lazy to look for it now. Do a search for the terms "ARRAY" and "STRUCT".
    For your information, there are also code samples of how to do this on the OTN Web site.
    Good Luck,
    Avi.

  • Stored procedure with temp table creation inside and using it

    I want to create a temp table inside a stred procedure and make use of it . I want perform some delete statements based on select statemets .An I want to drop the table at the end .
    When I tried to create a table inside the stored procedure using exxecute immediate statement ,.
    sql_stmt := 'CREATE GLOBAL TEMPORARY TABLE pattern_str_temp as select * from pattern_structure';
         EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE pattern_str_temp as select * from woc_pattern_structure' ;
    Then my select statements that contain this table do not identify the table name.
    I got compilor error when I use it in hte stored procedure in the select statement .Then I did like this-
    WHENEVER SQLERROR CONTINUE
    DROP TABLE pattern_str_temp;
    CREATE TABLE pattern_str_temp AS SELECT * FROM pattern_structure ;
    COMMIT;
    CREATE OR REPLACE PACKAGE BODY Woc_Delete_Model_Data
    AS
    NAME: Woc_Delete_Model_Data
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 11/01/2008 gtutika 1. Deletes given Product Model
    PROCEDURE deleteCategory(p_product_model IN varchar2,
                   p_request_status OUT VARCHAR2,
                   p_err_mesg OUT VARCHAR2
    IS
    l_category VARCHAR2(200);
    l_count NUMBER;
    CURSOR getAttribute IS
         SELECT Category_Name
         FROM
    Woc_Attribute_Category
    WHERE Attribute_Name in
    (SELECT Child_Name FROM pattern_structure
    WHERE Child_Type = 'Attribute' and product_Model_Name = p_product_model)
    FOR UPDATE;
    BEGIN
         DBMS_OUTPUT.ENABLE(1000000);
         --dbms_output.put_line('START-Inside DeleteCategory Procedure .........');
         --sql_stmt := 'CREATE GLOBAL TEMPORARY TABLE pattern_str_temp as select * from pattern_structure';
         --EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE pattern_str_temp as select * from pattern_structure' ;
         OPEN getAttribute ;
    LOOP
         FETCH getAttribute INTO l_category ;
         EXIT WHEN getAttribute%NOTFOUND;
         l_count := Is_Category_Used(p_product_model , l_category);
    IF (l_count=0) THEN
         DELETE FROM WOC_ATTRIBUTE_CATEGORY where CATEGORY_NAME = l_category;
         DELETE from woc_item_category
         where CATEGORY_NAME = l_category;
         DELETE FROM WOC_CATEGORY WHERE CATEGORY_NAME = l_category;
    END IF;
         END LOOP;
         --(getAttribute%ROWCOUNT);
         CLOSE getAttribute;
         --dbms_output.put_line('END-Inside DeleteCategory Procedure .........');
    EXCEPTION
         WHEN OTHERS THEN
         dbms_output.put_line(SQLERRM);
              p_err_mesg := 'ERROR IN CUSOR';
              --dbms_output.put_line('ERROR in CUSOR');
              ROLLBACK;
    END;
    FUNCTION Is_Category_Used(p_product_model IN varchar2 , p_category IN Varchar2)
         RETURN NUMBER IS
         l_count NUMBER;
         l_attribute VARCHAR2(40);
         l_pattern varchar2(30);
         CURSOR getAttribute IS
         SELECT attribute_Name from
         WOC_ATTRIBUTE_CATEGORY WHERE category_name = p_category and Attribute_Name in
         (Select Child_Name from pattern_str_temp
         where child_type = 'Attribute' and product_Model_Name = p_product_model);
    BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
         SELECT count(*) into l_count from
         WOC_ATTRIBUTE_CATEGORY WHERE category_name = p_category and Attribute_Name in
         (Select Child_Name from pattern_str_temp
    where child_type = 'Attribute' and product_Model_Name <> p_product_model);
         OPEN getAttribute;
    LOOP
         FETCH getAttribute INTO l_attribute;
         EXIT WHEN getAttribute%NOTFOUND;
         DELETE FROM pattern_str_temp WHERE Product_Model_Name=p_product_model
         and child_type = 'Attribute' and child_Name= l_attribute;
         END LOOP;
         CLOSE getAttribute;
         RETURN l_count;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(SQLERRM);
              --dbms_output.put_line('ERROR in CUSOR');
              ROLLBACK;
    END;
    PROCEDURE delete_batch_woc_model(p_product_model IN VARCHAR2,p_flag IN VARCHAR2,
    p_err_mesg OUT VARCHAR2)
         IS
         p_request_status VARCHAR2(30);
    BEGIN
         deleteCategory(p_product_model,p_request_status ,p_err_mesg );
    EXCEPTION WHEN OTHERS THEN
         dbms_output.put_line(SQLERRM);
              p_err_mesg := 'ERROR IN CUSOR';
              dbms_output.put_line('ERROR in CUSOR');
              ROLLBACK;
    END;
    END Woc_Delete_Model_Data;
    --drop table pattern_str_temp ;
    SHOW ERRORS;
    But once the data is deleted , the data in the temp table is deleted when I load the data and try to delete it agian since I have no data in temp table ,the data is not deleted .So I need to create the temp table every time the stored procedure is called ,delete accordingly and drop the table at the end .
    Please suggest how to do it.
    Thanks.

    I'm not sure I understand what you're attempting to do...
    What is the benefit of a temporary table that stores the same set of data that is in the master table? Why not just
    DELETE FROM child_table1
    WHERE foreign_key IN (
        SELECT primary_key
          FROM master_table
         WHERE some_condition);
    DELETE FROM child_table2
    WHERE foreign_key IN (
        SELECT primary_key
          FROM master_table
         WHERE some_condition);
    DELETE FROM child_table30
    WHERE foreign_key IN (
        SELECT primary_key
          FROM master_table
         WHERE some_condition);
    DELETE FROM master_table
    WHERE some_condition;or
    FOR x IN (SELECT * FROM master_table WHERE some_condition)
    LOOP
      DELETE FROM child_table1 WHERE foreign_key = x.primary_key;
      DELETE FROM child_table2 WHERE foreign_key = x.primary_key;
      DELETE FROM child_table30 WHERE foreign_key = x.primary_key;
      DELETE FROM master_table WHERE primary_key = x.primary_key;
    END LOOP;Justin

  • How to call a stored procedure that has Table Of data types in VB6?

    Hi everyone,
    I need to call a stored procedure that has a Table Of data type as an input parameter (possibly even several Table Of input parameters). I can't seem to find any example of how to do this in VB6 using ODBC. Is this even possible?
    Thanks you!
    Steve

    Thanks,
    but I need to test stored procedures that uses type defined in the package.
    e.g.
    if I have s.p.
    PROCEDURE get_risultati_squadra
    ( in_squadra IN VARCHAR2,
    out_serie OUT tab_varchar2_5,
    out_tiporisultato OUT tab_varchar2_5,
    out_n_giornata OUT tab_varchar2_5,
    out_squadre OUT tab_varchar2_200,
    out_risultato OUT tab_varchar2_10,
    out_marcatore OUT tab_varchar2_50,
    out_punti OUT tab_varchar2_3,
    out_rimbalzista OUT tab_varchar2_50,
    out_rimbalzi OUT tab_varchar2_3,
    out_esito OUT tab_varchar2_2);
    I have to define every type external to the package, in this case five new TYPE !!
    Is there another way to solve this problem?
    Thanks

  • Problem using stored procedure to populate table for report

    I have a report that in one instance the user wants the quantity data pulled from a smaller subset of data. My thought was to create a global temporary table and then use a stored procedure to populate this table then pass the table name in a lexical that contains the table name. So my query in the report stays the same except for the lexical table name. This all seems to work except for the procedure populating the table. I thought it might be the global temporary table so I created a real table. When I run the procedure from the command prompt the table gets populated. When I run the procedure in the before report trigger I get nothing. When I run the procedure from the command line and leave the data, then run the report I get updated data in the table, but nothing returned to the report. Any ideas, questions, solutions?
    Thanks
    Andy Hendrickson

    Hi Andy Hendrickson,
    Let me understand your problem correctly.
    1) When you run the procedure from command prompt the table gets populated. It is clear.
    2)When you run the procedure in before report trigger you get nothing. Let us analyze why but for now it is clear.
    3) What you mean by "I run the procedure from the command line and leave the data, then run the report I get updated data in the table, but nothing returned to the report."
    Can you please explain a bit more and also update code snippets of what you are using ?
    Thanks,
    Vinod
    Oracle Reports Team

  • Stored Procedure to create table for PdO Change Log

    Hi Experts,
    I have read in the forums that the only way to get a Change Log was to create a Stored Prodedure and create a new Table that is populated with the Change when ever a User update a Production Order.
    I started on this Stored Procedure and have hit a wall on a error. I'm fairly new to queries...
    Here is what I have so far:
    if((@transaction_type = 'U')and(@object_type = '202'))
    BEGIN
    set @PdO = case @object_type
              INSERT INTO ChangeLogPdO2 (DocEntry, Status, ItemCode, PlannedQty, DueDate)
              SELECT T0.DocEntry, T0.Status, T0.ItemCode, T0.PlannedQty, T0.DueDate
              FROM OWOR T0      
              WHERE T0.DocEntry = @list_of_cols_val_tab_del
        END
    if(@PdO = 'true')
    begin
          select @error = 1
          select @error_message = N'My Error message'
    end
    I plan to add more columns, but only started with these. Also how do I put a time stamp on this?
    Thanks,
    Marli
    Edited by: Marli Schutte on Feb 3, 2010 7:09 PM

    Gordon,
    I created a new UDT named CLPdO.
    Then I did as you suggested and I get the error message 'Incorrect syntax near the keyword 'INSERT''.
    Here is how the Sotred Procedure now look:
    [code}
    if((@transaction_type = 'U')and(@object_type = '202'))
    BEGIN
    set @PdO = case @object_type
              INSERT INTO dbo@CLPdO (DocEntry, Status, ItemCode, PlannedQty, DueDate)
              SELECT T0.DocEntry, T0.Status, T0.ItemCode, T0.PlannedQty, T0.DueDate
              FROM OWOR T0      
              WHERE T0.DocEntry = @list_of_cols_val_tab_del
        END
    if(@PdO = 'true')
    begin
          select @error = 1
          select @error_message = N'My Error message'
    end
    Any help will be appreciated.
    Marli

  • How i can access system tables to know the indexes are properly done

    Hello Friends,
    I have created a table with partitions and a iindex on some columns ..
    Using system tables I want to find out whether the indexes are also having partitions implemented .
    Please let me know what might be the query using system tables.
    using the following query I can findout what all partitions are their in a particular table.
    SELECT FROM ALL_TAB_PARTITIONS ORDER BY TABLE_NAME, PARTITION_NAME;*
    I want the same on indexes ..
    CREATE TABLE X_FA_REV_MNTH_AGG
    X_FA_REV_MNTH_AGG_RK NUMBER(10) NOT NULL,
    X_AS_OF_DT DATE NOT NULL,
    FINANCIAL_ADVISOR_RK NUMBER(10) NOT NULL,
    FINANCIAL_ADVISOR_ID VARCHAR2(6 BYTE),
    X_FA_UNIV_PRODUCER_ID VARCHAR2(6 BYTE),
    X_REVENUE_TYPE_CD VARCHAR2(6 BYTE),
    X_MNTH_REV_AMT NUMBER(18,5),
    PROCESSED_DTTM DATE
    TABLESPACE KAW_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    NOLOGGING
    PARTITION BY RANGE (X_AS_OF_DT)
    PARTITION P200712 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200801 VALUES LESS THAN (TO_DATE(' 2008-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200802 VALUES LESS THAN (TO_DATE(' 2008-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200803 VALUES LESS THAN (TO_DATE(' 2008-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200804 VALUES LESS THAN (TO_DATE(' 2008-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200805 VALUES LESS THAN (TO_DATE(' 2008-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200806 VALUES LESS THAN (TO_DATE(' 2008-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200807 VALUES LESS THAN (TO_DATE(' 2008-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200808 VALUES LESS THAN (TO_DATE(' 2008-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200809 VALUES LESS THAN (TO_DATE(' 2008-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200810 VALUES LESS THAN (TO_DATE(' 2008-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200811 VALUES LESS THAN (TO_DATE(' 2008-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200812 VALUES LESS THAN (TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX XPKX_FA_REV_MNTH_AGG ON X_FA_REV_MNTH_AGG
    (X_AS_OF_DT, X_FA_REV_MNTH_AGG_RK, FINANCIAL_ADVISOR_RK)
    INITRANS 2
    MAXTRANS 255
    NOLOGGING
    LOCAL (
    PARTITION P200712
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200801
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200802
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200803
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200804
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200805
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200806
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200807
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200808
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200809
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200810
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200811
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P200812
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION PMAX
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    )NOPARALLEL;

    Try ALL_IND_PARTITIONS :)
    You should give the Reference Guide a read at http://tahiti.oracle.com for your Oracle version. It gives information for all views that you may or may not be aware of.

  • SQL Server system tables

    I am trying to convert a SQLServer 2000 database to Oracle 10g. One of the issues I am running into is the reference in a number of the stored procedures to system tables or procedures in the master database that SQLServer maintains:
    1. sysprocesses table: the sp accesses this table to find out session id and login time for the specific session. I am aware that session id can be mimicked by select sys_context('USERENV','SESSIONID'), but how about login time?
    2. Other procedures have references to sp_OACreate and sp_OADestroy etc that are extended procedures in the master db. The migration work-bench either does not detect them, or does not select them for conversion.
    If anybody has input on how these items can be resolved, I would really appreciate it. Thanks.

    I am trying to convert a SQLServer 2000 database to Oracle 10g. One of the issues I am running into is the reference in a number of the stored procedures to system tables or procedures in the master database that SQLServer maintains:
    1. sysprocesses table: the sp accesses this table to find out session id and login time for the specific session. I am aware that session id can be mimicked by select sys_context('USERENV','SESSIONID'), but how about login time?
    2. Other procedures have references to sp_OACreate and sp_OADestroy etc that are extended procedures in the master db. The migration work-bench either does not detect them, or does not select them for conversion.
    If anybody has input on how these items can be resolved, I would really appreciate it. Thanks.

Maybe you are looking for

  • Ipod Nano worked, now it's screwing up

    Ok, it worked fine. I picked it up this am, it's pretty new, I got it 2 mo's ago, and I turned it on and it just started running thru all my songs, like it was playing them for 1 sec ea. ,then the next, & so on. Then I put the earbuds in, & no noise

  • Reinstalled itunes and it still wont work

    tells me: Itunes was not installed correctly. Please re-install Itunes. Error 7 (Windows Error 126)

  • Export from Designer to Erwin. Is it possible?

    Hi all, I need to create a Data Model and send to my customer in a Erwin format (ER1), but I don't have a Erwin licence. Can I create this data model in a Oracle Designer, and export to a Erwin format? Tx, Everson

  • Files not saving on iCloud from computer

    I will create a document in iCloud from my Mac, and save it. When I check it on my Drive in the Finder though, there is an empty bar in the icon and will eventually say not downloaded, even though I am connected to wifi and my iCloud account accepts

  • Connections to apps

    Hi, Could someone please give me a way or probably a query to get the no of sessions to the Oracle applications system within a month and any other useful statistics on which I can report on Thanks as always