sqlplus不使用服務名,直接使用IP地址連接Oracle


命令如下:

Oracle服務器地址: 192.168.2.181 端口:1521

用戶名:jans2002

密碼:password123

服務名SID: dbsvr

不用netmgr創建服務名,直接在命令行寫IP地址端口和服務名的命令行如下:

sqlplus  jans2002/password123@192.168.2.181:1521/dbsvr @filelist.sql

 

filelist.sql 文件內容如下:

set serveroutput on
begin
dbms_output.put_line('file filelist.sql executed.');
end;
/
@a.sql
@b.sql
exit

a.sql內容如下:

begin
dbms_output.put_line('file a.sql executed');
end;
/

b.sql內容如下:

begin
dbms_output.put_line('file b.sql executed.');
end;
/

執行結果如下:

Snap1


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM