Afternoon
I am trying to copy data from Oracle DB to SQL DB, I have setup the script to connect to Oracle and retrieve the data but when I use the bul copy command I keep on getting timeout error, done alot searching and tried few suggestion but not works, here is my code what did I do wrong.
Thanks
$sqlconn = "server='SPO2018';database=SPFSQLData;trusted_connection=true";
$sqlbc = new-object system.data.sqlclient.Sqlbulkcopy($sqlconn);
$scon = New-Object System.Data.SqlClient.SqlConnection($sqlconn);
$sqlbc.DestinationTableName="dbo.SCHEMAOBJPR";
$cmd.Connection = $scon;
$cmd.CommandTimeout = 0;
$sqlbc.WriteToServer($dtbl);