SQL & PL/SQL :: Get Metadata Of Different Schemas

Jun 6, 2012

I'm trying to get the Create-Statements of all tables of several schemas:

SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name,'<schmema>')
FROM (SELECT TABLE_NAME, OWNER FROM SYS.ALL_TABLES WHERE owner='<schema>') u

Is there a way to create a loop to handle several schemas listed in a array, for example?

View 10 Replies


ADVERTISEMENT

Metadata For Some Of Partitions

Nov 10, 2010

i have many partitions in one table. i need metadata for some of the partitions. We have any option to get the metadata for partitions only.because while selecthing the table meatdata i am getting long script.

View 2 Replies View Related

SQL & PL/SQL :: Derive Metadata From Cursor?

Jul 11, 2011

I have to build something like an export-interface-mappingtool. So user defines more or less a query and I have to display the attributes of this query to enable a mapping.

If I build up a ref cursor fom this query, I did not find the possibility to read its metadata (mostly Type/length is enough).

What I do not want to do is creating a temp. table or parse the query string to derive it from the dictionary.

Is it possible at all to get the metadata of a dynamic SQL ?

View 6 Replies View Related

SQL & PL/SQL :: Hierarchical Query To Get Metadata Information?

Mar 5, 2010

i'm trying to display the heirarichal relationship between the tables (parents-child-subchild).

[b]table structure[/b]
DEPT
|PK-DEPT_ID
|
EMP
|pk-EMP_ID

[code]....

Expected output

table_name path
DEPT DEPT
EMP DEPT/EMP
EMP_AUTHORIZATION DEPT/EMP/EMP_AUTHORIZATION
EMP_AUTHRIZATION_CARD DEPT/EMP/EMP_AUTHORIZATION/EMP_AUTHRIZATION_CARD
EMP_AUTHRIZATION_DUP DEPT/EMP/EMP_AUTHORIZATION/EMP_AUTHRIZATION_CARD/EMP_AUTHRIZATION_DUP

but by using below query i am getting complete heirarichy.

SELECT LEVEL,
Table_Name,
Constraint_Name,
R_Constraint_Name ,
SYS_CONNECT_BY_PATH(Table_Name, '/') Path

[code]....

View 6 Replies View Related

SQL & PL/SQL :: Using DBMS-METADATA To Transform Tablespace DDL?

May 18, 2010

I'm currently busy with database consolidation, so I'm searching for a solution to generate some useful DDL to prepare the new target database before importing the application's data. This should include TABLESPACE DDL and all additional users with their grants.

So first I thought of developing a simple script, which will create the CREATE TABLESPACE DDL but with transformed datafile paths.But my throws some errors and I don't understand why:

ORA-31604: invalid NAME parameter "STORAGE" for object type TABLESPACE in function SET_FILTER
declare
l_hObject NUMBER;
l_Objddl CLOB;

[code]...

View 7 Replies View Related

Importing Metadata For Transportable Tablespace

Nov 20, 2012

We are migrating one of our databases from linux to AIX (testing phase). We're using transportable tablespace for the same. All steps are done and we're stuck during importing the metadata. While importing metadata we require to mention fully qualified datafile name which has to be plugged. The number of datafiles is 309 and the name of the all the datafiles has to be in one line. Now if we try to write it in one line using vi editor, the editor gives error 'ex: 0602-140'.

Is there a way by which we can overcome this situation?

View 5 Replies View Related

JDeveloper, Java & XML :: How To Get Metadata Of All Fields In SQL Query

Feb 22, 2012

I am using the dbms_xmlgen.getXMLfunction to get the result of any query in xml format.

With this XML I also want the metadata information about all the fields used in the query (passed to getXML function). Is it possible and how can I achieve this.

I tried to Google it but couldn't find any solution , it's easy to do it in java where I can get the resultset meta data from the resultset but I have to do it in Oracle function since I want the result in xml format and want to use the oracle XML API.

You may think why I need metadata , the reason is the application will later use this information to sort the data contained in these fields according to their data type provided to.

View 7 Replies View Related

Server Utilities :: Exporting Metadata Backup

Jul 19, 2011

i am using a schema which i need to take a backup of meta data only i am using exp utility

exp shan/shan@shan file=/backup_dump/shan.dmp log=/backup_dump/shan.log owner=shan rows=n

but it will return me below error, i have only access to user shan our client cant allow me to use system or sysdba schema or any other required grants or privileges so is there any way to take metadata backup of user shan from user shan.

EXP-00008: ORACLE error 942 encountered
ORA-00942: table or view does not exist
EXP-00024: Export views not installed, please notify your DBA
EXP-00000: Export terminated unsuccessfully

View 3 Replies View Related

SQL & PL/SQL :: How To Query To Show Schema About Metadata In OracleDB

Apr 23, 2010

i got problem that i want to know Metadata in my Oracle DB 2 version there're OracleDB 9i and OracleDB 10g ,So i want to know about sql command to show all metadata of these Database, because i want to list My metadata and improve to Metadata's Standard(ISO/IEC 11179). How can i show all metadata of these database. is it the same sql command line with this 2 version Database to show all metadata?

View 1 Replies View Related

SQL & PL/SQL :: Returns Comments Of All Objects Of Schema Using Metadata Api

Mar 2, 2010

A function returns the comments of all objects of the schema using metadata api. I used DATABASE_EXPORT as object_type for open function. which name (eg: base_object_name, base_object_schema...) should i use to get comments of single object. My code is..

1 CREATE OR REPLACE function f_depen_obj
2 return clob
3 as
4 a number;
5 b number;
[code].....

I got comments of all objects when i commented 11th,12th lines. Now i want the comments of EMP table of SCOTT schema. I got the following error ..

SQL> select f_depen_obj from dual;
ERROR:
ORA-31603: object "EMP" of type TABLE not found in schema "EMP"
ORA-06512: at "SYS.DBMS_METADATA", line 1546
ORA-06512: at "SYS.DBMS_METADATA", line 1583
ORA-06512: at "SYS.DBMS_METADATA", line 1901
ORA-06512: at "SYS.DBMS_METADATA", line 3806
ORA-06512: at "SYS.DBMS_METADATA", line 3784
ORA-06512: at "SCOTT.F_DEPEN_OBJ", line 17

no rows selected...i got output (comments of single object) when i use COMMENT instead of DATABASE_EXPORT in open function(line no: 9). But i need to use DATABASE_EXPORT as a object_type. Which name is suitable for set_filter procedure instead of 'NAME'?

View 3 Replies View Related

PL/SQL :: How To Find If Column Default Value Is Stored As Metadata

Aug 17, 2012

I'm using Oracle 11g enhanced ADD COLUMN Functionality. Adding new columns with DEFAULT values and NOT NULL constraint no longer requires the default value to be stored in all existing records.

Sometimes we change DB columns from NOT NULL with DEFAULT to NULL with DEFAULT. This operation "materialize" column default. Is there an easy way (Dictionary view) how to find, that COLUMN default value is stored as metadata or is "materialized" ?

Oracle RDBMS version : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

View 4 Replies View Related

Spatial :: How To Edit User Metadata View

Oct 19, 2012

how is to edit user_sdo_geom_metadata view?

View 6 Replies View Related

Server Utilities :: DBMS-DATAPUMP.metadata-filter And Long Table List?

Jun 9, 2010

I have a problem with DBMS_DATAPUMP.metadata_filter.Let's suppose that I need to export a huge list of tables (a,b,c,d,e,f,g,h,i...). Let's suppose that the list is dynamic do NOT want to use

DBMS_DATAPUMP.metadata_filter (handle => h1,
NAME => 'NAME_EXPR',
VALUE => 'IN (''a'', ''b'', ...)',
object_type => NULL);

In my_export_table there is the list:

CREATE TABLE my_export_table
(
EXPORT_OBJECT_NAME VARCHAR2(50 BYTE)
)

Now I'm trying to use this form:

DBMS_DATAPUMP.metadata_filter (handle => h1,
NAME => 'NAME_EXPR',
VALUE => 'IN (SELECT a.export_object_name FROM my_export_table a, user_objects b WHERE a.export_object_name = b.object_name AND b.object_type = ''TABLE'')',
object_type => NULL
);

but it results in error.

Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS while calling DBMS_METADATA.FETCH_XML_CLOB []
ORA-00942: table or view does not exist

[code]...

View 1 Replies View Related

SQL & PL/SQL :: How To Run Query Between 2 Schemas

Jan 8, 2013

Is there any way to run a select command between 2 different schemas without using DB links ?

View 1 Replies View Related

SQL & PL/SQL :: Not Getting Output For Other Schemas?

Feb 2, 2010

