sqlplus 에서 스크립트 저장 및 실행하는 방법
[oracle@test ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Nov 15 22:57:10 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
orcl
SQL> save test.sql
Wrote file test.sql
SQL> @test.sql
INSTANCE_NAME
----------------
orcl
SQL>
[oracle@test ~]$ cat test.sql
select instance_name from v$instance
/
[oracle@test ~]$
sqlplus 외부, 서버에서 직접 스크립트 실행하는 방법
[oracle@test ~]$
[oracle@test ~]$ sqlplus sys/Manager123#@orcl as sysdba @test.sql
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Nov 15 23:03:11 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
INSTANCE_NAME
----------------
orcl
SQL>
'Database > Oracle' 카테고리의 다른 글
20 - [Oracle 19C] Common users VS local users (0) | 2023.11.17 |
---|---|
19 - [Oracle 19C] Oracle Data Dictionary (0) | 2023.11.16 |
17 - [Oracle 19C] unlock the HR schema (0) | 2023.11.16 |
16 - [Oracle 19C] connecting using tnsnames.ora (0) | 2023.11.16 |
15 - [Oracle 19C] Easy connect method (0) | 2023.11.16 |