Professional Web Applications Themes

Update on SQL database with stored procedures in another SQL database - Microsoft SQL / MS SQL Server

Hello. I have a question largely expressed in the title. I wish to update tables (records) in one SQL database using stored procedures in another SQL database. Both databases would be Microsoft SQL Server 2000 databases and may or may not be running on the same server (physical computer) or instance of SQL Server itself. Does anyone have any thoughts, resources, or ideas on such a project? Thanks, Mike...

  1. #1

    Default Update on SQL database with stored procedures in another SQL database

    Hello. I have a question largely expressed in the title. I wish to update
    tables (records) in one SQL database using stored procedures in another SQL
    database. Both databases would be Microsoft SQL Server 2000 databases and
    may or may not be running on the same server (physical computer) or instance
    of SQL Server itself.

    Does anyone have any thoughts, resources, or ideas on such a project?

    Thanks,

    Mike


    M Guest

  2. #2

    Default Re: Update on SQL database with stored procedures in another SQL database

    You typically get better performance if the proc is in the same instance as the database that holds the data. I've seen some discussion re having the data in the same database as the proc being better.

    --
    Tom

    ---------------------------------------------------------------
    Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
    SQL Server MVP
    Columnist, SQL Server Professional
    Toronto, ON Canada
    www.pinnaclepublishing.com/sql


    "M" <com> wrote in message news:phx.gbl...
    Hello. I have a question largely expressed in the title. I wish to update
    tables (records) in one SQL database using stored procedures in another SQL
    database. Both databases would be Microsoft SQL Server 2000 databases and
    may or may not be running on the same server (physical computer) or instance
    of SQL Server itself.

    Does anyone have any thoughts, resources, or ideas on such a project?

    Thanks,

    Mike



    Tom Guest

  3. #3

    Default Re: Update on SQL database with stored procedures in another SQL database

    Use linked servers if you have DBs on different servers and use four part names.
    That should do it.

    --
    Dean Savovic
    www.teched.hr


    "M" <com> wrote in message news:phx.gbl... 


    Dean Guest

  4. #4

    Default Re: Update on SQL database with stored procedures in another SQL database

    Mike,

    If they are in seperate servers, you may need to link the server using
    sp_addlinkedserver or corresponding option in EM.Once its done, you can use
    the syntax

    <linked_server_name>.<databasename>.<objectownerna me>.<table_name>

    For example,
    SELECT *
    FROM server2.northwind.dbo.employees

    --
    Dinesh.
    SQL Server FAQ at
    http://www.tkdinesh.com

    "M" <com> wrote in message
    news:phx.gbl... 
    update 
    SQL 
    instance 


    Dinesh.T.K Guest

Similar Threads

  1. Gridview - how to use stored procedures to update
    By Roberto in forum ASP.NET Data Grid Control
    Replies: 6
    Last Post: December 7th, 12:47 PM
  2. Read Point of Sale database and update server database
    By turtle in forum Macromedia ColdFusion
    Replies: 4
    Last Post: July 20th, 09:41 PM
  3. Replies: 2
    Last Post: September 8th, 03:32 PM
  4. Stored procedures and database in the table
    By Bhupesh Saini in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: July 6th, 08:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139