We are running Oracle 10g. I need to pull the DDL information from our Oracle tables. The following SQL statement returns the result as a "HUGECLOB". Is there a way to convert the result to text in varchar2 data type? Since tables being processed have numerous partitions, the DDL information for them is quite large, therefore, using substring would not be a viable alternative.
[code]select DBMS_METADATA.GET_DDL('TABLE','EMPLOYEE') from DUAL; [/code]
SELECT customers.custid AS CUSTID, customers.memberid AS MEMBERID, customers.bname AS BNAME, drpepper_rebate.drpepid AS DRPEPID, drpepper_rebate.totalcarb AS TOTALCARB, drpepper_rebate.totalncb AS TOTALNCB,
[code]....
I have more then 700 customer records in the Customers table, but so far I can only pull 500 records.
Reason I am trying to pull all the records from the customer table is because I want to find out who is missing cokeid and Drpepid.
I am trying to insert data from tables that I build from a stage table. I have pasted my package body code below and error message.
create or replace PACKAGE BODY etl_contact_sales IS PROCEDURE insert_contact_sales IS start_dt DATE := sysdate; v_error_message varchar2(150); v_error_block varchar2(30); v_exception exception; v_process_name varchar2(30); [code]...
I have an alerts system for a web site built in an Oracle DB. There are multiple alerts that can be assigned per page, but I want to display only the most recent. I have 5 pages but each page can have different alerts.
I have a parent table of all the alerts and a child table with the page assignments. I want to pull one record (the newest) for each page assignment. The pages can increase so I can't hardcode this.
I keep thinking I need to do something like:
SELECTalertID, headline FROMalerts_V WHEREalertID IN ( SELECTdeptID FROMso_departments )
But it's obviously not quite what I need and not the correct syntax.
I know that you can view all constraints in a table using $USER_CONSTRAINTS or $USER_INDEXES view. What i find difficult is that the information in those views is not really well presented.
I find it very hard to follow. For example, just to find out which columns are foreign keys and which tables they refer to is really tedious. Is there a simpler way to view all the constraints especially foreign keys of a table and including which table columns they refer to in the child table.
I like to see a diagramatic representaion of all the tables involved so i like to see both the parent and the child tables, which columns are related and using which FKs etc. is there an easier way to view this information?
I renamed 100 tables and recreated them, now I need to copy supplemental login information from renamed table to new tables. Environment is oracle 10G.
I have been implementing a script to change a lot of data in a database production.Because of this the database will be 100% dedicated to the execution of that script, in the sense that nothing else will be running in this period (the application will be stopped).
what can i do to improve performance of that execution? is there any oracle manual online for this type of problem? I do not know if it's possible, but I'm thinking of things like disabling locking mechanism (if possible I could run instead of a process many processes in parallel), disabling index growing (during the process), disabling constraints.
I am developing some automated test packages for my PL/SQL Packaged code. Going forward I can code the test package in conjunction with the code but I have some historic packages that I would like to develop these test packages for.
To save time I would like to employ oracle data dictionary views in order to construct the framework for my test package. This includes using SQL to get a list of procedures / functions within the package in order to create the test procedures (spec and body). I can do this in a basic way using the user_procedure view with something like...
SELECT 'PROCEDURE test_' || LOWER(procedure_name) || ' (p_result OUT VARCHAR2 IS BEGIN JTA.ACCOUNT_PROFILE_MAINT.' || procedure_name || ' END ' || LOWER(procedure_name) || ';' FROM user_procedures WHERE object_name = 'ACCOUNT_PROFILE_MAINT' AND subprogram_id != 0 ORDER BY subprogram_id;
However, the above only really works (in simplistic form.. without parameters) for procedures within the package. I would also like to be able to determine if the procedure listed is actually a function or procedure (so that I can alter the syntax accordingly to generate a correctly formatted string calling the program unit).
So, initially how do I determine the type of package program unit I have (Proc/Function)? Do I need to go to all_source to get this information or are there other views available I can join to?
Eventually I would like to extend this to be able to automatically include any parameters in the generated calling string.. again, is there any other option apart from all_source to get this information?
The sqlcache is getting over-written.I would like to capture information from AWR snapshots and feed those (as a workload) into the DBMS_ADVISOR.I can't see where it's possible (other than manually creating my workload from AWR information)
How can i retrieve which tables have composite primary keys, and only one of the primary key columns is a foreign key to another table?
Like: CREATE TABLE club ( clubId NUMBER, name VARCHAR(20) NOT NULL, PRIMARY KEY (ClubId) );
CREATE TABLE team ( teamid NUMBER(10), clubid NUMBER(10), teamname VARCHAR(10) NOT NULL, PRIMARY KEY (teamid, clubid), FOREIGN KEY (clubid) REFERENCES club (clubid));So in this case, the team table
)How do you view the value of the parameter that is being used by instance? show parameter..? 2)How do you get the information of hidden parameters 3)What is the database object that stores information related to various types of db connections over network 4)How do you verify since when the db session is running 5)How do you verify the Originating machine details of the database session 6)How do you verify the name of program that the db session is running 7)What is the naming convenion of Base tables. Where is the information of base tables stored? 8)How are dynamic views created. Whre is the information of dynamic views stored?
Redo log information can be transmitted in one of two ways from the primary database to the standby database: either by ARCH or LGWR.
1. when ARCH involves 2. when LGWR involves FAL_Client = (Should i enter net service name or Db name or service_name FAL_Server = Should i enter net service name or Db name or service_name ) FAL_CLIENT='whichone'
Sequence nextval is a pseodocolumn, but where the value of nextval is stored and why before we use CURRVAL for a sequence in our session, we must first initialize the sequence with NEXTVAL?
Is there any way to capture the version wise objects (Packages) information from the oracle data base.
Ex : I have package P1 which was created on 01-NOV-2012 with version 1 . After 10 days same package has been updated version 2 with some enhancements.Like that the package will be updated according to the latest requirement.
Now I need to capture the total audit trail history of the package with version wise specific changes and when changes has been occurred hoe can I achieve this?
I am trying to setup logon/logoff auditing for our databases which reside in 9i and 10G on sun solaris servers. I am asked to turn on auditing sending the audit data to syslog! How exactly do you do that?
We are making Oracle Insight Application based on Oracle 11gR2 DB.We have two DEV environments. On Oct 17, we had trouble in one DEV environment.From dba_common_audit_trail , we found some user did drop public synonym statement and we doubt it as cause of the problem. I would like to collect synonym information of the two DEV environment.1How could I do that ?2And we are thinking of using Logminer to investigate the cause of problem.Logminer is usable to investigate the cause of problem if we have the REDO log of Oct 17 ?
I am trying to get information about the columns of tables in Oracle databases. In MySQL, show columns provides good deal of information.But in Oracle, we do not have such equivalent call."describe" shows only the primary key.
But it does not show whether any column has unique constraint or an index.
I created a column in a table with unique constraint (but not a primary key), but it was not listed with CONSTRAINT_TYPE = 'U' in dba_constraints view, but was listed with CONSTRAINT_TYPE = 'C' - Check constraint.