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


ADVERTISEMENT

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

SQL & PL/SQL :: Find Dependent Objects?

Feb 9, 2011

Say i have a Procedure or package or any other stored subprogram, I need a script say to which i can pass this Procedure/Package/View etc name and then the code should give me the data results as which all other stored subprograms are used within the particular stored program name which we mentioned in our WHERE or Predicate clause

View 4 Replies View Related

Find Objects Containing A Specified Character Pattern

Mar 21, 2011

Is there a method or a tool out there that can do a search through an Oracle Schema to find objects ( tables, fields, stored procedures, etc) containing a specified character pattern ? For example : I would like to return all of the tables that contain fields containing the character string "ABC"

View 1 Replies View Related

SQL & PL/SQL :: Find Occurrences Of Some String In DB Objects?

Jul 11, 2012

How can i identify all the occurences of raise_application_error(-20XXX, '<the message>'); within all database objects, and replace them with other text?

View 4 Replies View Related

PL/SQL :: Find ALL Objects That Point To One Column

Oct 15, 2012

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE     11.2.0.3.0     Production
TNS for Solaris: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

I have multiple schemas, all which have tons of objects that point to one column of one table. I tried to look at v$sqltext, and v$sqlarea, but it doesn't seem to show as expected.

Is there a view that I can look at that will show me all the objects that relate to one column?

my situation. Had to change the data structure of this one column. Changed the default value from a Y to an L. I have packages, functions, triggers...etc... that deal with this one column. I need to ensure that I go through EACH one and edit them to reflect the change to the table column. And again, this spans multiple schemas that point back to it.

View 5 Replies View Related

Networking And Gateways :: How To Find All The Objects Referring To DB Link

Aug 10, 2012

We have two schemas which earlier used to be separate databases. There were DB links created to access the objects from one schema to the other schema when they were separate databases.

Since now they are just 2 separate schema with in the same Database, we would like to remove the DB Links and create synonyms to access those objects. These DB links were used in code in many places, it is becoming tough to find a way to implement this.

how to find all the objects that are using these objects or all the places these DB likns were being used.

View 1 Replies View Related

Server Utilities :: Find All Objects Of Schema HR In Imported Database

Jul 25, 2010

I imported a schema HR from export DUMP ....i can find all the objects of schema HR in the imported database... but i got an error for a plan_table which is assigned to USERS tablespace in the source database.. ...

HERE COMES THE ERROR I GOT DURING IMPORT:

[oracle@localhost mom]$ imp file=exp_schema_ref.dmp log=imp.ref.log fromuser=hr touser=hr commit=y
Import: Release 10.2.0.1.0 - Production on Mon Jul 26 00:03:57 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username: sys/sys as sysdba

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options

Export file created by EXPORT:V10.02.01 via direct path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
. importing HR's objects into HR
. . importing table "COUNTRIES" 25 rows imported
. . importing table "DEPARTMENTS" 27 rows imported
. . importing table "EMPLOYEES" 107 rows imported
[code]....

View 1 Replies View Related

Security :: Grant Privs To ROLES?

Feb 18, 2013

I am working on the roles and privs. I want to provide the privs on any object to any user through the roles. not a direct grant.I am having 150 users and 50 roles, I want to do this using the script is few strokes. for this I have tried to create a script but I am not able to make that.

For example There is 2 user scott and test

A. test is having select privs on scott.emp.
B. Test is having insert,delete,update privs on scott.emp;
c. DB is having 2 roles
scott_edit - insert,delete,update privs on tables
scott_read - select privs on tables

I want to revoke separate privs from test and want to given only scott_edit and scott_read (which(roles) is having all privs)

View 2 Replies View Related

Select Privs On Table To Existing User

Mar 18, 2013

I have granted select privs on below tables to an exisiting user.grant select on WEB.ALMSTAT to nms...I would like to view the privs that i have granted to nms user?

*"In production, nms user will need the ability to read the following tables:*

*WEB.ALMSTAT*
*NET.ASSET*
*NET.LOCATIONNAME"*

View 2 Replies View Related

Server Utilities :: Impdp Getting Grants And Privs

May 8, 2012

I did an export using the following parfile (see below) I want to import all the objects associated with this schema into another DB but I want don't want to over-write any of the permissions such as grants.

Is there a way I can get the grants into a sql file before I do the import. If so, provide an example.

cat exp_par

DUMPFILE=exp.dmp
LOGFILE=exp.log
DIRECTORY=DBBACKUP
schemas=t1

View 1 Replies View Related

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

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 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

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 :: Connect Role In Dba-role-privs?

Oct 10, 2012

But what I noticed is that user HIEL has a connect role but YONC does not. (Result set is below) Have searched for information but did not find what I was looking for. I did read something about backward compatibility.I'm leaning towards that thought since the other user YONC does not have this role.

Database: 11g R1

SQL> select * from dba_role_privs where grantee in ('YONC', 'HIEL') order by grantee;
GRANTEE GRANTED_ROLE ADM DEF
--------------------------- --------------------------- --- ---
YONC WCAIMS_INQUIRY NO YES
YONC ENDUSER NO YES
HIEL WCAIMS_CSR_ADDR NO YES

[code].........

View 4 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 :: Roles Given To Objects

Feb 27, 2011

I have granted execute, select, insert, update, delete privilege on objects to roles. Now i want to check status. we have around 2000 objects.

Require out put should be like this.

Object_name Object_Type Role_Granted
----------- ----------- ------------
Table1 Table ABC_ROLE
Table2 Table CDE_ROLE
PROCE1 PROCEDURE PROC_ROLE
Func1 FUNCTION FUN_ROLE

View 3 Replies View Related

SQL & PL/SQL :: Constraints On Objects?

Mar 5, 2012

Ive created a scenario to what im trying to achieve here so ignore how its set-up attribute wise.

CREATE TYPE object_obj AS OBJECT (
obj_id NUMBER,
NAME VARCHAR2(20),
age NUMBER) NOT FINAL;
/

CREATE TYPE object_ext UNDER object_obj (
course_name VARCHAR2(20));

/
CREATE TYPE object_ext2 UNDER object_obj (
location VARCHAR2(20);
/

CREATE TABLE object_tab OF object_obj(obj_id PRIMARY KEY);
/

Now for the course_name i need to make sure it can only be on of these three values ('Science','Math','English'). I can't find a way to apply this constraint without making a table. But then that creates another issue of how to insert the data from the main supertype (object_obj) and i only want the object_tab table and view the subtypes via a select query.

View 28 Replies View Related







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