Is it possible to run DDL statements using openquery? I want to drop a table on a linked server. I tried the following 2 types of syntax, neither of which worked:
drop table OPENQUERY(server2, 'SELECT * FROM myDB.dbo.tablename')
select * from OPENQUERY(server2, 'DROP TABLE myDB.dbo.tablename')
I'm running on server1, and I want to drop a table on server2 (both servers are sql server) in the myDB database. If not openquery, is there another way to do it from server1?