sql

Oracle 19c Installation in Windows11

Step 1. Install Oracle Database

  • Run the setup file as administrator and follow the procedure below.

  • If the following error occurs, go back to the beginning and change to ‘Software Only Settings’.

    • Creating and configuring a single instance database : Installing myoracle and database
    • Software Only Settings : Installing myoracle only

  • Run a cmd as administrator and enter the code below. (if you changed to ‘Software Only Settings’.)

    • C:\sql_lecture\WINDOWS.X64_193000_db_home>**dbca**

  • If the error above occurs again, proceed as follows.

Step 2. Create Tablespace by SQL Plus

  • Run SQL Plus as administrator and enter the username and password.

  • Enter the SQL code below.

    1
    2
    # Create a new tablespace
    CREATE TABLESPACE myts DATAFILE 'C:\sql_lecture\oradata\MYORACLE\myts.dbf' SIZE 100M AUTOEXTEND ON NEXT 5M;
    1
    2
    # Create a new user
    CREATE USER ora_user IDENTIFIED BY jiwon DEFAULT TABLESPACE MYTS TEMPORARY TABLESPACE TEMP;
    1
    2
    3
    4
    # Grant a DBA role to the user
    GRANT DBA TO ora_user;

    권한이 부여되었습니다.
    1
    2
    3
    4
    # Connect to the database as the user
    connect ora_user/jiwon;

    연결되었습니다.
    1
    2
    3
    4
    5
    6
    # Print out the currently logged-in username
    select user from dual;

    USER
    --------------------------------------------------------------------------------
    ORA_USER

Step 3. Install SQL Developer

  • Run the setup file.

    • Click No if the warning below occurs.

  • Run a CMD as administrator and enter the code below.

    • C:\WINDOWS\system32>lsnrctl status

  • If an Unknown error occurs as described above, run the Net Configuration Assistant.

  • If you input the code at the CMD again, the listener information is printed normally.

  • Create a new Database Access.

  • Tool > Setting > Database > NLS

  • Enter YYYY/MM/DD HH24:MI:SS in ‘Time Record Format’.

  • Write the query below and check the result.

    1
    SELECT user from DUAL;

  • Create a backup folder under the C drive and download expall.dmp and expcust.dmp

  • Run a CMD as administrator and enter the code below at the backup folder.

    1
    imp ora_user/evan file=expall.dmp log=empall.log ignore=y grants=y rows=y indexes=y full=y

    1
    imp ora_user/evan file=expcust.dmp log=expcust.log ignore=y grants=y rows=y indexes=y full=y

  • Write the query below and check the result.

    1
    SELECT table_name FROM user_tables;

  • In SQL Plus, make sure that the user is created correctly.

Share