Useing tables across databases

  • Hi

    I want to use a few tables from one database in some objects in another database. Bith databases are on the same server.

    I was thinking of maybe creating a view for each table in the target database because the tables are being used a few times and this would keep a clear record of which tables i am using from the source database. It would also be handy if any changes are made to the tables in the source database then this can be handled in the same place.

    Is this an advisable method to follow?

    Thanks in advance

  • This was removed by the editor as SPAM

  • You could always just reference the table using the three part naming convention Database.Schema.Table then there is no need for a view (unless you are using it for security purposes).

    Are you using any high availability features? If you are using database mirroring you would need to ensure that all databases that were linked would need to failover at the same time to ensure continuity for your applications.

    Hope this helps,
    Rich

    [p]
    [/p]

  • Thanks for the replies

    the tables are referenced in a number of functions in the destination database and i wanted to create the view as a kind of interface

    the database supports a stand alone site that can support a number of other sites. Also the tables in the source database or the source database itsself might change.

    am i explaining myself well?

    i dont really want to just reference the tables in all the places they are needed because any changes would meen i would need to make changes in all of these places

    would a view version of a table slow things down a lot in comparision to selecting directly from the table?

  • This was removed by the editor as SPAM

  • Thanks a lot

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply