Identifing DMLs on specific database objects in procedure.

Hi,
I'm looking for oracle dictionary views or oracle procedure to identify which DML operations exist in a specific stored procedure. For example,
create or replace procedure test_proc as
i integer;
begin
select count(*) into i from test_table;
end;
I want to identify which DML operation exist on which database object in this test_proc procedure. The answer should be such as, TEST_TABLE ------> SELECT.
How I can solve this problem?
Thanks.

Tahnx Karthick, for response.
Yes, I can identify objects used in procedure (from DBA_DEPENDENCIES) but actual matter is identifing whitch dml operation will be done on this objects. I wrote an procedure, witch can show object name and dml name on this object. But my procedure is working with strings (read from DBA_SOURCE), so if there is any variable witch has same name with any table used in procedure, output will be wrong. And there is some applications witch can show object name and DML name on this this object used in a procedure. I am searching how they can achive it. If there is any data dictionary view stores this information?
Thanks

Similar Messages

  • Why two different users from same login group not able to access the database object(stored procedure)?

    I have SQL login group as "SC_NT\group_name" in server. There are multiple users using this login group to access database objects. User "A" can able to access db object(stored_procedure_1) from .net application. But when user "B"
    tried to access same db object(stored_procedure_1), its showing like
    Error: The EXECUTE permission was denied on the object 'stored_procedure_1', database 'test',schema 'dbo'. 
    Both the users are using windows authentication for access the objects. Could you suggest me the way to resolve this?
    Venkat

    Thanks for your response
    Erland Sommarskog....
    my stored procedure "stored_procedure_1"
    does not has any granted permissions to execute. But still user A
    able to execute the sp from UI, where user B not able to do it.  If any permission provided for a particular object, then only it will display in the above query whatever u have given.  
    Any other possibilities??
    Venkat G

  • How to pass xml data as objects into Database using store procedures

    Hi All,
         I don't have much knowledge on store procedure,can anybody help how to pass the xml as objects in Database using store procedure.
    My Requirement is I have a table with three fields EMPLOYEE is table name and the fields are EMP_ID,EMP_TYPE AND EMP_DET,I have to insert the employees xml data into corresponding fields in the table.
    Input Data
    <ROWSET>
       <ROW>
         <EMP_ID>7000</EMP_ID>
          <EMP_TYPE>TYPE1</EMP_TYPE>
         <EMP_DET>DEP</EMP_DET>
      <ROW>
      <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE2</EMP_TYPE>
        <EMP_DET>DEP2</EMP_DET>
    <ROW>
    <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE3</EMP_TYPE>
        <EMP_DET>DEP3</EMP_DET>
    <ROW>
    <ROWSET>
    So each row values has to inserted into resp fields in the table.
    Regards
    Mani

    Do you have a similar structure in your stored procedure ?
    In that case you can simply call the procedure from soa using db adapter and do a mapping to assign the values.

  • Database Object Dependencies - only goes one level deep

    I've run the Database Object Dependencies report and it appears that the report only shows the top level dependencies and not lower level ones. Am I running this report incorrectly or is there something I'm missing.
    For example, it displays the tables and views correctly but does not show any triggers that have been created for a specific table. Additionally, I didn't see any references to database links being used.
    version: 3.1.1.00.09
    thanks
    John
    Edited by: johurj on Dec 8, 2008 2:49 PM
    Edited by: johurj on Dec 8, 2008 2:53 PM
    Edited by: johurj on Dec 8, 2008 2:54 PM

    John,
    The report shows the immediate dependencies for the anonymous blocks and similar code snippets contained within the application components. It's just like if you did this:
    create table footab (n1 number)
    create trigger footrig before insert on footab for each row begin null; end;
    create or replace procedure fooproc
    as
    begin
    for c1 in (select n1 from footab) loop
    null;
    end loop;
    end;
    SQL> select referenced_name from all_dependencies where name='FOOPROC'
    2 /
    REFERENCED_NAME
    SYS_STUB_FOR_PURITY_ANALYSIS
    STANDARD
    FOOTAB
    SQL>
    The table FOOTAB is the only "real" object that the procedure FOOPROC has a dependency on. No mention of the trigger on the table.
    Additionally, I didn't see any references to database links being used.Yes, that would be a possible improvement to the report.
    Scott

  • How to get the List of Database Objects (Table/View) for a given APEX Page.

    Hi,
    I have an application and that consist of pages like page1,2,3,.....
    *1.* I want a report which can give me the list of all the Pages1,2,3,....
    I am using the following query to acheive this.... THIS IS FINE..
    select a.workspace, a.owner, a.application_name, b.page_id, b.page_name
      from apex_applications a,
           apex_application_pages b
    where a.workspace = b.workspace
       and a.application_id = b.application_id*2. Now, I want for each individual page*, the list all the database objects (tables/views), which that page is using.
    I am using ALL_DEPENDENCIES , but I am not getting the result.
    So, want to know if there any view/table, where I can get the Application Pages & there database object list...
    Thanks,
    Deepak

    Hari,
    Thanks for the response.
    The view APEX_APPLICATION_PAGE_DB_ITEMS will only give me the table name related to any Page Items defined to that page..It will not give me all the database objects..
    suppose we have a Page, having a report based on multiple tables and there is no Page items defined on that page, we will not have any value in this ....DB_ITEMS table. same thing if we have define some PL|SQL(using some table/view) in a Process, that will not be populated in .....DB_ITEMS table. I want some thing like all the database objects (table/views/function/procedure/.....) for a particular Page ID.
    Thanks,
    Deepak

  • Oracle 8i array DML operations with LOB objects

    Hi all,
    I have a question about Oracle 8i array DML operations with LOB objects, both CLOB and BLOB. With the following statement in mind:
    INSERT INTO TABLEX (COL1, COL2) VALUES (:1, :2)
    where COL1 is a NUMBER and COL2 is a BLOB, I want to use OCIs array DML functionality to insert multiple records with a single statement execution. I have allocated an array of LOB locators, initialized them with OCIDescriptorAlloc(), and bound them to COL2 where mode is set to OCI_DATA_AT_EXEC and dty (IN) is set to SQLT_BLOB. It is after this where I am getting confused.
    To send the LOB data, I have tried using the user-defined callback method, registering the callback function via OCIBindDynamic(). I initialize icbfps arguments as I would if I were dealing with RAW/LONG RAW data. When execution passes from the callback function, I encounter a memory exception within an Oracle dll. Where dvoid **indpp equals 0 and the object is of type RAW/LONG RAW, the function works fine. Is this not a valid methodology for CLOB/BLOB objects?
    Next, I tried performing piecewise INSERTs using OCIStmtGetPieceInfo() and OCIStmtSetPieceInfo(). When using this method, I use OCILobWrite() along with a user-defined callback designed for LOBs to send LOB data to the database. Here everything works fine until I exit the user-defined LOB write callback function where an OCI_INVALID_HANDLE error is encountered. I understand that both OCILobWrite() and OCIStmtExecute() return OCI_NEED_DATA. And it does seem to me that the two statements work separately rather than in conjunction with each other. So I rather doubt this is the proper methodology.
    As you can see, the correct method has evaded me. I have looked through the OCI LOB samples, but have not found any code that helps answer my question. Oracles OCI documentation has not been of much help either. So if anyone could offer some insight I would greatly appreciate it.
    Chris Simms
    [email protected]
    null

    Before 9i, you will have to first insert empty locators using EMPTY_CLOB() inlined in the SQL and using RETURNING clause to return the locator. Then use OCILobWrite to write to the locators in a streamed fashion.
    From 9i, you can actually bind a long buffer to each lob position without first inserting an empty locator, retrieving it and then writing to it.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by CSimms:
    Hi all,
    I have a question about Oracle 8i array DML operations with LOB objects, both CLOB and BLOB. With the following statement in mind:
    INSERT INTO TABLEX (COL1, COL2) VALUES (:1, :2)
    where COL1 is a NUMBER and COL2 is a BLOB, I want to use OCIs array DML functionality to insert multiple records with a single statement execution. I have allocated an array of LOB locators, initialized them with OCIDescriptorAlloc(), and bound them to COL2 where mode is set to OCI_DATA_AT_EXEC and dty (IN) is set to SQLT_BLOB. It is after this where I am getting confused.
    To send the LOB data, I have tried using the user-defined callback method, registering the callback function via OCIBindDynamic(). I initialize icbfps arguments as I would if I were dealing with RAW/LONG RAW data. When execution passes from the callback function, I encounter a memory exception within an Oracle dll. Where dvoid **indpp equals 0 and the object is of type RAW/LONG RAW, the function works fine. Is this not a valid methodology for CLOB/BLOB objects?
    Next, I tried performing piecewise INSERTs using OCIStmtGetPieceInfo() and OCIStmtSetPieceInfo(). When using this method, I use OCILobWrite() along with a user-defined callback designed for LOBs to send LOB data to the database. Here everything works fine until I exit the user-defined LOB write callback function where an OCI_INVALID_HANDLE error is encountered. I understand that both OCILobWrite() and OCIStmtExecute() return OCI_NEED_DATA. And it does seem to me that the two statements work separately rather than in conjunction with each other. So I rather doubt this is the proper methodology.
    As you can see, the correct method has evaded me. I have looked through the OCI LOB samples, but have not found any code that helps answer my question. Oracles OCI documentation has not been of much help either. So if anyone could offer some insight I would greatly appreciate it.
    Chris Simms
    [email protected]
    <HR></BLOCKQUOTE>
    null

  • SQL Developer Strangeness with database objects beginning with 'AQ'

    I have two separate but seemingly related issues.
    *1. I am experiencing a situation whereby database objects beginning with the letters 'AQ' are not included when performing a database export from SQL Developer (using the procedure described below).*
    Procedure:
    1. Create any database objects starting with 'AQ'
    2. Tools > Database Export
    3. Check every item in the 'Types to Export' step of the Export Wizard
    4. Progress to the 'Specify Objects' step of the Export Wizard
    Expected:
    The 'Specify Objects' step of the Export Wizard lists all database objects
    Actual:
    The 'Specify Objects' step of the Export Wizard lists all database objects EXCEPT those prefixed with AQ. As these objects are not listed, I am not able to export them.
    *2. Sequences that start with the letters 'AQ' do not appear in the object list*
    Any sequences starting with the letters 'AQ' are missing from the Sequences list in the left panel of SQL Developer.
    At a glance, it appears as though these are symptoms of the same issue that's described in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=898765&tstart=180]. I have attempted this in versions 1.5.4 and 2.1.1.64 under both Windows XP and Vista. Both exhibit the same problems.
    Thanks.
    Edited by: thrillhouse on 16-Mar-2010 17:27

    I have created a new bug for the first and reopened the bug for the second. In the latter case we fixed the AQ for most nodes, but it seems a few nodes, like the Sequences were not included.
    Sue

  • Hiding Some DataBase Objects

    i want a way or a product that can hide
    packages body
    specific Tables
    ,function and procedure
    from being viewed,Altered  by /,System or sys
    i will give this privileges to other users temporary and i will back again , it is just a while  
    i hope you help me , Thanks @All

    Taking a step back my POV would is  . . .
    Trusting your OS users that can control the database (SysAdmins and DBAs) would be a vetting process outside of any software.
    Use business policies such as Separation of Duties (SOD) so that only proper individual can modify ODV is a requirement.
    SOD should supply you with one form of checks and balances.
    ODV can and does supply methods to restrict and separate duties.
    My previous implementation of ODV was able to restrict DBA access to what is necessary to do their job and only their job.
    No access to schema data or code.
    You can always define your own roles to accomplish SOD within the database.
    FYI: Oracle Database 12c has a better SOD with additional granular roles of that breaks up SYSDBA privileges.

  • Switch to current database in SP procedure

    Use master
    go
    create proc sp_TableCount as
    select count(*) TableCount from sys.tables
    where type_desc='USER_TABLE'
    GO
    use master
    exec sp_TableCount
    use test
    exec sp_TableCount
    you always get the TableCount from the Master database.
    how can I switch to current database in SP procedure ?
    use db_name() ??
    --SQL 2005hello

    Hi, You can create procedure in all your required databases and then execute that to get required result.
    like this
    use
    master
    go
    create
    proc sp_GetObjectCount
    as
    select
    count(*) from sys.objects
    GO
    use
    msdb
    go
    create
    proc sp_GetObjectCount
    as
    select
    count(*) from sys.objects
    GO
    use
    master
    exec
    sp_GetObjectCount
    --526
    use
    msdb
    exec
    sp_GetObjectCount
    --526
    -- but I wang 634 here !!!
    Shamas Saeed
    MCITP-DBD 2005
    http://sqlservercoollinks.blogspot.com

  • Database objects Tables, Views, Indexes not expand in Connections navigator

    In SQL Developer tool when I clicked on any database object: Tables, Views, Indexes, Packages, Procedures, Functions, and Triggers none of them expands in Connections navigator so I am not able to see all tables, Views, Indexes in this schema objects.
    Please advise
    Thanks a lot
    Vincent

    If the user you're connecting with is not the owner of the objects, you can access them through the Other Users node.
    Hope that helps,
    K.

  • Not able to compare PL/SQL body from two different offline database object

    It is not possible to compare two package bodies from two different off line database object in two different off line database and schema.
    JDeveloper display a compare not available message in the middle of the window.
    It is possible to compare the package specification.

    Not able to compare scripts generated from offline database objects too

  • Deploy form, question about database object or connection parameters

    When form to be deployed to the dev/test/production environment, should it be compiled with that specific database connection username, password and sid? Another words, when I compile the database objects created for the compile is embedded in the .fmx file?
    thanks for help

    You won't need to compile your forms if the passwords of the target schema differs. It also doesn't matter on what platform/architecture the database server runs on. However it would matter how you created your schema objects. And of course it will matter if the platform your forms run on differ. The list of "what you need to do when you don't want to compile against the target database" is a long one.
    Here is a short list of don'ts
    - no +select * from [...]+ views
    - no +select * from [...]+ in forms cursors and the like
    - %TYPE is evil
    - %ROWTYPE is much more evil
    Those are just a few obvious things developers can mess up. Of course we all know that this sort of things are bad programming practice but they do happen. And as said: that's just the most obvious things. I work for a vendor where only the compiled files are shipped to the customer, and the road to this goal is a hard and bumpy one. If you don't want bad surprises in production I suggest you implement a fixed build process routine and a fixed upgrade process where you can ensure that the target database where the forms run against match exactly the development database you compile your forms from a logical point of view. The far easier exit is to just compile your forms on the target platform against the target database but I understand that this is not always possible.
    cheers

  • Is there any command/query/etc, which would allow to understand what database objects (for example tables) are consuming memory and how much of it?

    TimesTen Release 11.2.1.9.6 (64 bit Linux/x86_64)
    Command> dssize;
    PERM_ALLOCATED_SIZE:      51200000
      PERM_IN_USE_SIZE: 45996153
    PERM_IN_USE_HIGH_WATER:   50033464
    TEMP_ALLOCATED_SIZE:      2457600
    TEMP_IN_USE_SIZE:         19680
    TEMP_IN_USE_HIGH_WATER:   26760
    Is there any command/query/etc, which would allow to understand what database objects (for example tables) are consuming memory and how much of it?
    tried to use ttsize function, but it gives some senseless results – for example, for the biggest table, tokens, it produces following output (that this table is 90GB in size – what physically cannot be true):
    Command> call ttsize('tokens',null,null);
    < 90885669274.0000 >
    1 row found.

    Are you able to use the command line version of ttSize instead? This splits out how much space is being used by indexes (in the Temp section of the TT memory segment), which I think is being combined into one, whole figure in the procedure version of ttSize you're using. For example:
    ttSize -tbl ia my_ttdb
    Rows = 4
    Total in-line row bytes = 17524
    Total = 17524
    Command> create index i1 on ia(a);
    ttSize -tbl ia my_ttdb;
    Rows = 4
    Total in-line row bytes = 17524
    Indexes:
    Range index JSPALMER.I1 adds 5618 bytes
      Total index bytes = 5618
    Total = 23142
    Command> call ttsize ('ia',,);
    < 23142.0000000000 >
    1 row found.
    In 11.2.2 we added the procedure ttComputeTabSizes which populates system tables with detailed table size data, and was designed to be an alternative to ttSize. Unfortunately it still doesn't calculate index usage though, and it isn't in 11.2.1.

  • Find destination of database objects..

    I've got all database schema in one Oracle dmp file. I know that schema from this file was stored on 2 servers, but when I import this file I have all tables, procedures and other database object in one user. Is there any possibilities to know in which server was which tables and procedures? I try to use SQLDeveloper to find on which tablespace works procedures and functions, but I can't find tablespace's path in OS :/ Or maybe better idea is to find this information not on imprted schema, but on dmp file?!
    I add that this schema is too huge to search my answer step by step, because it has about 1300 tables :/
    Please help.

    Please clarify your previous message and intentions.
    I've got all database schema in one Oracle dmp file.Export was done in full mode, you mean?I hope yes. It's old dmp file and I've got only short description about this dmp file.
    >
    I know that schema from this file was stored on 2 servers,I have no idea what this means... How was the export
    done?It's mean that in this file are database object from both server. One server was for transformating data and second for reporting and diagnostig. Both of them have database objects and I try to know which of them was on which server.
    >
    but when I import this file I have all
    tables, procedures and other database object in oneuser.
    So, how was this import done? E.g. what imp command
    line options did you use?
    I use full imprt option.
    Is there any possibilities to know in which
    server was which tables and procedures?Not sure what you want. Perhaps you could ask the one
    who did the export?
    I I explain this above in this post.
    I try to use
    SQLDeveloper to find on which tablespace works
    procedures and functions, but I can't findProcedures and functions are schema objects, and uses
    [url=http://download.oracle.com/docs/cd/B19306_01/serv
    er.102/b14220/physical.htm#i15436]the SYSTEM
    tablespace for storage.
    tablespace's path in OS :/ Or maybe better idea isto
    find this information not on imprted schema, buton
    dmp file?!What kind of information?
    Information about which database objects on dmp file was stored on which server..
    >
    Is my answer are clearer now? If yes, please suggest solution.

  • Fully qualified database object names

    Is there a method to determine the fully qualified name of a database object such as a table or procedure? At the moment I compute this from the catalog and schema identifiers but I am hoping there is a more direct way.
    Thanks,
    KP

    give an example for what u r looking for.
    which DB ?For example, a Sybase table named "table1" in a schema "dbo" in database "db1" has a fully qualified name of "db1.dbo.table1". I am trying to find a way to do this in a database-independent way. It's not as simple as concatenating the 3 elements together because you have to take into consideration the fact that the database may not use schemas or databases or both etc. I am hoping there is a method or a series of methods that return this information.
    KP

Maybe you are looking for

  • Shipping point at storage location level in ME2O

    hi Guys, I am using stock transport orders at storage location level, and it works fine, we have a customizing point to configure shipping point at storage location level. My doubt is if we can use also shipping point det. at storage location level f

  • Re: How to reset / recover forgotten Windows password

    Forgetting your Windows administrator login password. With no way to get into the system, you can't even perform basic maintenance, let alone a thorough tune-up. Formatting is always an option, but we consider that a last resort. (Plus, guess who's g

  • How to open sdf files in SQL server 2012?

    How to open sdf files in SQL server 2012?  I couldn't figure out how to open the sdf files in SQL server 2012  Thank you  Best  Jamal

  • Country of origin field?

    Dear Gurus, can we make only 'country of origin' field manadatory in me11 and me12? if yes, how? If No, why? pls help........

  • Transfer items from one calendar to another (on iMac)

    I have a question: how can you transfer all the items from one calendar into another calendar? I thought I had come up with an ingenious solution, but it didn't work (see below). Years ago, I set up a calendar for my wife and I to use as a "family" c