Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharing tables on different databases

Status
Not open for further replies.

Timcwilcox

Programmer
Jun 28, 2002
12
GB
Can i share tables on two or more databases on SQL 2000.

I have looked in various documentation, and apart from using replication (which i do not beleive will resolve this) i cant see how to do it.
 
as long as you have suitable access and they are on the same server you can simply reference tables from one database to another

e.g.

select yourfield from database.owner.table



Andy

 
YOu can also use DTS to move data periodically or triggers to move data whenever an update or insert or delete is made.
 
Thanks for the help, the problem is i can use query analyser as it is an application that needs to be able to share the table. What i wanted to know is can i share a table so that multiple database can use it. DTP is no good as it has to be online. However i will investigate using triggers if there is no other solution.
 
I'm unclear what you mean by "Can I share tables on two or more databases on SQL 2000?" Databases don't share tables.

With appropriate permissions, an application can access data from multiple databases. Triggers on a table in one databses can read or write to tables in another database. Views and stored procedures, which are created in one databases, can reference tables, views and/or procedures in other databses. SQL Server even allows access to data from databases that are on different servers.

If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top