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


ADVERTISEMENT

Emulating MS Office NETWORK DAYS Function

Oct 29, 2010

The MS Office 'NETWORK DAYS' function allows you to subtract one date from another and return the number of 'workdays' between them. So it ignores Sat & Sun. There is an additional parameter that allows you to ignore holidays as well.

I'd like to subtract a 'Request Date' from SYSDATE and get just the number of 'workdays'.

View 3 Replies View Related

Create Toad Stored Procedure?

Mar 8, 2007

I am trying to create a stored procedure in TOAD. I've found example code on the Internet to write a stored procedure, but it doesn't seem to work with Toad. I tried to write the procedure and execute it to save it to the DB, and instead I keep getting error messages like "an INTO clause is expected in this SELECT statement" when I used the

CREATE OR REPLACE PROCEDURE testing
AS
BEGIN
SELECT *
FROM CPK;
END;

or "bad bind variable 'CPKS'" when I tried the following instead:

CREATE OR REPLACE PROCEDURE testing
AS
BEGIN
SELECT *
FROM CPK;
Into :Cpks;
END;

post some example code here with short explanations for me on how to write a stored procedure.

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

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

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

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

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

Server Administration :: Create User Email

Mar 22, 2011

I want whenever a user is created in database the server send me a mail about this.

View 3 Replies View Related

Create Dummy User Like Oracle On Linux OS?

Aug 28, 2013

Is it possible to take export import to the Oracle DB/Schema/Table from other linux user? i have plan to create dummy user like oracle on Linux box, so developer will use this dummy user and logging to oracle BOX and take the dump.  I have created one user "TEST" in linux OS. but what is the next? what privilege is required or take dump from other linux user? 

oracle:x:501:502::/home/oracle:/bin/bashtest:x:502:504::/home/test:/bin/bash

View 19 Replies View Related

Security :: Create User Using Java Shell

Mar 29, 2012

How to create user using java shell basis to using sysdba or sysoper access on isplplus and what is the location of java home in linux.

View 2 Replies View Related

Create File With (other) User Having Read Permission When Using Utl_file?

Dec 23, 2012

We have a requirement to create a file using UTL_FILE package. so we tried to generate the file in directory at UNIX level,for example "/tmp" which means when we executing the stored procedure which in turn calls UTL_FILE package and create a file say "a.txt". On checking the permission for "a.txt", it shows as follows

-rw-r----- oracle dba a.txt

this means read and write for oracle user, read for dba group and no permission for other user.

our requirement is to have the following privileges at UNIX level.

-rw-r--r-- oracle dba a.txt

Is it possible to do at oracle level since the file is owned by oracle user or at UNIX level (with out logging to oracle user)?

Environment: UNIX AIX 6.1 and Oracle 11.2.0.3

View 3 Replies View Related

SQL & PL/SQL :: Create Script That Prompts User To Enter Course ID Like ASP2

Apr 5, 2012

I am trying to create a script that prompts the user to enter a course id like ASP2 and will produce a list showing the name for the course and the name, phone and completion date for all employees that completed that course.

create table training
( trn_crsid char(4),
trn_name char(15),
trn_hours number(2),
primary key(trn_crsid)
[code]....

View 8 Replies View Related

Forms :: 6i Requirement - Create New User And Edit Existing One

Jun 10, 2011

I have a form with fields like, UserName, User ID Email Address. This is used to create new users & edit existing user information. I wanted to make the Email field mandatory. So i made the email field as 'Required' via Proerty Pallette. So when ever i create new users after this change, i get a message saying 'Field must be required' when i try to skip this email field.

However when i edit existing user information and try to save the data with no email address i am able to save. So, where when i try to save a user info with no email address, i should get a warning saying 'email address is required'. How to go about it and if i wil have to create any trigger.

View 5 Replies View Related

Security :: Create Or Modify User Information In OID Using DBMS_LDAP?

Aug 25, 2010

I am trying to create a custom package that creates users as well as modify user information in OID using DBMS_LDAP package. I was able to create the package but I am stuck on specifying the orcladmin password for the procedure DBMS_LDAP.simple_bind_s(my_session,'orcladmin','orcladminpwd');

I need to get the orcladmin password dynamically. Is there a way to achieve this?

We are planning to provide our application users the ability to add new users / modify their own OID information.

View 2 Replies View Related

Security :: Create User With Full Access On Default Tablespace?

Aug 12, 2011

i have been trying to create a user with full access on default Tablespace so that i can access all the objects without any restrictions for the new user.

View 7 Replies View Related

Backup & Recovery :: Create Another Instance For Catalog User To Import It

Jan 13, 2013

On production server i have the production database and i have another instance for recovery catalog database.and on DR server i have only one instance for production database .In the scenario of recovery,

- i did export for recovery catalog user
- i have latest rman backup for production database

On the DR server as i mention up , i have only on instance , my question is , i need to create another instance for recovery catalog user to import it ? or on the same target database on DR i can import the recovery catalog ?

View 3 Replies View Related

SQL & PL/SQL :: Create Trigger That Will Fire Whenever Any User Will Access Schema Of Oracle

Oct 31, 2011

I would like to create a trigger that will fire whenever any user will access to a Schema of Oracle DB (for each and every login). regardless the access will be through an application or SQLPLUS and this trigger must insert the below information into a table.

1) IP address
2) Machine Name
3) login time
4) logout time
5) name of accessed schema

writing this trigger and creating the table that will hold the required data.

View 6 Replies View Related

Forms :: How To Create User - Defined Search In Runtime Oracle 6i

Sep 24, 2012

Is it Possible to create User - defined Search forms in runtime oracle forms 6i . If One Having sample Forms

View 1 Replies View Related

Create A Query That Displays Number Of Unique Logon For Each User Per Day?

Feb 23, 2010

I have a table that has three columns.
UserId - DateStamp - Action

An action contains user activities such as "logon". A user may logon multiple times in a day.I'm trying to create a query that displays the number of unique logons for each user per day.

By doing the following:

select userid, to_char(creationtimestamp,'YYYY-MM-DD'), count(*)
from useraction
where action = 'logon'
group by to_char(creationtimestamp,'YYYY-MM-DD'), userid
order by to_char(creationtimestamp,'YYYY-MM-DD') desc;

I can get the following results
userid - date - count
1 - 2/21/2010 - 8
1 - 2/22/2010 - 3
2 - 2/22/2010 - 2
1 - 2/23/2010 - 1
4 - 2/23/2010 - 6
6 - 2/23/2010 - 1

What I'm trying to get is
2/21/2010 - 1
2/22/2010 - 2
2/22/2010 - 3

View 2 Replies View Related

Server Administration :: How To Create Best Profile For Huge User In Oracle Database

Mar 5, 2013

how to create best profile for huge user in oracle database user which take lagre uga memory.

View 5 Replies View Related

Application Express :: How To Create Report Where Depending On Field User Searches On

Oct 12, 2012

APEX 4.1
11g db
Internet explorer 8

I have a region with 4 fields - ID, name, address, telephone. A user can search on any one of theses fields, depending on which field they search on the query is different e.g. Searching on telephone is a different query to searching on address. The query will bring back the same columns, so I just need one report.

How do I create a report where depending on the field the user searches on, it uses the same report but different query.

View 6 Replies View Related

Server Administration :: Create / Drop User / Schema In Another Oracle Database Through Apex

Jul 7, 2012

Through an Oracle Apex application I need to create/drop a user/schema in another Oracle database. i.e., create/drop user remotely using an Oracle Apex application.

View 12 Replies View Related







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