question

EddiePiater-9765 avatar image
0 Votes"
EddiePiater-9765 asked SeeyaXi-msft commented

SQL Bulk Copy Timeout

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);

sql-server-general
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What is the exact error message?

0 Votes 0 ·

Hi @EddiePiater-9765,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·

1 Answer

SeeyaXi-msft avatar image
0 Votes"
SeeyaXi-msft answered

Hi @EddiePiater-9765,

You can refer to the PowerShell script in this link.
If it doesn't work, please try this way: https://docs.microsoft.com/en-us/sql/ssma/oracle/migrating-oracle-data-into-sql-server-oracletosql?view=sql-server-ver15


Best regards,
Seeya


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.