SQL & PL/SQL :: How To Check If User Has (create Table) Privilege

Jun 29, 2011

1.How to check a user has 'create table' privilege?

2.how to check a user has privilege to grant 'create table' privilege to other user ?

View 6 Replies


ADVERTISEMENT

SQL & PL/SQL :: How To Check System Views When Create Table Privilege

Jan 4, 2013

I'm new to oracle DB,i've been given access to Oracle as a user. when i try to create a table under my default schema i get the insufficient privileges error.

How do i check from the system views if i have create table privilege under my own schema?

View 2 Replies View Related

SQL & PL/SQL :: User Scott Having DBA Privilege

Oct 14, 2011

User Scott having DBA privilege

create or replace procedure pt is
l_count integer:=0;
v_sid varchar2(1000);
begin
SELECT name
INTO v_sid
FROM v$database;
dbms_output.put_line('SID='||v_sid);
end pt;

Warning: Procedure created with compilation errors.

SQL> sho err
Errors for PROCEDURE PT:

LINE/COL ERROR
-------- -----------------------------------------------------------
5/1 PL/SQL: SQL Statement ignored
7/9 PL/SQL: ORA-00942: table or view does not exist
SQL>

SQL> select name from v$database;
NAME
---------
ORCL

I can't access v$parameter,or v$database from a procedure?

View 1 Replies View Related

SQL & PL/SQL :: Execute Privilege On A Package Which Is In User

Dec 5, 2011

how will i know if i have execute privilege on a package which is in user?

View 6 Replies View Related

Security :: How To Know What Object Privilege A User Have

Nov 13, 2013

How to know what object/tab privileged a user have ? without connecting that user and using USER_TAB_PRIVS by connecting on that user I mean on DBA table .

View 0 Replies View Related

SQL & PL/SQL :: Check If Table Exist In Scheme - If Not Create As Original DDL

Aug 13, 2013

