Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2006

    Unanswered: set identity with linked servers

    Hello guys

    I'm copying data from one server to another so i defined linked servers. Source is in one machine with sql server 2000 (ej LNKSRV1) and other one in other machine with sql server 2012 (ej LNKSRV2)

    instructions like select, insert or delete using the format LNKSRV1.database.schema.table1 execute ok; but i need to insert data in a identity column in a table in LNKSRV2 so in my procedure i put:
    "set identity_insert LNKSRV2.database2.schema2.table2 on"

    but got this error when executing the scripts:
    Msg 117, Level 15, State 1, Line 20
    The object name "LNKSRV2.database2.schema2.table2" contains more than the maximum number of prefixes. The maximum is 2.

    BUT if i execute just that instruction (alone) i got this other error:
    Msg 1088, Level 16, State 11, Line 1
    Cannot find the object "LNKSRV2.database2.schema2.table2" because it does not exist or you do not have permissions.

    PLZ any help or advice ?

    Last edited by carloco; 10-08-12 at 23:14.

Posting Permissions

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