sqlplus 主机名@用户名/密码 [as sysdba]
例:
C:\Users\HuYao> sqlplus zabbix@zabbix@zabbix
将一个表复制到另一个表,命令为:create table TableName1 as select * from TableName
如:
SQL> create table epycard as select * from epycardinfo
进入DOS界面或者Windows PowerShell登录账户(登录方式如上所述)
运行代码:@E:\文件路径\文件名.sql
如:
SQL> @E:\sql\FW_IPS_Analyize.sql
注:SQL文件结尾应有"commit;"
如下所示,是SQL文件内容:
insert into IPMI_LOG_INFO (IP, INFO, TIME) values ('192.168.10.30', ' Event Logging Disabled #0xb6 | Log area reset/cleared ', to_date('19-08-2021 14:03:15', 'dd-mm-yyyy hh24:mi:ss')); insert into IPMI_LOG_INFO (IP, INFO, TIME) values ('192.168.10.32', ' Event Logging Disabled #0xb6 | Log area reset/cleared ', to_date('19-08-2021 13:49:07', 'dd-mm-yyyy hh24:mi:ss')); insert into IPMI_LOG_INFO (IP, INFO, TIME) values ('192.168.10.118', ' Microcontroller #0x86 | State Asserted ', to_date('19-08-2021 01:49:20', 'dd-mm-yyyy hh24:mi:ss')); commit;