Since you have a link to the server, you can access all object on that other server just as you would the ones on your server, the only thing you need to do is fully qualify the name of the object, i.e [Server-Name].[Owner].[Database].[Table-Name].
The names of the tables and views are in the SYSOBJECTS tables in each database. As a precaution only mess with user objects. The XType field gives you that info (Object type. Can be one of these object types:
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
FN = Scalar function
IF = Inlined table-function
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table
UQ = UNIQUE constraint (type is K)
V = View
X = Extended stored procedure)
The servers are kept in the SYSSERVERS table in Master DB.
If you intend to do this from a client you could use SQL-DMO or stored procedures.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.