SQL & PL/SQL :: Unable To Recreate An Object?

Mar 15, 2010

I have the metadata of an object in one of my database table as xml. I failed to recreate the object in the other schema using metadata api. I developed a stored function to do the above job. My function doesn't throw any error as well as it doesn't create the object.

My code snippet is

CREATE OR REPLACE PROCEDURE DDI.move_table(
table_name in VARCHAR2,
from_schema in VARCHAR2,
to_schema in VARCHAR2 )
AUTHID CURRENT_USER

[code]....

The schema where i create and execute my function have dba privilege also.

View 9 Replies


ADVERTISEMENT

SQL & PL/SQL :: Unable To Recreate DBLink In Another DB / Schema?

Mar 25, 2010

I'm unable to recreate the db link (private) in another schema/database. Even its a schema object, its come without schema name while extracting from database using metadata api.

code is below (just for extracting)

CREATE OR REPLACE FUNCTION DDI.DBLINK_DDL
RETURN CLOB
AUTHID CURRENT_USER
AS
v_meta_handle NUMBER;
v_meta_handle_trans NUMBER;
V_DOC CLOB;

[code].....

View 8 Replies View Related

Client Tools :: Unable To Generate ERD For Specific Object

Dec 11, 2009

We are using erwin to generate Er diagram.But with that tool unable to generate the ERD for specific object.Or suggest any other tool from which i can generate the ERD of specific object.

i.e. Lets take an example.

I have a table with one primary key and 10 foreign keys. So now if i select the main table the tool should draw the ERD based on the Constraints ('P' and 'R') so all the different table which have the relation those table should only display. Right now we are getting all the tables ERD(more than 1500 tables) which is not neccesary.

View 13 Replies View Related

Forms :: Unable To Create Object For Excel 2007 / Windows 7?

Aug 11, 2010

The below Oracle Forms code works fine for Excel 2003/Windows XP/IE6 but doesn't work for Excel 2007/Windows 7/IE8.

*********************
application := Client_OLE2.CREATE_OBJ('Excel.Application');

Client_OLE2.SET_PROPERTY(application,'Visible','TRUE');

workbooks := Client_OLE2.Get_Obj_Property(application, 'Workbooks');

args1 := Client_OLE2.create_arglist;
************************

There is no error while executing the form, by debugging we found that the control skips all the above code.

I'm using Oracle forms 10.1.2.3 and jre 1.6.0_16.

View 3 Replies View Related

PL/SQL :: Error In Modifying Object Value In Triggers Defined On Object Tables

Sep 26, 2012

While practicing with Triggers, the following error was encountered. An Object Type and an object Table are created.

create or replace
type typPerson is object
(id number,
firstname varchar2(30),
lastname varchar2(30)
[code].........

I executed the below insert statement, and I got the following error.

SQL> insert into person_obj_tab values (10,'Object1','From Trigger');
insert into person_obj_tab values (10,'Object1','From Trigger')
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 4153
Session ID: 136 Serial number: 305
[code]......

SQL> insert into person_obj_tab values (10,'Object','Original');

1 row created.Question:

1) Trigger of version 1 did not report any error during compilation, but during DML execution, hangs for sometime and gives the above error.
2) Whether direct assignment of Objects of greater size is possible inside triggers built on object Tables?
3) Suppose an object contain multiple attributes (say more than 20), then how to assign them inside a trigger?

View 1 Replies View Related

TimesTen In-Memory :: OracleDataReader - Object Reference Not Set To Instance Of Object

Jan 25, 2013

I have a problem with executing oracleCommand.ExecuteReader() method. Whatever I try it always returns null and it won't create OracleData reader object. I'm using ODAC 1120320_x64 for .net 4.0 and timesten112241.win64. Don't sure what to do. Debugger is showing strange thing in OracleConnection object : ConnectionState = Closed, but output of ttStatus shows connection to TimesTen data store and ExecuteNonQuery() command works just fine with or without (in or out) parameters. But when I try to execute some query with multile output such as select *, I can't get any result.

