时间:2021-07-01 10:21:17 帮助过:12人阅读
根据服务端的版本下载安装对应的版本,查询代码如下:
$AuthString = "User Id=$USER;Password=$PASSWD;Data Source=$SERVER/$DB"
$QuerySQl = "Select runstatus,hisstatus from collectreport where oc_date="
$OracleConncetion = New-Object System.Data.OracleClient.OracleConnection
$ResultTable= New-Object System.Data.DataTable
$OracleConncetion.ConnectionString = $AuthString
$ConnCmd = $OracleConncetion.CreateCommand()
$ConnCmd.CommandText = $QuerySQl
$OracleAdapter = New-Object System.Data.OracleClient.OrcalDaTaAdapter($ConnCmd)
$tmp.fill($ResultTable)
PowerShell链接Oracle数据库
标签:system result stat passwd command cmd epo ons word