以下是sqlplus在Debian上的使用教程:
libaio1
和libaio-dev
,命令为sudo apt-get update
和sudo apt-get install libaio1 libaio-dev
。wget https://download.oracle.com/otn_software/linux/instantclient/215000/instantclient-basiclite-linux.x64-21.5.0.0.0dbru.zip
等。/opt/oracle
等目录,如sudo unzip instantclient-basiclite-linux.x64-21.5.0.0.0dbru.zip -d /opt/oracle
。~/.bashrc
或~/.profile
,添加export ORACLE_HOME=/opt/oracle/instantclient
等,然后运行source ~/.bashrc
。sqlplus username/password@//host:port/service_name
,如sqlplus scott/tiger@//localhost:1521/ORCL
。SET LINESIZE
和SET COLUMNS
设置输出格式,QUIT
或DISCONNECT
退出,@
执行缓冲区SQL语句等。