SQL*Plus: Difference between revisions

From Han Wiki
Jump to navigation Jump to search
add enable automatic shutdown and startup
add Connect to the database
 
Line 7: Line 7:
SQL> SHUTDOWN IMMEDIATE
SQL> SHUTDOWN IMMEDIATE
</source>
</source>


Start the database.
Start the database.
Line 14: Line 15:
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
</source>
</source>


Enable automatic shutdown and startup.
Enable automatic shutdown and startup.
Line 20: Line 22:
$ systemctl daemon-reload
$ systemctl daemon-reload
$ systemctl enable oracle-xe-18c
$ systemctl enable oracle-xe-18c
</source>
Connect to the database
<source lang="console">
$ sqlplus system@"chara/XEPDB12"
SQL*Plus: Release 18.0.0.0.0 - Production on Wed Jun 26 15:02:51 2019
Version 18.4.0.0.0
Copyright (c) 1982, 2018, Oracle.  All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: system
Enter password:
Last Successful login time: Fri Jun 21 2019 23:16:57 -06:00
Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0
SQL>
</source>
</source>

Latest revision as of 14:04, 26 June 2019

  • Last tested on Oracle 18.4.0.0.0, CentOS 7.6.1810 (2019-06-21)

Shutdown the database.

$ sqlplus / as sysdba
SQL> SHUTDOWN IMMEDIATE


Start the database.

SQL> STARTUP
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;


Enable automatic shutdown and startup.

$ systemctl daemon-reload
$ systemctl enable oracle-xe-18c


Connect to the database

$ sqlplus system@"chara/XEPDB12"

SQL*Plus: Release 18.0.0.0.0 - Production on Wed Jun 26 15:02:51 2019
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name: system
Enter password:
Last Successful login time: Fri Jun 21 2019 23:16:57 -06:00

Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

SQL>