How To Collect Synonym Information And Compare

Oct 29, 2013

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 ?

View 5 Replies


ADVERTISEMENT

How To Use Synonym In Stored Procedure

Aug 28, 2009

how to use a synonym in a stored procedure.

I have created a public synonym for a remote table on a different schema.

Im now trying to use the synonym to load that data into a temporary table in my schema using a stored procedure and im getting an error.

how to use a synonym in a stored procedure.

View 5 Replies View Related

Private Synonym Inside A Package?

Apr 25, 2012

I'm making a function A that does many calls to procedures in an other package B. To make this function more readable, I'd like to specify synonyms for the procedures in B. I only need the synonyms inside this function, I don't want to make database synonyms.

For example:

Function get_all_employees return clob
is
v_emp clob;
begin

[Code]....

View 1 Replies View Related

Unable To Create Public Synonym

May 22, 2011

I have exported and imported a schema from one server to another. In the source schema, I have a public synonym. I do not know the name of that synonym. In the destination schema, the public synonym is missing. How to create the public synonym which is missing in the destination database? In the source, I queried dba_synonyms, all_synonyms... but it returns no rows selected.

View 2 Replies View Related

SQL & PL/SQL :: Find Out Base Table Of Synonym?

Jun 10, 2011

How to find out the base table of a synonym?

View 3 Replies View Related

PL/SQL :: Creating View And Public Synonym With The Same Name?

Feb 15, 2013

I am able to create view and the public synonym with the same name but when I am quering view result is showing .

Is there any logic behind this .

CREATE OR REPLACE VIEW emp_dtls as SELECT * FROM emp;
CREATE PUBLIC synonym emp_dtls for emp;
SELECT * FROM emp_dtls;

view result is showing

View 3 Replies View Related

Circular Synonym Error While Importing Dump?

Mar 5, 2011

I have a db instance in which several schemas are there. I have taken a dump of a particular schema(user) using oracle exp command

exp <username>/<passwd>@<dbname> FULL=y FILE=export.dmp LOG=exportdb.log CONSISTENT=y

Now I have another db where I wish to import the above dump. This is not a empty db, however, I have dropped the particular user from this db for which I have created a dump above. Then I have created the same user using 'create user....'.And now I am trying to import the above dump into this.

imp '<username>/<passwd>@<dbname>' FILE=C:\DUMP\Dump\export.dmp LOG=C:\DUMP\logs\imp_dmp.log FULL=Y

import goes fine but I gets the circular synonym error for some of the types.

IMP-00003: ORACLE error 4055 encountered
ORA-04055: Aborted: "O_BULK_TARGET_SELECTOR" formed a non-REF mutually-dependent cycle with "T_GENERAL_IDLIST".
ORA-06550: line 5, column 25:
PLS-00421: circular synonym 'PUBLIC.T_GENERAL_IDLIST'

The db from which I created the dmp has no errors for these objects, but while impoting it gives these errors.I have even tried taking the whole database dmp(not a particular user), and importing it into full empty database. Then also I gets the same error.

View 3 Replies View Related

SQL & PL/SQL :: Unable To Disable Trigger On Synonym Table

Apr 19, 2012

I have schema a and b in the same database with synonym table a (schema a) to schema b. When I try to disable trigger from table a in schema b; I got this message:

ORA-00942: table or view does not exist

I have granted all permissions to schema b and I am able to SELECT FROM table a in schema b

View 11 Replies View Related

SQL & PL/SQL :: How Make Complete Schema Public Synonym

Apr 15, 2013

how to make the complete schema public synonym, instead of creating public synonym object by object.

View 2 Replies View Related

SQL & PL/SQL :: Script To Find Out Objects Synonym And Privs

Jun 17, 2011

There are over 100 objects like tables,procedures,packages,triggers in my database.I am looking for a script/sql which should list out synonyms and grant privs on it.

View 1 Replies View Related

PL/SQL :: Create A Trigger To Check If Synonym Already Exists In DB

Mar 29, 2013

How can I create a trigger to check if synonym already exists in db and if exists then don't create synonym.

