Stworzenie DB 1
Enter user-name: sys as sysdba
Enter password:
Mossaâb Baccouch
Enter user-name: sys as sysdba
Enter password:
Enter user-name: sys as sysdba
Enter password:
SQL> SHOW con_name;
CON_NAME
------------------------------
CDB$ROOT
SQL> ALTER SESSION SET CONTAINER = pdborcl;
Session altered.
SQL> SHOW con_name;
CON_NAME
------------------------------
PDBORCL
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> CREATE USER OT IDENTIFIED BY Orcl1234;
User created.
SQL> GRANT CONNECT, RESOURCE, DBA TO OT;
Grant succeeded.
SQL> CONNECT ot@pdborcl
Enter password:
Connected.
SQL>@path_to_sql_file
SQL>@c:\dbsample\ot_schema.sql
SQL> SELECT table_name FROM user_tables ORDER BY table_name;
SQL>@c:\dbsample\ot_data.sql
SQL> SELECT COUNT(*) FROM contacts;