Connect to mutiple databases?!

  • Hi there,

    For an intranet portal I'm developing I need to get data from mutiple databases(Exact database). Because I can only connect to 1 database at a time within my portal, I was wondering if it is possible to create a new database within Enterprise Manager(SQL Server) that has links to the actual databases ealier mentioned. Is this possible? Are there other possibilities that are better with concern to liability/sequrity/scalebilty... and so on?

    Tnx!

  • Can you create a linked server to that type of database? That way you could access all the dbs in the same query (might not be all that fast though) .

  • What actions do I have to perform to get a linked server? I'm a developer so I as good as new to a lot of these functions within SQL Server.

  • Check up sp_addlinkedserver in bols. You'll also have to search on the web to see if it's even possible to do it with that type of db because there's no direct reference to Exact in there...

    You could also use the wizard in Security / linked servers.

  • I may be missing something but I did not see anything about different servers just different databases.  These are two distinct conditions.

    Yes, different servers would require using the linked server approach. 

    If the databases are on the same server you would only need to use fully qualified names, ie., databasename.owner.tablename.  Select au_id from pubs.dbo.authors

    Both approachs are well documented in Books On Line.

     

     

  • Hehe, missed an easy one here... Thanx for the correction .

  • Hey the option with the fully quallified names works perfectly in the query analyzer! Now I've only to check if it works in mine portal as well. Tnx a lot!

  • Should work...

Viewing 8 posts - 1 through 7 (of 7 total)

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