命令如下:

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;
/

执行结果如下:

sqlplus不使用服务名,直接使用IP地址连接Oracle

相关文章:

  • 2022-02-08
  • 2021-11-18
  • 2022-12-23
  • 2021-11-25
  • 2021-11-23
  • 2021-12-13
猜你喜欢
  • 2022-12-23
  • 2022-02-17
  • 2021-07-09
  • 2022-12-23
  • 2022-02-09
  • 2022-01-13
  • 2022-12-23
相关资源
相似解决方案