windows 下使用sqlplus
1.连接数据库
找到tnsnames.ora 监听器配置
TESTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = "服务器端ip地址")(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb)
)
)
打开dos命令
输入tnping 你的监听名
打开sqlplus
sqlplus root/123456@TESTDB
开始运行sql语句