• Share
  • Email
  • Embed
  • Like
  • Private Content
Managing users & tables using Oracle Enterprise Manage
 

Managing users & tables using Oracle Enterprise Manage

on

  • 1,882 views

nLearn to create users and manage them using Oracle Enterprise Manager

nLearn to create users and manage them using Oracle Enterprise Manager

Statistics

Views

Total Views
1,882
Views on SlideShare
1,882
Embed Views
0

Actions

Likes
0
Downloads
16
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Managing users & tables using Oracle Enterprise Manage Managing users & tables using Oracle Enterprise Manage Document Transcript

    • OEM: Managing Users & Tables by Vazi Okhandiar, PMP, MSCS, MCT NR Computer Learning Center 1835 W. Orangewood . Suite 200 Orange, CA 92868 www.nrclc.comVazi Okhandiar Page 1
    • OEM: Managing Users & TablesThe article consists of using Oracle Enterprise Manager to perform following 5 tasks:  Create an account for user john with password smith  Create a table MyTable  Login as user john to add and manage data in the database  Remove table MyTable from the database  Remove the user John from the database.Vazi Okhandiar Page 2
    • OEM: Managing Users & TablesPART 1: Create A User Account Log into OEM as sysdba Open Firefox. Type in the following URL: https://127.0.0.1:1158/em Username: sys Password: manager Connect As: SYSDBA Click on the Server Tab to open the server page.Vazi Okhandiar Page 3
    • OEM: Managing Users & Tables Select User in the Security Section on the Server page. This will open up the user page. Click on Create button to create a user Enter the user name, password, Default table and temporary table.      In the user name field enter john and in the password field  enter smith.Vazi Okhandiar Page 4
    • OEM: Managing Users & Tables To select a default tablespace  for the user, click on the find icon to view the list of available tablespaces. Select the USERS tablespace as the default tablespace and click on the Select button. Similarly to assign a temporary tablespace  for the user, click on the find icon to view the list of available tablespaces. Select the TEMP tablespace as the temporary tablespace and click on the Select button.Vazi Okhandiar Page 5
    • OEM: Managing Users & Tables The Create user screen should look similar to the one displayed below: Make sure the Status  is unlocked and click OK. Next we will assign the user permission so that the user can create a table, insert data into the table, select data from the table and drop the table. While you are in Create User Screen, click on the System Privileges tab.Vazi Okhandiar Page 6
    • OEM: Managing Users & Tables In the Available System Privileges window, find “CREATE ANY TABLE” and click on Move button to add it to the Selected System Privileges. Similarly, add “DROP ANY TABLE”, “SELECT ANY TABLE” and “INSERT ANY TABLE” to the Selected System Privileges window. Click on Apply button to apply the changes. Next we will assign the unlimited quota for using the tablespace USERS to the user we creating, in this case it is the user john. While you are in Create User screen, click on the Quotas tab. Select Unlimited from the drop down for the quota and click OK. Click OK again to create the user.Vazi Okhandiar Page 7
    • OEM: Managing Users & TablesPART II: Create A Table To create a table, click on the Schema tab. Click on the Table link in the Database objects. Click on the Create button to open the window for creating a new table.Vazi Okhandiar Page 8
    • OEM: Managing Users & Tables Select Standard and click on Continue button       In the name field, enter MYTABLE, to create a new table called MYTABLE.  In the Schema table, enter JOHN, to create the table as part of his database schema  In the Tablespace, enter USERS, to use the USERS tablespace to store MYTABLE and associated data.  In the Columns field, enter ID as integer with upto 3 digits and Firstname and Lastname of type VARCHAR2 with maximum capacity of 15 character.  Click OK when done.Vazi Okhandiar Page 9
    • OEM: Managing Users & Tables Verify that when you search for John’s schema, MYTABLE get listed as the result set.Vazi Okhandiar Page 10
    • OEM: Managing Users & TablesPART III: Login as John and insert Data in MYTABLE 1. Login as john >> sqlplus john/smith 2. Insert following records into a table. SQL> INSERT INTO mytable (ID, FirstName, LastName) Values (1,‘John’, ‘Smith’); SQL> INSERT INTO mytable (ID, FirstName, LastName) Values (2,‘Jane’, ‘Doe’); SQL> INSERT INTO mytable (ID, FirstName, LastName) Values (3,‘Paul’, ‘Ryan’); 3. Use SELECT command to verify the data in the table SQL> Select * from mytable; ID FirstName LastName 1 John Smith 2 Jane Doe 3 Paul Ryan 4. Remove jane from the table SQL > DELETE FROM mytable WHERE id=2; 5. Use SELECT command to verify the table is updated. SQL> Select * from mytable; ID FirstName LastName 1 John Smith 3 Paul RyanVazi Okhandiar Page 11
    • OEM: Managing Users & TablesPART IV: Dropping A TableTo remove a table from the database, click on Schema tab and select Tables in the Database Objectssection. In the Schema field, enter John and click on Go button. This will list the object owned by John. Select the object owned by John and click on Delete with Options button.Vazi Okhandiar Page 12
    • OEM: Managing Users & TablesPART V: Dropping the UserTo delete a user from the database, click on the server tab and then click on Users link under Securitysection. In the Users window, select the user John, and click on Delete button.Vazi Okhandiar Page 13
    • OEM: Managing Users & Tables Confirmation window will pop-up. Click on Yes button for confirm that you want to delete the user John. Once the User is deleted, the user will no longer have access to his/her account.Vazi Okhandiar Page 14