my work: ( this is just like an outline i prepared)

select * from all_synonyms;
declare
s_exists number;
begin
-- check whether the synonym exists
select 1 into s_exists from all_synonyms;
-- an error gets raise if it doesn't
exception when no_data_found then
-- DDL has to be done inside
execute immediate ' create or replace synonym';
end;
/

View 16 Replies View Related

PL/SQL :: Reverse Update - Create Synonym In Different Schema

Aug 8, 2012

I have table a in database 1 . Now i have created the MV for table a in database 2.

then i am going to create a synonym in different schema in the database 2.

Now i want to update the synonym in database 2 the same as to refresh in table a database 1.

How to achieve this??

View 2 Replies View Related

Server Administration :: Remove Synonym STATS$SNAPSHOT-ID?

Sep 11, 2007

I've got to collect statistics by DBMS_STAT. For the first time, the spcreate.sql is to be called, however, it returned one error following:

If this script is automatically called from spcreate (which is the supported method), all STATSPACK segments will be created in the PERFSTAT user's default tablespace.

Using perfstat tablespace to store Statspack objects

... Creating STATS$SNAPSHOT_ID Sequence Sequence created.

create public synonym STATS$SNAPSHOT_ID for STATS$SNAPSHOT_ID
*
ERROR at line 1:
ORA-00955: name is already used by an existing object Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options

And then, I checked it again with its owner:

SQL> select owner, synonym_name
2 from dba_synonyms
3 where synonym_name='STATS$SNAPSHOT_ID';

OWNER SYNONYM_NAME
------------------------------ ------------------------------
PUBLIC STATS$SNAPSHOT_ID

Then, I checked again after dropping schema PERFSTAT:

SQL> conn /as sysdba
Connected.
SQL>
SQL> select username, account_status

[code]...

What's the STATS@SNAPSHOT_ID synonym? Can I remove it from PUBLIC owner and recreate?

View 13 Replies View Related

SQL & PL/SQL :: Is Select Privileges (grants) Needed For Created Synonym

Jun 4, 2012

After created synonym, Is select privileges(grants) needed for created synonym? SQL> create or replace synonym gm_holding for gmblbpna. gm_ holding;

Synonym created.

SQL> select *
2 from gm_holding;
from gm_holding
*
ERROR at line 2: ORA-00942: table or view does not exist

SQL> connect gmblbpna/gmblbpna@o03gpa0
Connected.
SQL> grant select on gm_holding to solvency;

Grant succeeded.

SQL> connect solvency/solvency@o03gpa0
Connected.
SQL> select count(1)
2 from gm_holding;
COUNT(1)
----------
346742
SQL>

why grant need for synonym?

View 4 Replies View Related

Server Utilities :: Unable To Create Public Synonym?

May 22, 2011

I have exported and imported a schema from one server to another. In the source schema, I have a public synonym. I do not know the name of that synonym. In the destination schema, the public synonym is missing. How to create the public synonym which is missing in the destination database?In the source, I queried dba_synonyms, all_synonyms... but it returns no rows selected.

View 3 Replies View Related

SQL & PL/SQL :: Error When Create Synonym / ORA-01031 / Insufficient Privileges

Mar 13, 2013

from sysdba i grant to my user hospital creat any synonym but give me this error why ?

SQL> conn sys as sysdba
Enter password:
Connected.
SQL> grant create any synonym to hospital
2 ;

Grant succeeded.

SQL> conn hospital
Enter password:
Connected.
SQL> create public synonym Sur
2 for surgeries;
create public synonym Sur
*
ERROR at line 1:
ORA-01031: insufficient privileges

View 9 Replies View Related

SQL & PL/SQL :: DBMS Scheduler Doesn't Support Synonym Table (DBLINK Used)

May 12, 2011

we are facing an issue with the dbms scheduler jobs, which is not processing the synonym which is created via dblink from anthoer schema.

Let me explain the situation.

Table in Schema :APP_COMMON DB: APPL
-------------------------------------

CREATE TABLE TEST_LOG (A VARCHAR2(10));

INSERT TEST_LOG VALUES ('TESTED');