I have 20 or so tables, partitioned by range, indexed etc...soon these tables will be gone and i have to recreate them with the same definitions. I have to write a procedure(or script, it's up to me) which must:

1- check if table A exist in the scheme
2- if not create the table as the original ddl.

for 1 i've used smth like
-------------------------
SELECT count(*)
INTO a
FROM user_objects
WHERE object_name='A';

[code]....

so my question is how and what is the cleanest and fastest way to do this.? it's a lot DDLs,

View 17 Replies View Related

PL/SQL :: How To Grant Privilege On User1 Based On Privilege Of User2

Jun 20, 2013

I have 2 users in my oracle DB. They both have very different privileges and they both have too many different privileges. Now I want to grant user 1 the same privilege that user2 has while user1 keeps his existing privilege. How can this be done without manually comparing their difference and manually grant user 1 each privilege that he doesn't have? Or second option, can I override user 1's privilege with user 2's privileges?

View 2 Replies View Related

SQL & PL/SQL :: Direct Privilege Vs Privilege Through Roles

May 30, 2010

As we all know, privileges granted to a user through role are not visible from within a stored procedure. What is the reasoning behind this design?

Moreover, privileges granted through role are visible from anonymous PL/SQL block. Why such discrimination between anonymous PL/SQL and stored PL/SQL?

View 3 Replies View Related

SQL & PL/SQL :: Privilege - Just Drop Special One Table?

Jul 3, 2013

There two users a and b,and the table b.test_part.And one procedure under a ,text like below:

create or replace procedure a.sp_test
is
vs_sqls varchar2(32767);
begin
vs_sqls:='alter table b.test_part truncate partition p_day';
execute immediate vs_sqls;
end;

now,i have to grant drop any table to a.but in fact,i prefer to drop the special one table "b.test_partany" rather than any other table.how ? no by trigger!

View 5 Replies View Related

SQL & PL/SQL :: Privilege Required To Gather Table Statistics?

May 14, 2011

What privilege is required to gather table statistics using dbms_stats ?

View 2 Replies View Related

PL/SQL :: Create Trigger To Insert Data From One User To Another User In Same Database?

Apr 16, 2013

I Created One Trigger as Follows

CREATE OR REPLACE TRIGGER TRIGGER1
BEFORE INSERT
ON table1
FOR EACH ROW

[code]......

Here , I Want To Insert The Data From My User To Test User . In This Situation When I Execute The Above Trigger It Shows The Error PL/SQL: ORA-00942: table or view does not exist

View 3 Replies View Related

How To Check Quota Details For A User

Feb 14, 2013

We have a scenario where we need to get the details of quota details on different tablespaces for a user. Is there any way to get this information directly using some views etc.

I tried with following option.. but not found in this... i think we can get this TOAD some other tools. but i never tried using SQL directly...

SELECT dbms_metadata.get_ddl('USER','SCOTT') FROM dual;

View 4 Replies View Related

Change The Visibility Of Text Item When User Click On Check Box?

Jul 1, 2007

I have to change the visibility of text item when user click on check box.

If check box checked, item should be displayed only. On unchecked, hide.

View 1 Replies View Related

How To Create Check Constraint That Act As Foreign Key

Jul 10, 2012

I have table EMP & DEPT.

Can you give me sample "check" constraint so that when I enter an EMP (with status='active') without matching DEPT entry, the process will fail?

It will allow to enter EMP with status='inactive' only even if no matching DEPT entry. So foreign_key will not apply.

View 21 Replies View Related

Create Procedure To Create User In Oracle

Jan 19, 2012

I need to create PROCEDURE to create user in oracle

CREATE OR REPLACE PROCEDURE "CREATE_USER_ORACLE8"
(
USER_ID in VARCHAR2,
PASSWORD in VARCHAR2,
ROLES in VARCHAR2,
nReturnCode OUT NUMBER
)
BEGIN
[code].......

Compilation errors for PROCEDURE NOG.CREATE_USER_ORACLE8

Error: PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:

; is with authid deterministic parallel_enable as
Line: 9
Text: BEGIN

i want that the customer execute PROCEDURE (user_id,password,PROCEDURE )

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

SQL & PL/SQL :: Oracle - Create Procedure To Check Username And Password?

Aug 23, 2011

how can i create procedure to check username and password.

View 10 Replies View Related

Update Statement Which Updates User IDs In One Table With User IDs In Another Table?

Jun 17, 2009

I am trying to write an update statement which updates the User IDs in one table with the User IDs in another table. However I need to update statement to ignore any duplicates that are in the tables.

View 4 Replies View Related

Enterprise Manager :: What Is The Difference Between Create External Table Vs Create Table

Apr 29, 2011

What is the difference between CREATE EXTERNAL TABLE Vs CREATE TABLE .?

Is CREATE EXTERNAL TABLE included in CREATE TABLE?

View 3 Replies View Related

Forms :: Put One Check Box To Check All The Check Boxes?

Jul 30, 2011

I want to put one check box to check all the check boxes.how can i do this?

View 5 Replies View Related

Create Synonyms Of Another User's Tables

Jan 10, 2013

Suppose two users (CONNECT and RESOURCE roles) A and B who work on the same project. How can B create synonyms of all tables of A without asking admin to do that? Of course, we assume that these users have the CREATE SYNONYM privilege. My problem is that B does not have access to user_tables of A, so he cannot obtain the list of A's tables to create synonyms.

View 3 Replies View Related

Unable To Create User On Oracle DB

Nov 18, 2010

I have encountered a problem with oracle db where by i'm unable to create a user.

oracle@kapstadt4:/export/home/oracle/scripts> ls -l
total 12
-rw-rw-rw- 1 oracle dba 1115 Sep 10 15:34 crdb.sql
-rwxrwxrwx 1 oracle dba 429 Sep 10 15:39 create_advantage_user.sql
-rw-rw-rw- 1 oracle dba 597 Sep 10 15:38 create_advantage_user_objects.sql
-rw-rw-rw- 1 oracle dba 408 Sep 10 15:37 create_advantage_user_roles.sql
-rw-rw-rw- 1 oracle dba 976 Sep 10 16:04 tbs.sql
oracle@kapstadt4:/export/home/oracle/scripts> cat create_advantage_user.sql

-- creates an advantage database user
-- the role 'advantage_admin_user' must be available!

define user_name = &1
rem define default_table_space = &2

create user &user_name
identified by &user_name#123
default tablespace IN_DEV
temporary tablespace TEMP;
grant connect to &user_name;
grant resource to &user_name;
grant advantage_admin_user to &user_name;
connect &user_name/&user_name#123
@create_advantage_user_objects.sql

[Code] ........

View 5 Replies View Related

Security :: OID Create User Error

Aug 23, 2010

I am using Oracle Internet Directory to store user information and OID delegation administratibe services for user entry. An an admin I created a privileges group called admins. Users belonging to this group can create user, delete users, edit users, and edit groups. I created 'User A' and assigned him to the group. Now 'User A' creates 'User B' and assignes him to the group. However when 'User B' creates 'User C' he gets the error [LDAP: error code 50 - Insufficient Access Rights].

This happens even though 'User B' belongs to the admin group which has the privilege to create users.

View 1 Replies View Related

Security :: How To Create User Under Schema

Dec 5, 2012

To make users under one schema.

1) user should have access of all objects with limited privileges.

How can i make it under schema?

View 3 Replies View Related

How To Create Read Only User In Oracle

Nov 16, 2013

1. To create a read only user who can only query the views as well as db tables and views. 
2. How to create such a read-only user. 3. I have taken a full expdp backup of the production and trying to import it on the pre-production.

I use impdp

system/password table_exists_action=replace full = y dumpfile=file_name.dmp remap_schema=SYSTEM:NEW_USER remap_tablespace=SYSTEM:NEW_USER ;

This can replace and import the tables but it can't replace and add the constraints , do I have to add some other parameter in the syntax if so what it should.

View 11 Replies View Related

How To Create A User (Owner Of Coeus Schema)

Dec 9, 2010

On the database instance where you want to install Coeus, create a user who will be the owner of Coeus schema. This user should have at least the following privileges. CREATE TABLE, CREATE VIEW, CREATE PROCEDURE, CREATE PUBLIC SYNONYM, CREATE USER, CREATE ROLE, CREATE SEQUENCE, CREATE SESSION CREATE TRIGGER, AND CREATE TYPE. If you choose, you can grant DBA role to this user.

Note: Coeus Schema owner should have CREATE USER and ALTER USER right explicitly granted to it, not through a role like DBA.

View 3 Replies View Related

Create Another User User2 With Same Privileges Which User1 Has

Jan 24, 2012

I have created a user "user1" who has dba role.i wanted to create a another user "user2" with same privileges which user1 has. so i granted dba role to user2 but i dont want user2 to have "drop" privilege on any objects except his own objects.

View 1 Replies View Related

SQL & PL/SQL :: Emulating Toad Create User Script

May 14, 2012

Toad provided real nice output in a script format for a user if you want to copy it to another name user.

CREATE USER USER12
IDENTIFIED BY <password>
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
-- 2 Roles for USER12
GRANT DEVELOPER TO USER12;
[code].....

Does a sample query can produce this output? what tables I can get this informaition from. I know one of the tables is dba_users

View 16 Replies View Related

Security :: Create User With Non Expiring Password

Jul 7, 2011

I want to create oracle user with non expiring password or i want to create one oracle user and set the password as non expiring.

View 9 Replies View Related

Forms :: Create Menu Role With User

Jul 19, 2010

how to create menu with submenu according to user,

For Example :

Menu1 have got 02 SubMenu :
SubMenu1 just user1 see.
SubMenu2 just for user2.
And user3 could access SubMenu1 and SubMenu2.

View 1 Replies View Related







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