One function returns table metadata in xml form. This works for current schema but not for other schemas. Is it a privilege problem?

my code is..

CREATE OR REPLACE FUNCTION TEST.F_DBEG2
RETURN XMLTYPE
AS
Handle NUMBER;
V_OUTPUT_TOTAL XMLTYPE;
V_CNT NUMBER := 0;
BEGIN

[code]....

but when i select the object of another schema, got output.

SELECT * FROM TEST_NEW.DEPT;

Which privilege i need?

View 9 Replies View Related

SQL & PL/SQL :: Find Difference In Two Schemas?

Feb 25, 2013

I want to find difference between the objects(tables(columns,constraints), views, sequences) in two schemas. One schema is staging and one is development . In development lot of changes are made , Is there a script or a opensource tool which will bring out the difference in columns, constraints in each table and sequences , views etc.

View 2 Replies View Related

Server Utilities :: Export Schemas From 10g To 11g?

Apr 27, 2011

I am trying to export schemas from 10g to 11g. The NLS_CHARACTERSET for 10g is WE8ISO8859P1 and the NLS_CHARACTERSET for 11g is WE8MSWIN1252. Is it fine or do I need to change the character set, so that I will be able to successfully do the export/import?

View -1 Replies View Related

SQL & PL/SQL :: How To Know Schemas In A Role And Privileges On Objects

Jul 14, 2011

I have a role mfg_grp .I want to know, to whom the role is granted and which objects and which privileges on those objects are assigned to this role.

View 4 Replies View Related

SQL & PL/SQL :: Retrieve List Of Tables With Same Name From Two Schemas

Sep 16, 2013

I need to retrieve the list of tables with same name from 2 different schemas.

View 10 Replies View Related

SQL & PL/SQL :: Create A Trigger On Multiple Schemas

May 25, 2011

I have following schemas in my database scott,sh,hr...I created a triger on a schema scott with the following method

1. sqlplus / as sysdba

2. CREATE TABLE LOGIN_AUDIT_INFO_ALL (
operation VARCHAR2(30),
obj_owner VARCHAR2(30),
object_name VARCHAR2(30),
sql_text VARCHAR2(64),
attempt_by VARCHAR2(30),
attempt_dt DATE);

3.CREATE OR REPLACE TRIGGER login_audit_prod_schemas
AFTER CREATE OR ALTER OR DROP
ON SCOTT.SCHEMA
[code]....

But it don't fulfill my requirement. trigger is fired when scott perform any action. but my requirment is that trigger should be fired when create action is performed on scott by hr,sh or scott. i also want a single trigger which fulfill the requirement.

View 8 Replies View Related

What Privileges Other Schemas Have On Objects Of Schema A

May 19, 2013

i have schema A and i want to check who(which schemas) can access schema A's objects and what privileges other schemas have on objects of schema A.

View 7 Replies View Related

Query Multiple Schemas Against Default_tablespace?

Feb 6, 2013

i am trying to generate a SUM from the individual schemas to put on this report but i can't seem to get it right...

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1252">
<meta name="generator" content="SQL*Plus 11.2.0">
<TITLE>Launch page </TITLE></head>
<body>
<table border='1' width='90%' align='center' summary='Script output'>

[code].....

View 1 Replies View Related

PL/SQL :: Unique Schemas - Users List

Aug 5, 2013

find the below task. I have unique schemas. and every schema we have many tables.I would like to know

1. I have Scott schema and here I have 10 tables. EMP,DEPT,SALGARDE ( and these tables having different priviliges).

2. another schema MACIN having table DEPT, SALS, GRADE ( having different priviliges) Now I would like to know Schema 1 having permissions to see the tables and he is doing some modifications,inserting,deleting .... on tables containing in MACIN schema.like this it is happening in vice verse in max schemas. now I would like to know who all are having access to login to another schema and what are the priviliges they have till now on what  tables they applied changes...is it possible to figure out? if yes how can we?

View 6 Replies View Related

PL/SQL :: Connect To Pdb To Unlock Old Schemas Like Scott And Hr In 12c

Sep 22, 2013

After successfully installing the 12c, how can I connect to pdb to use the scott or hr schemas?By default when I connect as sys or system from sqlplus it is connecting to orcl not to pdborcl.also how can we make scott connection in sql developer.

View 11 Replies View Related

Comparison Between Toad And SQL Developer To Compare Schemas

Apr 17, 2013

My primary objective was to compare objects in schemas in two different databases and find out the differences, Execute DDL's in the database where objects are missing and syn schemas in two different databases.

So I need to compare schemas in databases. Which tool will be user friendly to make a comparison of database objects existing in schemas in two different databases.

I'd like to see if I can get a list of pro and cons between Toad and SQL Developer for comparing schemas pros and cons. How to make a comparison. I have some idea on using TOAD but was not familiar with SQL Developer.

Below is my requirement:-

Connect to Source
Connect to Target
Compare schemas with different object types
Find out differences
Generate DDL's for the missing objects or for the objects in difference report
Run them in missing instace(Source/Target)
Make sure both are in sync.

View 2 Replies View Related

Enterprise Manager :: OEM And Privilege To See Users Schemas

Apr 19, 2010

I connect to an Oracle-10g database using OEM, and if I click to see the list of users, roles, storage options, ... everything is ok, but if I click to see the list of schemas, I get "1031: insufficient privileges" error.

The user account I use has the SELECT_ANY_DICTIONARY privilege and SELECT_CATALOG_ROLE role granted, and if I try to do "select * from dba_tables" in the SQL*Plus, I get a result.

The matter is even more strange because, if I use the SYSTEM account, I get the same error (!!!).

Do I need any other privilege/role to see the user's schemas with OEM?

View 2 Replies View Related

SQL & PL/SQL :: Create Two Objects In Different Schemas In A Single Database?

Jul 25, 2010

Is it possible to create two objects in different schemas in a single database.

For example in Schema A, table "T1" is there, is to possible to create a table with the same name "T1" in Schema B.

View 4 Replies View Related

SQL & PL/SQL :: Comparing Schemas - Content (data) Identical

Jan 20, 2011

I have two schemas with 149 tables in each schema, what I need to do is to prove that the content(data) between the two schemas is identical. I know that all the table names between the two schemas are the same, just need to prove that there is no difference in data.

So the query needs to prove that Schema A content = Schema B content

I know I cant do a simple select from Schema A.tab1 minus select Schema B.tab1 but since there are 159 tables, I am not sure if this is an efficient way of doing it.

View 14 Replies View Related

ORA-65096 - Installing Oracle 12cR1 Example Schemas

Oct 13, 2013

Database: 12cR1, 12.0.1.0, x64System: Oracle Linux 6.4, x64  

I installed a simple starter database during the installation of Oracle Database 12cR1 with the PDBORCL option selected (default) and would like to install the Oracle Example data, such as users HR schema, etc.

according to URL....IDENTIFIED BY hr  *ERROR at line 1:ORA-65096: invalid common user or role name  

Perhaps the scripts were not designed for container and plug-able databases. I did the following: 

alter pluggable database pdborcl open;alter session set container=PDBORCL;@?/demo/schema/human_resources/hr_main.sqlUser altered. Grant succeeded.Grant succeeded.Connected.GRANT execute ON sys.dbms_stats TO hr

*ERROR at line 1:ORA-01917: user or role 'HR' does not exist 

I could probably create a normal database, but I wonder if there is any other option without having to modify the setup scripts. 

View 2 Replies View Related

Application Express :: Several Push_queue Jobs In Different Schemas

Jun 12, 2012

Im using APEX 4.0. We startet with APEX 2.2 and upgraded it till 4.0. Database is 10g

The application generates emails which schould be send by APEX background job via APEX_MAIL.PUSH_QUEUE. Currently no mails will be send. Mails are added to APEX_MAIL_QUEUE only. I don´t see anything in columns MAIL_SEND_COUNT and MAIL_SEND_ERROR. Administrators of email server say that they don´t see any attempt to send the mails in our mail queue in mail server logs.

It´s possible to send mails with UTL_SMTP!There is no error produced by APEX push_queue background job.But there are several jobs running:

Schema: FLOWS_030100

Job: wwv_flow_mail.pusch_queue(...)
Job: wwv_flow_cache.purge_sessions(..)

Schema: APEX_0400000

Job: wwv_flow_mail.pusch_queue(...)

Ok, it´s possible that´s this is an error of our database administrator.

1. Shouldn´t I see the two background jobs (push_queue, purge_sessions) in schema APEX_0400000?
2. Should I kill push_queue job in schema FLOWS_030100? Where schould the jobs run?
3. How can I debug push_queue? Even if I run it manually I don´t get any return values/errors?
4. Must the jobs have job id 4002 and 4001?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved