SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
ORACLE DBMS: Managing Users & Tables




                                     by
                         Vazi Okhandiar, PMP, MSCS, MCT
                        NR Computer Learning Center
                       1835 W. Orangewood . Suite 200
                              Orange, CA 92868
                               www.nrclc.com




Vazi Okhandiar                                            Page 1
ORACLE DBMS: Managing Users & Tables

The article consists of perform following 3 tasks using Oracle Relational Database:
     Steps for create an account for a user
     Steps for user to login into Oracle instance and manage data
     Steps for Removing the account from the database instance


STEP 1: Create an account for a user: John
    1. Log into oracle instance as SYSDBA

        >> sqlplus / as sysdba

    2. Create User john with password smith

        SQL> CREATE USER john IDENTIIED BY smith;

    3. Assign the user (john) to use users as the default tablespace.

        SQL> ALTER USER john DEFAULT TABLESPACE users

    4. Assign the user (john) to use temp as the temporary tablespace

        SQL> ALTER USER john TEMPORARY TABLESPACE temp;

    5. Allow user (john) to connect to the database

        SQL> GRANT CONNECT TO john;

    6. Verify that account is created by listing all the users in the database
       SQL> Select * from all_users;

    7. Check if the account is locked;
       SQL> SELECT account_status FROM dba_users where username=’JOHN’;
       If the account is locked then unlock using following command.

        SQL> ALTER USER john ACCOUNT UNLOCK;

    8. Assign John unlimited quota on tablespace users.

        SQL> Alter user john quota unlimited on users;

    9. Grant resource to john

        SQL> GRANT RESOURCE TO user;

    10. Log out of sysdba account
        SQL> exit




Vazi Okhandiar                                                                        Page 2
ORACLE DBMS: Managing Users & Tables

STEP 2: Login as john
   1. Login as john

       >> sqlplus john/smith

   2. Create a table called mytable

       SQL> create table mytable (
              Id number(3),
              FirstName varchar2(15),
              LastName varchar2(15));

   3. Verify the table is created
      SQL> select table_name from all_tables order by table_name;
      Or
      SQL> select table_name from user_tables;

       You should see your table in the output list.

   4. 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’);

   5. Use SELECT command to verify the data is inserted into the table

       SQL> Select * from mytable;

       ID   FirstName      LastName
       1    John           Smith
       2    Jane           Doe
       3    Paul           Ryan


   6. Remove jane from the table

       SQL > DELETE FROM mytable WHERE id=2;

   7. Use SELECT command to verify the jane’s record has been deleted.

       SQL> Select * from mytable;

       ID   FirstName      LastName
       1    John           Smith
       3    Paul           Ryan

   8. Remove the table from the database


Vazi Okhandiar                                                                          Page 3
ORACLE DBMS: Managing Users & Tables

       SQL> DROP TABLE mytable;

   9. Verify the table is dropped
      SQL> select table_name from user_tables;

       Note: mytable should not be in the list of tables.

   10. Exit out of oracle as john
       SQL > exit


STEP 3: Remove the user

       1. Log in as sysdba
          >> sqlplus / as sysdba

       2. Verify john’s account is still in the database
          SQL> select * from all_users where username=’JOHN’;
          UserName         User_ID            CREATED
          JOHN             91                 03-FEB-13

       3. Remove the user from the database

           SQL> DROP USER john;

           If the user’s schema contains objects, then you must use the CASCADE clause to drop the
           user and the objects:

           SQL> DROP USER john CASCADE;

       4. Verify john’s account has been deleted from the database
          SQL> select * from all_users where username=’JOHN’;

           User dropped.



Reference: Oracle SQL*PLUS Command

http://docs.oracle.com/cd/B13789_01/server.101/b10758/sqlqraa.htm




Vazi Okhandiar                                                                                Page 4

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
 
Oracle architecture ppt
Oracle architecture pptOracle architecture ppt
Oracle architecture ppt
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 
Joins in SQL
Joins in SQLJoins in SQL
Joins in SQL
 
User, roles and privileges
User, roles and privilegesUser, roles and privileges
User, roles and privileges
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
 
Less07 storage
Less07 storageLess07 storage
Less07 storage
 
IO Resource Management on Exadata
IO Resource Management on ExadataIO Resource Management on Exadata
IO Resource Management on Exadata
 
More mastering the art of indexing
More mastering the art of indexingMore mastering the art of indexing
More mastering the art of indexing
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Db2 tutorial
Db2 tutorialDb2 tutorial
Db2 tutorial
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overview
 
Database
DatabaseDatabase
Database
 
Triggers and Stored Procedures
Triggers and Stored ProceduresTriggers and Stored Procedures
Triggers and Stored Procedures
 
Database Administrator
Database AdministratorDatabase Administrator
Database Administrator
 
Oracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptOracle Database SQL Tuning Concept
Oracle Database SQL Tuning Concept
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
Introduction to PL/SQL
Introduction to PL/SQLIntroduction to PL/SQL
Introduction to PL/SQL
 

Destaque

Database Design Queries
Database Design QueriesDatabase Design Queries
Database Design Queriesckrampert
 
Data flow in Extraction of ETL data warehousing
Data flow in Extraction of ETL data warehousingData flow in Extraction of ETL data warehousing
Data flow in Extraction of ETL data warehousingDr. Dipti Patil
 
Taming the ETL beast: How LinkedIn uses metadata to run complex ETL flows rel...
Taming the ETL beast: How LinkedIn uses metadata to run complex ETL flows rel...Taming the ETL beast: How LinkedIn uses metadata to run complex ETL flows rel...
Taming the ETL beast: How LinkedIn uses metadata to run complex ETL flows rel...rajappaiyer
 
ETL Validator: Flat File Validation
ETL Validator: Flat File ValidationETL Validator: Flat File Validation
ETL Validator: Flat File ValidationDatagaps Inc
 
Capacity Management of an ETL System
Capacity Management of an ETL SystemCapacity Management of an ETL System
Capacity Management of an ETL SystemASHOK BHATLA
 
ETL Validator: Creating Data Model
ETL Validator: Creating Data ModelETL Validator: Creating Data Model
ETL Validator: Creating Data ModelDatagaps Inc
 
Crossref webinar - Maintaining your metadata - latest
Crossref webinar - Maintaining your metadata - latestCrossref webinar - Maintaining your metadata - latest
Crossref webinar - Maintaining your metadata - latestCrossref
 
(BDT303) Construct Your ETL Pipeline with AWS Data Pipeline, Amazon EMR, and ...
(BDT303) Construct Your ETL Pipeline with AWS Data Pipeline, Amazon EMR, and ...(BDT303) Construct Your ETL Pipeline with AWS Data Pipeline, Amazon EMR, and ...
(BDT303) Construct Your ETL Pipeline with AWS Data Pipeline, Amazon EMR, and ...Amazon Web Services
 
Seven building blocks for MDM
Seven building blocks for MDMSeven building blocks for MDM
Seven building blocks for MDMKousik Mukherjee
 
Building the Data Lake with Azure Data Factory and Data Lake Analytics
Building the Data Lake with Azure Data Factory and Data Lake AnalyticsBuilding the Data Lake with Azure Data Factory and Data Lake Analytics
Building the Data Lake with Azure Data Factory and Data Lake AnalyticsKhalid Salama
 
How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...Christopher Bradley
 
State of Digital Transformation 2016. Altimeter Report
State of Digital Transformation 2016. Altimeter ReportState of Digital Transformation 2016. Altimeter Report
State of Digital Transformation 2016. Altimeter ReportDen Reymer
 
Gartner: Top 10 Strategic Technology Trends 2016
Gartner: Top 10 Strategic Technology Trends 2016Gartner: Top 10 Strategic Technology Trends 2016
Gartner: Top 10 Strategic Technology Trends 2016Den Reymer
 
Data Warehouse Modeling
Data Warehouse ModelingData Warehouse Modeling
Data Warehouse Modelingvivekjv
 
Data Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesData Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesIvo Andreev
 
Quack Chat: Diving into Data Governance
Quack Chat: Diving into Data Governance Quack Chat: Diving into Data Governance
Quack Chat: Diving into Data Governance IDERA Software
 
Gartner TOP 10 Strategic Technology Trends 2017
Gartner TOP 10 Strategic Technology Trends 2017Gartner TOP 10 Strategic Technology Trends 2017
Gartner TOP 10 Strategic Technology Trends 2017Den Reymer
 
Big Data Analytics with Hadoop
Big Data Analytics with HadoopBig Data Analytics with Hadoop
Big Data Analytics with HadoopPhilippe Julio
 

Destaque (20)

Database Design Queries
Database Design QueriesDatabase Design Queries
Database Design Queries
 
Thomafluid I (Türk)
Thomafluid I (Türk)Thomafluid I (Türk)
Thomafluid I (Türk)
 
Data flow in Extraction of ETL data warehousing
Data flow in Extraction of ETL data warehousingData flow in Extraction of ETL data warehousing
Data flow in Extraction of ETL data warehousing
 
Taming the ETL beast: How LinkedIn uses metadata to run complex ETL flows rel...
Taming the ETL beast: How LinkedIn uses metadata to run complex ETL flows rel...Taming the ETL beast: How LinkedIn uses metadata to run complex ETL flows rel...
Taming the ETL beast: How LinkedIn uses metadata to run complex ETL flows rel...
 
ETL Validator: Flat File Validation
ETL Validator: Flat File ValidationETL Validator: Flat File Validation
ETL Validator: Flat File Validation
 
Capacity Management of an ETL System
Capacity Management of an ETL SystemCapacity Management of an ETL System
Capacity Management of an ETL System
 
ETL Validator: Creating Data Model
ETL Validator: Creating Data ModelETL Validator: Creating Data Model
ETL Validator: Creating Data Model
 
Crossref webinar - Maintaining your metadata - latest
Crossref webinar - Maintaining your metadata - latestCrossref webinar - Maintaining your metadata - latest
Crossref webinar - Maintaining your metadata - latest
 
(BDT303) Construct Your ETL Pipeline with AWS Data Pipeline, Amazon EMR, and ...
(BDT303) Construct Your ETL Pipeline with AWS Data Pipeline, Amazon EMR, and ...(BDT303) Construct Your ETL Pipeline with AWS Data Pipeline, Amazon EMR, and ...
(BDT303) Construct Your ETL Pipeline with AWS Data Pipeline, Amazon EMR, and ...
 
Seven building blocks for MDM
Seven building blocks for MDMSeven building blocks for MDM
Seven building blocks for MDM
 
Building the Data Lake with Azure Data Factory and Data Lake Analytics
Building the Data Lake with Azure Data Factory and Data Lake AnalyticsBuilding the Data Lake with Azure Data Factory and Data Lake Analytics
Building the Data Lake with Azure Data Factory and Data Lake Analytics
 
How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...
 
State of Digital Transformation 2016. Altimeter Report
State of Digital Transformation 2016. Altimeter ReportState of Digital Transformation 2016. Altimeter Report
State of Digital Transformation 2016. Altimeter Report
 
Introduction to ETL and Data Integration
Introduction to ETL and Data IntegrationIntroduction to ETL and Data Integration
Introduction to ETL and Data Integration
 
Gartner: Top 10 Strategic Technology Trends 2016
Gartner: Top 10 Strategic Technology Trends 2016Gartner: Top 10 Strategic Technology Trends 2016
Gartner: Top 10 Strategic Technology Trends 2016
 
Data Warehouse Modeling
Data Warehouse ModelingData Warehouse Modeling
Data Warehouse Modeling
 
Data Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesData Warehouse Design and Best Practices
Data Warehouse Design and Best Practices
 