I also have a strange problem with connection.Open() When I execute Open() i throws AccessViolationException that can be handled with [Handle ProcessCorruptedStateExceptions] attribute, but connection is established after that and my application works fine until I try to instance OracleDataReader object.

Here is the code:
OracleCommand select = null;
OracleDataReader reader = null;

select = new OracleCommand(selectStmt, connection);
select.CommandType = CommandType.Text;
try
{
reader = select.ExecuteReader(); // this line throws NullReferenceException
if (reader.HasRows)
{
[code]....

Just to mention, I tried it with different queries (pl/sql, plane sql, stored procedure) and all of them works fine in SQL Developer, but not in app.

View 10 Replies View Related

Find Dependent Object Details For Any Object

Dec 24, 2012

Is there any query to find the dependent object details for any object. Like if mview is built on a table, then i should be able to find the table name with out checking code of the mview. similar way for view and functions or procedures etc...

View 5 Replies View Related

SQL & PL/SQL :: Recreate Objects Of One Schema Into Another

Apr 8, 2010

I got the below error while executing the procedure. What the procedure doing is recreate the objects of one schema into another. After recreating some objects it throws the error.

code is...

1 CREATE OR REPLACE PROCEDURE SCHEMA_IMPORT6
2 AUTHID CURRENT_USER
3 AS
4 V_Objid NUMBER;
5 V_Xml XMLTYPE;
6 V_Xml_Ind XMLTYPE;
[code]....

View 3 Replies View Related

SQL & PL/SQL :: Materialized View Recreate

Oct 2, 2012

we have a materialized view (in Oracle 11g), usually this MV we easily drop and recreate it.

But last few days, i am trying to drop a MV, but running a long time but no result and it keeps running. not dropped also.

Bcos, db performance is good since we tried to a view using script, it is fine. Problem seems only with Materialized view.

where and how to check what is the issue?

View 1 Replies View Related

SQL & PL/SQL :: How To Retrieve A View Definition To Recreate

May 20, 2013

How to retrieve a view definition to re-create it somewhere when its size is more than 32767 bytes?Here are some constraints :

- We are in Oracle 9.2.0.8, meaning that we cannot use the DBMS_METADATA package.
- We cannot concatenate char and long : things like
set long 100000

select 'create or replace view my_view as ' || text from dba_views where view_name = 'MY_VIEW';
are not possible.

View 31 Replies View Related

Server Administration :: How To Recreate Lobindex

May 24, 2011

i missed a tablespace that includes more than 20,000 indexes for reason. there is nothing to do with it without recreate these indexes.i could find these index's ddl createment from "dbms_metadata.get_ddl" packages.

but the DDL createment like this:

CREATE UNIQUE INDEX "AMV"."SYS_IL0000241510C00002$$" ON "AMV"."DR$AMV_C_CHANNELS_DESC_CTX$R" (
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 524288 NEXT 524288 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "APPS_TS_TX_IDX"
PARALLEL (DEGREE 0 INSTANCES 0)

PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS

*ERROR at line 2: ORA-00936: missing expression

note: this tablespace is in ORACLE EBS R11 name "APPS_TS_TX_IDX" how to recreate LOBINDEX?

View 1 Replies View Related

Recreate Parameter File When Lost Or Corrupted?

Jul 1, 2010

recreate paramater file if you lost init.ora or spfile.ora

STEPS

SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file 'D:ORACLEORA92DATABASEINITGPT2.ORA'
How to resolve ORA-01078 with LRM-00109 error?

For resolving these error, you should need to replace init.ora or spfile if you have backup of same files. If you don't have backup then go to alert.log and copy all parameters in one file and save as "init.ora". Modify same init.ora with some parameters which need single quotation mark " ' " like background_dump_dest,controlfiles,db_name and "dispatchers ......)". Connect as sysdba in SQL*Plus and execute command "create spfile from pfile=" or startup pfile or startup.

View 2 Replies View Related

Server Administration :: How To Recreate Control File

Jun 12, 2012

I can not run the control file treace file,why?

[oracle@hxl oradata_bak]$ more run_sql.sql
CREATE CONTROLFILE REUSE DATABASE "ORACL" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100

[code]...

View 12 Replies View Related

Enterprise Manager :: How To Recreate File For EMCTL

Jul 19, 2010

I cannot start our Enterprise Manager services for our newly created db. I'm encountering this error:

"$ emctl start dbconsole
Unable to locate file /appl1/home/oracle/10.2/xxx-dbs_abcd/sysman/config/emd.properties : No such file or directory"

I've been executing this command for a no. of times at the ORACLE_HOME directory:

$ ./emca -config dbcontrol db -repos create

.. but still I cannot start EMCTL dbconsole.

View 16 Replies View Related

PL/SQL :: Materialized View - Update Query Without Drop And Recreate

Aug 24, 2012

i have a little doubt in Materialized view. i created a materialized view and log with the following query,

create table test_mv (a number ,b number )
alter table test_mv add constraint t_pk primary key ( a );
insert into test_mv values (1,2);

[Code]...

Now i want to update the query in the MV as 'Select a from test_mv' . for that i tried with

*'ALTER MATERIALIZED VIEW product_sales_mv AS SELECT a from test_mv;'*

But it throwing error,

Error starting at line 5 in command:

alter  MATERIALIZED VIEW product_sales_mv   AS SELECT  b  from test_mv

Error report:

SQL Error: ORA-00933: SQL command not properly ended +00933. 00000 - "SQL command not properly ended"+

*Cause:+   
*Action:+

i guess i am doing wrong. i want to update it without drop and recreate

View 2 Replies View Related

Recreate Global OraInventory Directory For 9iR2 In Solaris SPARC 64 Bit?

Jan 22, 2011

recreate global OraInventory directory for Oracle 9iR2 in Solaris SPARC 64 bit.

View 2 Replies View Related

Export/Import/SQL Loader :: Clone Oracle 8i Recreate Database

Aug 2, 2013

I have a RedHat Server with Oracle Ent. 8iI did a full export of all my current data bases ( DCTEST, DCPROG, DCUSAC, DCCAND)I now have the DC*.dmp files. How can I know import these files into Oracle Database 11R2?

Do you have a Step-by-Step how-to ?IF I don't have the scripts to re-create the databases how to go forward ?

View 2 Replies View Related

Data Guard :: Recreate Standby Using Full Datafile Backup

Dec 6, 2012

I have to recreate my standby database due to huge archive gap. I have full datafile backup of primary.

View 24 Replies View Related

PL/SQL :: How To Access Type Object Variable Declared Inside Another Type Object

Mar 29, 2013

I have an Type-object typeObj1 that consists another Type-object typeObj2. this def has another Type-object typeObj3. how to access variable declared inside typeObj3. I have syntax below for each Type.

CREATE OR REPLACE TYPE typeObj1
AS OBJECT
   (
      SYSTEM_IDENTIFER                    VARCHAR2(50),
      PROCESS_TYPE                          VARCHAR2(50),
      abc                                            typeObj2
     
   )
/

[Code]...

/I have tried to access the type-object in where clause in following way

FROM TABLE(CAST(I_typeObj1 AS typeObj1)) ITTPRC,
......
Where
.......
AND (ADDKEY.ADDTN_INFO_KEY_TYP_NM IN (SELECT ADDTN_INFO_KEY_TYP_NM FROM TABLE(ITTPRC.abc)))

AND (ADTINF.ADDTN_RQST_TYP_VAL_DT  IN (SELECT ADDTN_RQST_VAL_DT FROM TABLE(     ITTPRC.def)) OR ITTPRC.def IS NULL )
AND (ADTINF.ADDTN_RQST_TYP_VAL_NUM  IN (SELECT ADDTN_RQST_VAL_NUM FROM TABLE( ITTPRC.def)) OR ITTPRC.def IS NULL )
AND (ADTINF.ADDTN_RQST_TYP_VALUE  IN (SELECT ADDTN_RQST_VALUE FROM TABLE( ITTPRC.def)) OR ITTPRC.def IS NULL )

In this way i am able to access the variable inside typeObj3. But problem is i am getting error "ORA-01427 single-row subquery returns more than one row" when i pass more that one typeObj2.

I passed the values like this in proc execution.

T_T_A_I_V  :=  typeObj3('asdasd',NULL,NULL),
                       typeObj3('String654',NULL,NULL),
                       typeObj3('abcdef',NULL,NULL));                                    
T_T_A_I_I  :=  typeObj2('CampusCode',T_T_A_I_V),
                          typeObj2('PlanNumber',T_T_A_I_V);

What i have done is removed typeObj3 from typeObj2, variables defined in typeObj3 are added in typeObj2 then i got ride of above error. is it correct

View 4 Replies View Related

PL/SQL :: Index-Organized Table Truncate Vs Lock / Stage / Drop / Recreate?

Apr 24, 2013

I ran into an issue in a project where a function is recreating an index-organized table by doing:Table Structure:

CREATE TABLE table_iot(
...)
ORGANIZATION INDEX
OVERFLOW ...;

Recreate Steps:

1) Populate global temporary staging table (gtt) with data
-- where gtt is staging for target index-organized table (iot)
2) Lock the target index-organized table (iot)
3) Copy old iot data to gtt
-- gtt now contains old and new data
4) Create new index-organized table (iot2) from gtt
-- iot2 now contains old and new data

