linked server

  • hey all....

    before i ask my question i want to say that i'm a novice in sql server...i worked with sql server express for web development purposes only..

    i have a database placed on a database server for my company...the database contains tables and stored procedure....i want the resultant grid to be linked to a database found on my pc(which later i will upload to the same server) and add some columns which are updatable without affecting the original data....i though about copying it and creating a job that will constantly copy updates but i was advised to create a linked server to avoid data duplication...i created one after installing sql server 2005(full version)....and i just don't know if it is working and how can i utilize it if it is working(by utilize i mean execute the stored procedure that i need)...thanks in advance....

  • Are you asying that you have data on your local machine which is being accessed from the server to support queries (to avoid data duplication)?

    I would go back to your first idea of updating the server from your machine - unless there is something I don't understand about this situation (I suspect that's the case).


    Cursors never.
    DTS - only when needed and never to control.

  • Your post is very confusing. First off, never, ever, bake your personal workstation into an enterprise system/solution. You'll be headed for disaster. Is there a way you can restate the problem?

  • 1-guys right now i am still developing the web application later on the database will be uploaded to the server

    2- ok i will tell what my problem is...there is this database in my company that i can only read from thats it....i want to add some columns that are editable in my database so the resultant table is basically a copy of the original table plus some other columns...when i asked for advice about this issue (since i told you i am not a database expert) i was told to create a linked server to the original db and link my table with the other table using the primary key so that if the original data got modified(since this database is being actively updated) i would also have the updated version of the table plus no duplicate data

  • My suggestion for this is to run a job periodically using openrowset, and a "temporary" linked server. Search BOL for openrowset.

    HTH

    "Who then will explain the explanation? Who then will explain the explanation?" Lord Byron

  • So you are updating your local copy of the database from the server?

    Does the table have anything to say when a row was updated? A last updated column, a timestamp, and audit trail?

    How many rows are there in the table? How much data in total (use sp_spaceused on the table).

    If this is what you want then a linked server is probably a reasonable method to connect but the update is the problem.


    Cursors never.
    DTS - only when needed and never to control.

  • nigelrivett (3/2/2009)


    Does the table have anything to say when a row was updated? A last updated column, a timestamp, and audit trail?

    How many rows are there in the table? How much data in total (use sp_spaceused on the table).

    those are valid questions that i haven't thought about them yet :ermm:

    but that is the reason i decided on linked server

  • If there's nothing to say when a row is updated then you are stuck with transferring the whole table (or checksums) and checking it.

    Not feasible if the table is large - so you really need to consider the above before going any further.


    Cursors never.
    DTS - only when needed and never to control.

  • ok let me get something first in a linked server i should be presenting the data from the original database so why would if it was updated or not.i don't think it would matter unless the record was deleted then i guess it is an issue:angry: right or am i miss understanding the concept of linked server

  • A linked server is just a method of querying the remote server.

    You have to issue sql statements to extract data

    select *

    from LinkedServer.dbname.dbo.tblname

    where .....

    it doesn't do anything automatically with regards to updated data.

    You will need to query data that has been changed since your last extract - hence the updated date, timestamp, audit trail

    or transfer the whole table (or maybe checksums) in which case you need to know how much data is involved to decide if it is feasible.


    Cursors never.
    DTS - only when needed and never to control.

  • ok but i would do the querying every time the page loads? and i can make the reloading process automatic say every 2 minutes

Viewing 11 posts - 1 through 10 (of 10 total)

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