Monday, March 19, 2012

DML by Linked Servers

Hi,

I have two SQL-Server 2000 servers - SERVERDB01 and SERVERDB02.
I made a linked server from SERVERDB01 to SERVERDB02.

This instruction is ok.
SELECT * FROM openquery (SERVERDB02,'select * from dbacdl.aux_data')

I need execute DML commands by Linked Servers.
i.e. -> truncate dbacdl.aux_data or delete dbacdl.aux_data

How can I do?

Thank you by attention.

Bye.how about issuing the truncate or delete using the four part nameing convention?

<Server Name>.<Database Name>.<Owner Name>.<Object Name>|||Paul Young,

thank you by the answer, but It did wrong.

I was in the SERVERDB01
TRUNCATE TABLE SERVERDB02.SICDB.DBACDL.AUX_DATA

This mensage appear:
The object name 'SERVERDB02.SICDB.DBACDL.' contains more than the maximum number of prefixes. The maximum is 2.

I did some mistake, maybe.

Bye.|||No, I answqered your question a little to fast. Truncate won't work but delete will, try again using delete rather than truncate.|||Paul Young ,

It's ok.

thank you very much.

Bye.

No comments:

Post a Comment