Quack Chat: Diving into Data Governance
Quack Chat: Diving into Data Governance Quack Chat: Diving into Data Governance
Quack Chat: Diving into Data Governance
 
Gartner TOP 10 Strategic Technology Trends 2017
Gartner TOP 10 Strategic Technology Trends 2017Gartner TOP 10 Strategic Technology Trends 2017
Gartner TOP 10 Strategic Technology Trends 2017
 
Big Data Analytics with Hadoop
Big Data Analytics with HadoopBig Data Analytics with Hadoop
Big Data Analytics with Hadoop
 

Semelhante a Manage users & tables in Oracle Database

12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4uzzal basak
 
Proxy authentication Itoug TechDays 2019
Proxy authentication Itoug TechDays 2019Proxy authentication Itoug TechDays 2019
Proxy authentication Itoug TechDays 2019Enrico Cairo
 
Create user database management security
Create user  database management securityCreate user  database management security
Create user database management securityGirija Muscut
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission processK Kumar Guduru
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly databaseAnar Godjaev
 
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)Pini Dibask
 
DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified Pini Dibask
 
Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016Colin O'Dell
 
Pluggable database tutorial 2
Pluggable database tutorial 2Pluggable database tutorial 2
Pluggable database tutorial 2Osama Mustafa
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userDesty Yani
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
Hacking Your Way to Better Security - PHP South Africa 2016
Hacking Your Way to Better Security - PHP South Africa 2016Hacking Your Way to Better Security - PHP South Africa 2016
Hacking Your Way to Better Security - PHP South Africa 2016Colin O'Dell
 
Hacking Your Way To Better Security - Dutch PHP Conference 2016
Hacking Your Way To Better Security - Dutch PHP Conference 2016Hacking Your Way To Better Security - Dutch PHP Conference 2016
Hacking Your Way To Better Security - Dutch PHP Conference 2016Colin O'Dell
 
Hacking Your Way To Better Security
Hacking Your Way To Better SecurityHacking Your Way To Better Security
Hacking Your Way To Better SecurityColin O'Dell
 
Owasp Indy Q2 2012 Advanced SQLi
Owasp Indy Q2 2012 Advanced SQLiOwasp Indy Q2 2012 Advanced SQLi
Owasp Indy Q2 2012 Advanced SQLiowaspindy
 

Semelhante a Manage users & tables in Oracle Database (20)

12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4
 
Proxy authentication Itoug TechDays 2019
Proxy authentication Itoug TechDays 2019Proxy authentication Itoug TechDays 2019
Proxy authentication Itoug TechDays 2019
 
Create user database management security
Create user  database management securityCreate user  database management security
Create user database management security
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission process
 
MySQL
MySQLMySQL
MySQL
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
 
Mysql
MysqlMysql
Mysql
 
1.1 sql create and drop database statement
1.1 sql create and drop database statement1.1 sql create and drop database statement
1.1 sql create and drop database statement
 
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
 
DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified
 
Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016
 
Pluggable database tutorial 2
Pluggable database tutorial 2Pluggable database tutorial 2
Pluggable database tutorial 2
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan user
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
Hacking Your Way to Better Security - PHP South Africa 2016
Hacking Your Way to Better Security - PHP South Africa 2016Hacking Your Way to Better Security - PHP South Africa 2016
Hacking Your Way to Better Security - PHP South Africa 2016
 
Hacking Your Way To Better Security - Dutch PHP Conference 2016
Hacking Your Way To Better Security - Dutch PHP Conference 2016Hacking Your Way To Better Security - Dutch PHP Conference 2016
Hacking Your Way To Better Security - Dutch PHP Conference 2016
 
Hacking Your Way To Better Security
Hacking Your Way To Better SecurityHacking Your Way To Better Security
Hacking Your Way To Better Security
 
Owasp Indy Q2 2012 Advanced SQLi
Owasp Indy Q2 2012 Advanced SQLiOwasp Indy Q2 2012 Advanced SQLi
Owasp Indy Q2 2012 Advanced SQLi
 
