Powershell SQL server database connectivity and connection timeout issue
问题 I've a powershell script connecting to SQL server 2012 database running a SQL query and result set into data table to send formatted email to relevant parties. Below is the code snippet where issue is: $CBA = New-Object System.Data.DataSet "CBAData" $sqlConn = New-Object System.Data.SqlClient.SqlConnection("Data Source=DataSource;Initial Catalog=DataCatalog;Integrated Security = False;Connection Timeout=800;User ID = user; Password =pwd;") $adapter = New-Object System.Data.SqlClient