GRANT SELECT ON TEST_LOG to APP_GEN ;

Table in Schema :APP_GEN DB: APPL
-------------------------------------

CREATE SYNONYM TEST_LOG FOR APP_COMMON.TEST_LOG;

SELECT * from TEST_LOG;

-- it returns the value

Table in Schema :APP_GEN DB: REPORT
-------------------------------------

This is the different DB (we have 2 DB's, one for report db and one for application DB). here we create the DB link (connected DB menthod) . Since we have the password sync between the databases, we create the DBLINK without user id and password.

CREATE DATABASE LINK "APPL_LINK"
USING 'APPL' ;

CREATE SYNONYM TEST_LOG FOR TEST_LOG@APPL_LINK;

SELECT * from TEST_LOG;
--it returns the value.

Now in the same DB, we have a scheduler which will run for every min.

Now Scheduler is not selecting this table. Rather not processing the synonym(TEST_LOG). Not able to capture the exception also.

View 9 Replies View Related

Security :: Unable To See Data In Base Table Where Can Be Viewed In Synonym?

Sep 9, 2011

I have one schema argus_app where there is a table cfg_enterprise. There is a view v$cfg_enterprisewhich selects data from cfg_enterprise and there is apublic synonym cfg_enterprise for v$cfg_enterprise.

When I login to argus_app and select from cfg_enterprise there is no data where as i log in to sys and select I can see data.

SQL> conn /as sysdba
Connected.
SQL> select enterprise_name from cfg_enterprise;

ENTERPRISE_NAME

[code]...

what would be creating this problem.

View 5 Replies View Related

SQL & PL/SQL :: What Is Bulk COllect

Jan 30, 2011

What is Bulk COllect and How it can be use

View 2 Replies View Related

SQL & PL/SQL :: Bulk Collect Of Procedure

Apr 21, 2011

I am finishing using procedure migration from HP-ux server to Oracle linux server. I am currently testing migration by procedure, and there's time limit, so I like to use bulk collect and other faster way to do that, however I could convert normal procedure to bulk procedure.

here's my script of old table, new table, normal procedure, and my new procedure.which parts can be corrected to use bulk collect or bulk insert?

CREATE TABLE ORAASFS.NATELIST
(
MINNO VARCHAR2(12 BYTE),
PHONENO VARCHAR2(12 BYTE)
)
CREATE TABLE ORAASFS.TM_SFS_USR_NATE_LST_01
(
[code]......

View 1 Replies View Related

SQL & PL/SQL :: Bulk Collect Into Varray

Mar 7, 2011

I'm getting error message

PLS-00386: type mismatch found at 'RECORD_VARRAY' between FETCH cursor and INTO variables

while executing the below code.

PROCEDURE MAIN_BULK_COLLECT(P_STARTDATE IN TIMESTAMP DEFAULT NULL,
P_ENDDATE IN TIMESTAMP DEFAULT NULL,
P_ROW_COUNT IN NUMBER DEFAULT 1000,
O_RECORD_VARRAY OUT NOCOPY SSAM_VARRAY_TYPE,
P_ERROR OUT VARCHAR2) AS
[code]....

I'm able to run the program successfully using FOR LOOP instead of BULK COLLECT but wish to run using bulk collect.

View 6 Replies View Related

SQL & PL/SQL :: Query On Bulk Collect

Feb 24, 2011

Okay I am not asking for detailed solution here but I have quick query.

One of the procedure have this cursor query returning say 10 columns and have declared an collection of that cursor type.

Now the cursor is bulk fetched in the collection.

By any means it is possible to happen that bulk collection will scramble column values ?

The cursor seem to return expected output. But when table insert happens using the collection there I see values are mismatched.

I was wondering if bulk collect can be an issue ?

View 4 Replies View Related

SQL & PL/SQL :: Bulk Collect In Load

Mar 5, 2012

How to resolve this issue?

CREATE OR REPLACE PROCEDURE fast_proc
IS
TYPE ARRAY IS TABLE OF mkt_total_lvl_indx_dly_stg%ROWTYPE;
l_data ARRAY;
cursor C IS
SELECT *
[code]..........

show error

Error code

PROCEDURE fast_proc compiled
Warning: execution completed with warning
17/47 PL/SQL: ORA-03001: unimplemented feature
17/5 PL/SQL: SQL Statement ignored

View 13 Replies View Related

Bulk Collect With DBLink?

Feb 23, 2012

create or replace PROCEDURE CDR_PROC_ARCHIVE_ORDER_EXTRACT
IS
/*
Criteria to be followed to Order Archival

* Order Status should be 'Cancelled' or 'Complete'
* Order Closed date should be 6 months before
*
-- main Cursor to spool the Orders to be archived based on criteria

[code]...

View 1 Replies View Related

How To Collect Oracle 11g DB Configuration

Oct 28, 2013

I newly joined Oracle 11g DB related project.That oracle environment own our customer and we have only limited time and access to that DB.

 I could login that database by SQLPlus by sys user as sysdba but I do not know any DB configurations. How could I  collect Oracle 11g DB configuration information from SQLPlus ?

View 0 Replies View Related

SQL & PL/SQL :: Procedure Bulk Collect

Nov 26, 2010

identify what type of error is present in below procedure?

create or replace procedure test_bulk_load_type
as
type c1_owner is table of bulk_load_all_object.owner%type
index by binary_interger;
v_owner c1_owner;

[Code]....

View 7 Replies View Related

SQL & PL/SQL :: How To Collect Input Parameter In Procedure

Mar 4, 2010

I have a procedure, which is getting called from ado.net with a input parameter named p_inp_oids which is a character string like '(122,323,434,444)',

My procedure body contains a query whose WHERE clause contains

AND OID IN p_inp_oids

I cannot post the whole procedure. Also OID is number.How to collect that input parameter in my procedure?

View 24 Replies View Related

SQL & PL/SQL :: Handling Exceptions In Bulk Collect

Aug 17, 2012

For the following procedure if I send the existed employee number of emp table as input. The procedure is executing successfully. But if I send the employee number as input which does not exist in the emp table . The execution block does not handling the exception.

I am getting the following error.

ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "RAKULA.SP_TEST_EXCEPTION_BULK", line 8
ORA-06512: at line 7

If I use WHEN OTHERS exception then I am able to handle that exception. Why it's happening like this.

CREATE OR REPLACE PROCEDURE RAKULA.sp_test_exception_bulk(i_empno NUMBER)
IS
t type_test1;
BEGIN
SELECT deptno BULK COLLECT INTO t
FROM emp
WHERE empno=i_empno;
[code].......

how to handle that exception.

If I create the procedure without using

BULK COLLECT then I am able to handle that exception using WHEN NO_DATA_FOUND

In the following procedure I am able to handle the exception.

CREATE OR REPLACE PROCEDURE RAKULA.sp_test_exception(i_empno NUMBER,v_dept_no OUT NUMBER)
IS
BEGIN
SELECT deptno INTO v_dept_no FROM emp
WHERE empno=i_empno;
EXCEPTION
WHEN NO_DATA_FOUND THEN
dbms_output.put_line('employee number' ||i_empno|| 'does not exist');
END sp_test_exception;
/

View 2 Replies View Related

SQL & PL/SQL :: Bulk Collect Inside A Loop?

Mar 8, 2012

I have a select..bulk collect into clause which is inside a for loop as the query gets a parameter from the loop, Then, how to extend the collection rows for each iteration.

My collection is of a sql object type.

View 5 Replies View Related

SQL & PL/SQL :: Good Bulk Collect Limit?

Jul 21, 2011

The procedure uses bulk collect to fetch from a normal cursor, Then I am using for all to insert into target table, The number of rows are 234965470

Question: What should ideally be the limit for my bulk collect ?

According to below, it should be in hundreds[URL]...

I put a bulk collect limit of 50000 - took close to 2 hours then i tried 10000 - just 3 mins shorter than the above time But if you commit every 500 rows, Then is there not another theory that frequent commits is not good ?

Is there something I have to ask the DBAS ?

View 4 Replies View Related







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