ActiveRecord
ActiveRecordActiveRecord
ActiveRecord
 

Mais de NR Computer Learning Center

App Development with Apple Swift Certification at Certiport Centers
App Development with Apple Swift Certification at Certiport CentersApp Development with Apple Swift Certification at Certiport Centers
App Development with Apple Swift Certification at Certiport CentersNR Computer Learning Center
 
Building a Dashboard in an hour with Power Pivot and Power BI
Building a Dashboard in an hour with Power Pivot and Power BIBuilding a Dashboard in an hour with Power Pivot and Power BI
Building a Dashboard in an hour with Power Pivot and Power BINR Computer Learning Center
 
Introduction to the basic mathematical concept with Python Turtle.
Introduction to the basic mathematical concept with Python Turtle.Introduction to the basic mathematical concept with Python Turtle.
Introduction to the basic mathematical concept with Python Turtle.NR Computer Learning Center
 
Stem presentation - Pathways to Technology Oriented Careers
Stem presentation - Pathways to Technology Oriented CareersStem presentation - Pathways to Technology Oriented Careers
Stem presentation - Pathways to Technology Oriented CareersNR Computer Learning Center
 
Building a Dashboard in an Hour using Microsoft PowerPivot & Power BI
Building a Dashboard in an Hour using Microsoft PowerPivot & Power BIBuilding a Dashboard in an Hour using Microsoft PowerPivot & Power BI
Building a Dashboard in an Hour using Microsoft PowerPivot & Power BINR Computer Learning Center
 

Mais de NR Computer Learning Center (20)

Power BI Desktop Overview
Power BI Desktop Overview Power BI Desktop Overview
Power BI Desktop Overview
 
Building Dashboard with Excel
Building Dashboard with ExcelBuilding Dashboard with Excel
Building Dashboard with Excel
 
Introduction to Data Analytics
Introduction to Data AnalyticsIntroduction to Data Analytics
Introduction to Data Analytics
 
Python - Data Structures
Python - Data StructuresPython - Data Structures
Python - Data Structures
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Office 2019 tips & tricks
Office 2019 tips & tricksOffice 2019 tips & tricks
Office 2019 tips & tricks
 
App Development with Apple Swift Certification at Certiport Centers
App Development with Apple Swift Certification at Certiport CentersApp Development with Apple Swift Certification at Certiport Centers
App Development with Apple Swift Certification at Certiport Centers
 
Project management fundamentals
Project management fundamentalsProject management fundamentals
Project management fundamentals
 
National College Testing Association (NCTA)
National College Testing Association (NCTA)National College Testing Association (NCTA)
National College Testing Association (NCTA)
 
National College Testing Association (NCTA)
National College Testing Association (NCTA)National College Testing Association (NCTA)
National College Testing Association (NCTA)
 
Building a Dashboard in an hour with Power Pivot and Power BI
Building a Dashboard in an hour with Power Pivot and Power BIBuilding a Dashboard in an hour with Power Pivot and Power BI
Building a Dashboard in an hour with Power Pivot and Power BI
 
Introduction to the basic mathematical concept with Python Turtle.
Introduction to the basic mathematical concept with Python Turtle.Introduction to the basic mathematical concept with Python Turtle.
Introduction to the basic mathematical concept with Python Turtle.
 
Stem presentation - Pathways to Technology Oriented Careers
Stem presentation - Pathways to Technology Oriented CareersStem presentation - Pathways to Technology Oriented Careers
Stem presentation - Pathways to Technology Oriented Careers
 
MTA 98 364 - database fundamentals
MTA 98 364 - database fundamentalsMTA 98 364 - database fundamentals
MTA 98 364 - database fundamentals
 
MTA 361 software development fundamentals
MTA 361   software development fundamentalsMTA 361   software development fundamentals
MTA 361 software development fundamentals
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
Executive dashboard for small business
Executive dashboard for small businessExecutive dashboard for small business
Executive dashboard for small business
 
Building a Dashboard in an Hour using Microsoft PowerPivot & Power BI
Building a Dashboard in an Hour using Microsoft PowerPivot & Power BIBuilding a Dashboard in an Hour using Microsoft PowerPivot & Power BI
Building a Dashboard in an Hour using Microsoft PowerPivot & Power BI
 
Arduino for teens
Arduino for teensArduino for teens
Arduino for teens
 

Último

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 

Último (20)

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 

Manage users & tables in Oracle Database

  • 1. ORACLE DBMS: Managing Users & Tables by Vazi Okhandiar, PMP, MSCS, MCT NR Computer Learning Center 1835 W. Orangewood . Suite 200 Orange, CA 92868 www.nrclc.com Vazi Okhandiar Page 1
  • 2. ORACLE DBMS: Managing Users & Tables The article consists of perform following 3 tasks using Oracle Relational Database:  Steps for create an account for a user  Steps for user to login into Oracle instance and manage data  Steps for Removing the account from the database instance STEP 1: Create an account for a user: John 1. Log into oracle instance as SYSDBA >> sqlplus / as sysdba 2. Create User john with password smith SQL> CREATE USER john IDENTIIED BY smith; 3. Assign the user (john) to use users as the default tablespace. SQL> ALTER USER john DEFAULT TABLESPACE users 4. Assign the user (john) to use temp as the temporary tablespace SQL> ALTER USER john TEMPORARY TABLESPACE temp; 5. Allow user (john) to connect to the database SQL> GRANT CONNECT TO john; 6. Verify that account is created by listing all the users in the database SQL> Select * from all_users; 7. Check if the account is locked; SQL> SELECT account_status FROM dba_users where username=’JOHN’; If the account is locked then unlock using following command. SQL> ALTER USER john ACCOUNT UNLOCK; 8. Assign John unlimited quota on tablespace users. SQL> Alter user john quota unlimited on users; 9. Grant resource to john SQL> GRANT RESOURCE TO user; 10. Log out of sysdba account SQL> exit Vazi Okhandiar Page 2
  • 3. ORACLE DBMS: Managing Users & Tables STEP 2: Login as john 1. Login as john >> sqlplus john/smith 2. Create a table called mytable SQL> create table mytable ( Id number(3), FirstName varchar2(15), LastName varchar2(15)); 3. Verify the table is created SQL> select table_name from all_tables order by table_name; Or SQL> select table_name from user_tables; You should see your table in the output list. 4. 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’); 5. Use SELECT command to verify the data is inserted into the table SQL> Select * from mytable; ID FirstName LastName 1 John Smith 2 Jane Doe 3 Paul Ryan 6. Remove jane from the table SQL > DELETE FROM mytable WHERE id=2; 7. Use SELECT command to verify the jane’s record has been deleted. SQL> Select * from mytable; ID FirstName LastName 1 John Smith 3 Paul Ryan 8. Remove the table from the database Vazi Okhandiar Page 3
  • 4. ORACLE DBMS: Managing Users & Tables SQL> DROP TABLE mytable; 9. Verify the table is dropped SQL> select table_name from user_tables; Note: mytable should not be in the list of tables. 10. Exit out of oracle as john SQL > exit STEP 3: Remove the user 1. Log in as sysdba >> sqlplus / as sysdba 2. Verify john’s account is still in the database SQL> select * from all_users where username=’JOHN’; UserName User_ID CREATED JOHN 91 03-FEB-13 3. Remove the user from the database SQL> DROP USER john; If the user’s schema contains objects, then you must use the CASCADE clause to drop the user and the objects: SQL> DROP USER john CASCADE; 4. Verify john’s account has been deleted from the database SQL> select * from all_users where username=’JOHN’; User dropped. Reference: Oracle SQL*PLUS Command http://docs.oracle.com/cd/B13789_01/server.101/b10758/sqlqraa.htm Vazi Okhandiar Page 4