Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: copying dat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 10 Topic 10986 of 11427
Post > Topic >>

Re: copying data from one server to another

by imorxr@[EMAIL PROTECTED] May 15, 2008 at 01:35 AM

On May 15, 12:40 pm, "Plamen Ratchev" <Pla...@[EMAIL PROTECTED]
> wrote:
> If you can set up a linked server the other way around (from your remote
> server to the local server), then executing the query on the remote
server
> will have no problems setting IDENTITY_INSERT ON. The option cannot be
set
> permanently and it has to be set in the same session as the INSERT
> statement.
>
> Alternative is to use BCP or Bulk Insert to insert the data which have
> option to keep identity.
>
> HTH,
>
> Plamen Ratchevhttp://www.SQLStudio.com


Dear Mr Plamen,

I can not set up a linked server the other way around (from your
remote
server to the local server).

Now, i want try using Bulk Insert the data which have option to keep
identity, but
my problem is, i can't access data from local server cause i have
ready come in to
remote server.

before, i just want execute :
INSERT INTO mylink.serverB.dbo.Tr_Stock (Stock_Id) SELECT Stock_Id
FROM Stock

coz i just 1 option to execute identity_insert using :
EXECUTE [mylink].[serverB].[dbo].[sp_executesql] N'SET IDENTITY_INSERT
dbo.Stock ON
, so now i cant using this again : INSERT INTO
mylink.serverB.dbo.Tr_Stock (Stock_Id) SELECT Stock_Id FROM Stock



Regards,
Thanks
 




 10 Posts in Topic:
copying data from one server to another
Guineapig1980@[EMAIL PROT  2008-04-22 06:11:12 
Re: copying data from one server to another
"Plamen Ratchev"  2008-04-22 09:49:52 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-14 21:52:28 
Re: copying data from one server to another
"Plamen Ratchev"  2008-05-15 01:40:33 
Re: copying data from one server to another
Erland Sommarskog <esq  2008-05-16 20:04:24 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-14 23:18:58 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-14 23:25:58 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-15 01:35:39 
Re: copying data from one server to another
"Plamen Ratchev"  2008-05-15 09:01:18 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-15 20:06:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 1:43:44 CDT 2008.