You must Sign In to post a response.
  • Category: SQL Server

    Insert records into servermachine from local

    I have created table in Server machine under sql database.

    Now I'm trying to move all data contents of the table from my local machine to server machine..


    But I couldn't use the following query since it says "sys.servers doesn't have the server name".

    select * into dbo.tablename from servername.dbo.epicay.TableName

    How to proceed..
  • #768437

    Hi,

    We can use many methods for insert data into several ways,

    Inserting the data into our related server can be done with simple basic queries.


    SELECT * INTO Table_Name
    FROM [LINKEDSERVER\INSTANCE].YourremoteDATABASE.YourremoteSCHEMA.YourremoteTABLE




    INSERT
    INTO [LINKEDSERVER\INSTANCE].YourremoteDATABASE.YourremoteSCHEMA.YourremoteTABLE
    SELECT *
    FROM Table_Name


    Thanks,
    Mani

  • #768446
    Hi,

    I'm not encourage that, no one insert local data into production usually we do production data into local but I never heard local to production. If you think that it is still needed then take a backup of the production and local and insert local backup data into production directly.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


  • Sign In to post your comments