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. Access to stored procs on different database servers

Access to stored procs on different database servers

Scheduled Pinned Locked Moved Database
sharepointdatabasesysadminquestioncareer
8 Posts 3 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.
  • V Offline
    V Offline
    vanikanc
    wrote on last edited by
    #1

    Hi, I have a scheduled job set to run on server A, with 5 steps. One of the stored procs in this job, step 4 is taking a long time to complete, we moved it to another which does not take much time to execute. Now we are trying to change this step so it uses the other server B. So on server A, I tried something like this -- exec serverB.database.dbo.sp_load_data. This is not working. Is there a way to execute stored proc on another server? Thanks!

    D 1 Reply Last reply
    0
    • V vanikanc

      Hi, I have a scheduled job set to run on server A, with 5 steps. One of the stored procs in this job, step 4 is taking a long time to complete, we moved it to another which does not take much time to execute. Now we are trying to change this step so it uses the other server B. So on server A, I tried something like this -- exec serverB.database.dbo.sp_load_data. This is not working. Is there a way to execute stored proc on another server? Thanks!

      D Offline
      D Offline
      DoctorMick
      wrote on last edited by
      #2

      It looks like you're using SQL Server so setting up a linked server on Server A should be all you need.

      V 1 Reply Last reply
      0
      • D DoctorMick

        It looks like you're using SQL Server so setting up a linked server on Server A should be all you need.

        V Offline
        V Offline
        vanikanc
        wrote on last edited by
        #3

        I am new to Linked servers. If you have an article or some sort handy could you please post it. Thanks so much for your time.

        C 1 Reply Last reply
        0
        • V vanikanc

          I am new to Linked servers. If you have an article or some sort handy could you please post it. Thanks so much for your time.

          C Offline
          C Offline
          Corporal Agarn
          wrote on last edited by
          #4

          Linking Servers[^]

          V 2 Replies Last reply
          0
          • C Corporal Agarn

            Linking Servers[^]

            V Offline
            V Offline
            vanikanc
            wrote on last edited by
            #5

            Thank you!

            1 Reply Last reply
            0
            • C Corporal Agarn

              Linking Servers[^]

              V Offline
              V Offline
              vanikanc
              wrote on last edited by
              #6

              I see something set up for tables and view thru Linked servers. I am using a stored proc. how would we do that?

              C 1 Reply Last reply
              0
              • V vanikanc

                I see something set up for tables and view thru Linked servers. I am using a stored proc. how would we do that?

                C Offline
                C Offline
                Corporal Agarn
                wrote on last edited by
                #7

                Once the link is setup it can be called by

                EXEC [linkedserver\instance].database.schema.sp

                I find it best to put [] around the linked part so I do not forget if I have a named instance (as shown).

                V 1 Reply Last reply
                0
                • C Corporal Agarn

                  Once the link is setup it can be called by

                  EXEC [linkedserver\instance].database.schema.sp

                  I find it best to put [] around the linked part so I do not forget if I have a named instance (as shown).

                  V Offline
                  V Offline
                  vanikanc
                  wrote on last edited by
                  #8

                  I tried this. Looks like RPC needs to be enabled on the remote server? is that the only way to go about?

                  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