Delete on linked server

  • Hello

    After a lot of research and try&error, I managed to make the OLEDB linked server connection work between our MS SQL Server 2000 (SP3) and Oracle 10g. The install of the Oracle Client Software for the OraOLEDB-Driver was quite hard (-> Registry modifications). Is that normal? Our servers run Windows 2003, but I had quite similar problems in my WinXP development environment.

    But that's not a problem anymore. The whole export from MS SQL to Oracle works, but there still is a little issue: I need to make a table empty on the Oracle server before I write my data to it.

    DELETE FROM OPENQUERY(Ora, 'SELECT * FROM MyData')

    works as well as

    DELETE FROM Ora..MySchema.MyData

    but when I use Ethereal, I see that every row is deleted seperately. So it takes nearly five minutes to delete 5000 rows!

    Is there a better solution for this problem?

    I thought of creating a stored procedure on oracle an start that from my MS SQL server, but I didn't find out how to start a stored procedure remotely. Any help would be appreciated!

    Greetz & thanks

    Tom

  • try

    TRUNCATE TABLE Ora..MySchema.MyData

    if it fits your needs. Won t be able to undo changes


    Kindest Regards,

    Vasc

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply