Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. multiple database

multiple database

Scheduled Pinned Locked Moved Database
databasesysadminhelpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    hello I want to use multiple database .They may be on different server? can you help me about the problems that i will have?can you suggest one article?

    U C L 3 Replies Last reply
    0
    • A Anonymous

      hello I want to use multiple database .They may be on different server? can you help me about the problems that i will have?can you suggest one article?

      U Offline
      U Offline
      User 1789039
      wrote on last edited by
      #2

      Hi, You can go for the Database Access Application Blocks, if you want to use multiple databases simultaneously in a single applications. You can got to the Microsoft site for this: ttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/daab.asp :)Indus_v

      C 1 Reply Last reply
      0
      • U User 1789039

        Hi, You can go for the Database Access Application Blocks, if you want to use multiple databases simultaneously in a single applications. You can got to the Microsoft site for this: ttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/daab.asp :)Indus_v

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        You can also use the normal Data Provider classes that come with .NET (since that is what the DAAB are using)


        My: Blog | Photos | Next SQL Presentation WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More

        1 Reply Last reply
        0
        • A Anonymous

          hello I want to use multiple database .They may be on different server? can you help me about the problems that i will have?can you suggest one article?

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          First, in order to answer your question well we need to know what the database technology is and what it will be communicating with. The rest of the answer assumes SQL Server 2000 and .NET If you are having the databases communicate with each other you can set up linked servers and then refer to them using the 4 part table notation like this:

          [server].[database].[schema].[table]
          [server].[database].[schema].[view]
          [server].[database].[schema].[stored_procedure]

          If you are communicating with .NET you can use the normal provider mechanism and open separate connections to each database you need. You can have multiple connections to multiple servers if your application requires it. Your ConnectionString will point to the relevant database and server. If you need to connect to both databases through one SqlConnection you can link the servers and then connect to the server that has the link (this will be the local server, the server that has been linked to is the remote server). You can then use the 4 part names, see above, to work with the correct data on the correct server. NOTE: If you are using data on the local server you don't need to use the full 4 part name, however, I've found that when dealing with linked servers that using the 4 part name always reduces ambiguity and makes tracking down bugs easier as I'm not left wondering what connection something was running on and which server is local and which is remote. Does this help?


          My: Blog | Photos | Next SQL Presentation WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More

          1 Reply Last reply
          0
          • A Anonymous

            hello I want to use multiple database .They may be on different server? can you help me about the problems that i will have?can you suggest one article?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            I beleave you shoud create a linked server between database. select article_id from samcpd05.online.dbo.dimensao_produto left join samcpd29.onlinehist.dbo.produtos on .... samcpd29 = server onlinehist = database if you need more examples my e-mail is: sadmilson@terra.com.br

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups