Skip to content
  • About
Search
Close

Geodata Master

Oracle Database Technical Articles & GeoSpatial Data Technology

Month: January 2026

CREATE SCHEMA SQL Command in Oracle Database System

January 4, 2026 arcsdegeoLeave a comment

In Oracle database system, a “schema” account is actually a user and this user will be associated with a dedicated tablespace where database objects will be stored in. Having said that…there is a SQL command in Oracle called “create schema” but it actually doesn’t create the schema account (user)….it creates the objects and permissions associated with it.

Let us me first demonstrate how to create a schema account:

Will first create a tablespace and will call it “TS_HR” in pluggable database FREEPDB1:

  CREATE BIGFILE TABLESPACE “TS_HR” DATAFILE

  ‘/opt/oracle/oradata/FREE/FREEPDB1/HRD01.dbf’ SIZE 20M

  AUTOEXTEND ON NEXT 2M MAXSIZE 4000M

  LOGGING ONLINE PERMANENT BLOCKSIZE 8192

  EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT

 NOCOMPRESS  SEGMENT SPACE MANAGEMENT AUTO;

Then, I will create a database user (schema) with the name HR as follows with default tablespace TS_HR (execute the below SQL commands):

CREATE USER HR identified by hr

 DEFAULT TABLESPACE “TS_HR”

TEMPORARY TABLESPACE “TEMP”;

grant create session to HR;

grant resource to HR;

alter user hr quota unlimited on ts_hr;

alter user hr default role all;

Technically we are done….a schema account called “HR” is created in database system.

Now, how to use create schema SQL command….let me deonstrate:

Connect to the pluggable database as the schema account HR:

sqlplus “hr/hr”@FREEPDB1

SQL> CREATE SCHEMA AUTHORIZATION “HR”

CREATE TABLE dept

      (dept_code VARCHAR2(10)  PRIMARY KEY, dept_name VARCHAR2(20), description VARCHAR2(20))

   GRANT select ON dept TO hr_app;

Schema created.

Database table called “dept” created under HR schema and granted permission to pre-exisiting HR_APP account as shown above.

Important remark:  oracle introduced “schema only” account concept which will prevent the account/user from being directly authenticated and can be accessed through proxy setup.

SQL command is:  alter user hr no authentication;

Blog Stats

  • 904,750 hits

Recent Posts

  • CREATE SCHEMA SQL Command in Oracle Database System
  • Oracle Database Error: ORA-00600: internal error code, arguments: [qosdExpStatRead: expcnt mismatch], [65562], [26], [1144616], [1], [], [], [], [], [], [], []
  • Overcoming Blocking & Locking in Oracle 19c with max_idle_blocker_time parameter
  • Dropping AWR Snapshot is failing with ORA-13516: AWR Operation failed: AWR Schema is unavailable due maintenance
  • What’s New in Oracle 19.28 [19c with July 2025 RU]
Follow Geodata Master on WordPress.com

Top Posts & Pages

  • Oracle Database Product Life Cycle Support 26ai, 19c,18c, 12cR2 Long Term & Innovation Releases !
  • What's New in Oracle 19.28 [19c with July 2025 RU]
  • RMAN List Backup Summary command
  • Oracle datapump error ORA-39077: unable to subscribe agent KUPC$A_1_083325450472000
  • Dropping AWR Snapshot is failing with ORA-13516: AWR Operation failed: AWR Schema is unavailable due maintenance
  • Oracle 12c Database Architecture Image Diagram
  • physical standby errors ORA-00600 ORA-10567 ORA-10564 ORA-01110 ORA-10561
  • Oracle Enterprise Manager 13c Error ORA-06512: at "SYSMAN.EM_TARGET", line 9634
  • ORA-31633: unable to create master table while performing expdp operation
  • location of Oracle SQL Developer Connections File

Archives

  • January 2026
  • November 2025
  • September 2025
  • August 2025
  • July 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • November 2024
  • September 2024
  • July 2024
  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • August 2023
  • July 2023
  • June 2023
  • April 2023
  • January 2023
  • December 2022
  • October 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • March 2022
  • February 2022
  • January 2022
  • October 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • April 2020
  • March 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • April 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013

Recent Comments

arcsdegeo's avatararcsdegeo on Oracle Database DATAPATCH Para…
Alexander Bilciu's avatarAlexander Bilciu on Oracle Database DATAPATCH Para…
andrew's avatarandrew on Oracle Database 23ai/26ai Sche…
Ali Ahmed's avatarAli Ahmed on Execute privileges on required…
Oracle datapump erro… on How To Apply Data Pump Recomme…

Search in my blog

Follow Geodata Master on WordPress.com

Top Posts & Pages

  • Oracle Database Product Life Cycle Support 26ai, 19c,18c, 12cR2 Long Term & Innovation Releases !
  • What's New in Oracle 19.28 [19c with July 2025 RU]
  • RMAN List Backup Summary command
  • Oracle datapump error ORA-39077: unable to subscribe agent KUPC$A_1_083325450472000
  • Dropping AWR Snapshot is failing with ORA-13516: AWR Operation failed: AWR Schema is unavailable due maintenance
  • Oracle 12c Database Architecture Image Diagram
  • physical standby errors ORA-00600 ORA-10567 ORA-10564 ORA-01110 ORA-10561
  • Oracle Enterprise Manager 13c Error ORA-06512: at "SYSMAN.EM_TARGET", line 9634
  • ORA-31633: unable to create master table while performing expdp operation
  • location of Oracle SQL Developer Connections File

Blog Stats

  • 904,750 hits

Archives

  • January 2026
  • November 2025
  • September 2025
  • August 2025
  • July 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • November 2024
  • September 2024
  • July 2024
  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • August 2023
  • July 2023
  • June 2023
  • April 2023
  • January 2023
  • December 2022
  • October 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • March 2022
  • February 2022
  • January 2022
  • October 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • April 2020
  • March 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • April 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
Blog at WordPress.com.
Back to top
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Geodata Master
    • Join 29 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Geodata Master
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...