[code]...

Because index-organized tables are primarily stored in a B-tree index, you can encounter fragmentation as a consequence of incremental updates. However, you can use the ALTER TABLE...MOVE statement to rebuild the index and reduce this fragmentation.The following statement rebuilds the index-organized table admin_docindex:

ALTER TABLE admin_docindex MOVE;

View 3 Replies View Related

Backup & Recovery :: Logical Block Corruption - Recreate SYSMAN Schema Index

Mar 3, 2010

I am facing problem of logical block curruption.

SQL> select * from v$database_block_corruption;

FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
---------- ---------- ---------- ------------------ ---------
3 61454 1 1417157166 LOGICAL
3 31256 1 1417011117 LOGICAL

OWNER CONSTRAINT_NAME C TABLE_NAME
------------------------------ ------------------------------ - ------------------------------
SYSMAN MGMT_METRICS_RAW_PK P MGMT_METRICS_RAW

Can i recreate the SYSMAN schema index by dropping this one?

View 17 Replies View Related

SQL & PL/SQL :: Find Out Object Name

Feb 16, 2010

I want to find out the name of objects like procedures,functions which are using a specific column of table.

for example i have a table 'Orafaq' which has column 'Iss_Ide', i want to know which objects like procedures,functions,views are using column "Iss_Ide" of table orafaq

View 3 Replies View Related

SQL & PL/SQL :: Same Object In Different Schema

Oct 11, 2011

I have 3 schemas (master, baby and web)- master has two pakages , PkgA which has user access and package PkgB with definer access. It also has a table called Tab1. Both pakages are inserting data into table Tab1. Baby schema also has table Tab1. When we call pakage PkgA where data will insert (mater or baby table) and when we call pakage PkgB where data will insert (mater or baby table). What will happen when we call pakages from web and how can we make sure data is inserting baby Tab1 table?

View 4 Replies View Related

Two Object Tables - Row Will Not Insert

Jun 14, 2007

I have 2 object tables. Location and a department. Department references a location Object. But this wont insert. I get "0 rows created".

CREATE OR REPLACE TYPE location_objtyp AS OBJECT
(
locationID NUMBER,
name VARCHAR2(48)
);
/
CREATE OR REPLACE TYPE dept_objtyp AS OBJECT
(
deptID NUMBER,
name VARCHAR2(48),
locationID_ref REF location_objtyp
);
[code]...

This does not insert. I get no error. Only - "0 rows created".

View 3 Replies View Related

Oracle Sys Object Invalid

Jun 21, 2013

Oracle sys object are Invalid,But database working fine. How to fix these problem, I don't have oracle support,

