Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Can drop temptable from different server?

Author  Topic 

naunton
Starting Member

4 Posts

Posted - 2010-10-07 : 04:35:47
Dear all,

I want to know that can I drop temp table from different server?
tables are existed in Server1
but, I will create storeprocedure to drop these table from Server2

if (exists(SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME = 'TEMP1'))
begin
Drop TABLE .dbo.TEMP1
end

my problem is I can't pass the servername(Server1) to check if temp tabels are exist or not.

Pls,Is there anyway to drop table from different server?

Thank you.

Honesty is the best policy!
   

- Advertisement -