Database Dba_registry contain are All Valid.But sys object getting Invalid.

Oracle 10g 10.2.0.5 Standard

OWNERCOUNT(*)
MDSYS359
DMSYS24
PUBLIC147
CTXSYS3
OLAPSYS32
XDB 5
SYS 141

Dba_registry

COMP_IDSTATUS
APSOPTION OFF
SDOOPTION OFF
ODMOPTION OFF
AMDOPTION OFF
XOQOPTION OFF
OWMVALID
CATALOGVALID
CATPROCVALID
JAVAVMVALID
XMLVALID
CATJAVAVALID
RULVALID
EXFVALID
CONTEXTVALID
XDBVALID
EMVALID
ORDIMVALID

View 3 Replies View Related

Check All Object Privileges

Sep 6, 2011

How can i list all the object privileges from n user?

for example:

I granted to USER1:

GRANT ALL on my_table1 to USER1;
GRANT ALL on my_table2 to USER1;
GRANT ALL on my_tableN to USER1;

How can i list all privileges from this user over all tables?

I don't know if this is possible, but i wanna to list:

USER1 ----- UPDATE, INSERT, DELETE ON my_table1
USER1 ----- UPDATE, INSERT, DELETE ON my_table2
USER1 ----- UPDATE, INSERT, DELETE ON my_tableN

Is this possible?

View 1 Replies View Related

Associating XMLTYPE Object With A XSD?

Oct 11, 2012

How to create an AQ queue in with payload of type "sample_orc.xsd".

Right now I created an object of XMLTYPE. Below is the code

CREATE OR REPLACE TYPE sample_payload_type AS OBJECT (
test_data SYS.XMLTYPE
);

Now How will I associate an XSD say "sample_orc.xsd" to this object?

View 2 Replies View Related

DB Object Validation Report?

Jul 21, 2010

In our company we have a requirement to export data out of a live dbs and import that into a test db for issue replication,debugging & fixing from time to time.

As a junior DBA am resposible to import a dump file provided to me into a test DB. The export is taken off by customer dbas or consultants for a specified list of tables/schemas etc.

I have readonly access to source database and the issue I am facing is after the import there are certain objects that get missed out or do not get imported properly.

I would like to know if there was a script I can use to generate a report on the source DB and then run the same on the target DB after the import and compare to find out if any objects got missed out.

View 7 Replies View Related

SQL & PL/SQL :: How To Get Total Object Privileges

Jun 1, 2010

Is there any data dictionary table to get the object grants for total objects in the database?

Using DBA_TAB_PRIVS, i get object grants for tables only. But i'm looking for remaining objects also. The list of remaining objects is below.

view, or materialized view
Sequence
Procedure, function, or package
User-defined type
Synonym for any of the preceding items
Directory, library, operator, or indextype
Java source, class, or resource

provide me the other data dictionary tables for querying.

View 3 Replies View Related

SQL & PL/SQL :: Change Datatype From Object

Dec 8, 2010

I have created an Object Type and this Type is mapped to a column datatype in a table.This Table has values inserted.

create or replace
type column_type as object (
col_name varchar2(30),
col_comment varchar2(4000)
);
[code]....

ORA-02303: cannot drop or replace a type with type or table dependents...how to resolve this issue without having to delete any column from the table?

View 2 Replies View Related







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