Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.
-
Andy #1
Problem: Copy data from server 1 to server 2
Hi together !
I have a problem:
I "just" wan't to copy some records from server 1 to
server 2 (same table).
But here are the problems:
1. The servers are not connected (can't use linked servers
or replication).
2. The target table already contains records, so i only
wan't to insert the new records, and update the existing
records.
3. I only wan't to copy some fields and not all records
from the source table, not all (so BCP isn't really
suitable).
What is the best way to do that ?
Regards
Andy
Andy Guest
-
I?ve got a problem writing files on the server side withFlash Media Server 2.0.2 and 2.0.3.
Hello, I?ve got a problem writing files on the server side with Flash Media Server 2.0.2 and 2.0.3. The same code was working fine with an older... -
cfoutputing MYSQL data from server A to server B, is itpossible?
Hi! Could you please tell me how on earth can I access a MYSQL database on "SERVER A" that has CFMX 6.1 from a "SERVER B" that just has CFMX 6.1... -
Testing Server problem: Server name or address couldnot be resolved!
Not sure if this helps but I was going step by step in the Getting Started Experience Tutorial and when it got to the Database tab -- RDS Login... -
Problem retrieving data from SQL Server
I am a newbie to both SQL Server and webservices. I have mostly done programing in Foxpro, VB6, and a little C++, and VB.net. I have been able to... -
Copy file from one server to another
Hello, I'm trying to copy a file from another server to our CF server. I've tried using CFFILE to do this with no success. I keep getting this... -
Russell Fields #2
Re: Problem: Copy data from server 1 to server 2
Andy,
This sounds like a job for DTS. The servers do not have to be linked since
DTS runs as a client application. Look into some of DTS's simpler tools and
this should be fairly straightforward.
----
Regarding point 2: Of course, bcp only inserts data into a target table, so
you could use it if you had the rows copied from the source server.
Regarding point 3: If you create a view in your source database that
defines the rows and columns that you want, you can then use bcp to get that
data set out of the source server.
Russell Fields
"Andy" <info@axxis24.de> wrote in message
news:8cd101c3457f$f12ac120$a401280a@phx.gbl...> Hi together !
>
> I have a problem:
> I "just" wan't to copy some records from server 1 to
> server 2 (same table).
>
> But here are the problems:
> 1. The servers are not connected (can't use linked servers
> or replication).
> 2. The target table already contains records, so i only
> wan't to insert the new records, and update the existing
> records.
> 3. I only wan't to copy some fields and not all records
> from the source table, not all (so BCP isn't really
> suitable).
>
> What is the best way to do that ?
>
> Regards
>
> Andy
>
Russell Fields Guest
-
Andy #3
Re: Problem: Copy data from server 1 to server 2
Russell,
thank you for your answer.
But i guess i have still a problem, the 2 servers are at 2
different locations. There's no connection, so i have to
send the "result" per mail, the correspondig DBA has
to "exectue" something. So in my experience, DTS contains
the "schema" what to do ... but not the data, or i'm
wrong ?!
To use a view as source for BCP is of course a good idea,
but with this solution i can only insert records.
And how will you check if the record is really new in the
target table ? BCP just pumps data without checks, or ?!
What we do now:
I write
IF EXISTS (...)
UPDATE (...)
ELSE
INSERT(...)
statements by myself, but that's only "possible" with less
data, otherwise it's just to much work !
Can Enterprise Manager autom. script SQL statements like
this ? I never heard something like that. Or maybe a 3'
party tool ?
Regards,
Andy
to be linked since>-----Original Message-----
>Andy,
>
>This sounds like a job for DTS. The servers do not haveDTS's simpler tools and>DTS runs as a client application. Look into some ofa target table, so>this should be fairly straightforward.
>
>----
>
>Regarding point 2: Of course, bcp only inserts data intosource server.>you could use it if you had the rows copied from thedatabase that>
>Regarding point 3: If you create a view in your sourceuse bcp to get that>defines the rows and columns that you want, you can thenservers>data set out of the source server.
>
>Russell Fields
>
>"Andy" <info@axxis24.de> wrote in message
>news:8cd101c3457f$f12ac120$a401280a@phx.gbl...>> Hi together !
>>
>> I have a problem:
>> I "just" wan't to copy some records from server 1 to
>> server 2 (same table).
>>
>> But here are the problems:
>> 1. The servers are not connected (can't use linked>>> or replication).
>> 2. The target table already contains records, so i only
>> wan't to insert the new records, and update the existing
>> records.
>> 3. I only wan't to copy some fields and not all records
>> from the source table, not all (so BCP isn't really
>> suitable).
>>
>> What is the best way to do that ?
>>
>> Regards
>>
>> Andy
>>
>
>.
>Andy Guest
-
SQL Scripter #4
Problem: Copy data from server 1 to server 2
Hi Andy,
there's a tool which offers the functioanlity.
[url]http://www.sqlscripter.com[/url]
Enjoy.
servers>-----Original Message-----
>Hi together !
>
>I have a problem:
>I "just" wan't to copy some records from server 1 to
>server 2 (same table).
>
>But here are the problems:
>1. The servers are not connected (can't use linked>or replication).
>2. The target table already contains records, so i only
>wan't to insert the new records, and update the existing
>records.
>3. I only wan't to copy some fields and not all records
>from the source table, not all (so BCP isn't really
>suitable).
>
>What is the best way to do that ?
>
>Regards
>
>Andy
>
>.
>SQL Scripter Guest
-
Russell Fields #5
Re: Problem: Copy data from server 1 to server 2
Andy,
Going back to the DTS solution (if you pursue it) you will need two
packages.
Package 1: On the source machine extracts from your table to (for example) a
tab-delimited file (or anything OLE DB can talk to such as an Excell file)
Email the file
Package 2: Reads from the emailed file and supports the logic check for
existence and insert of the row is new.
Russell Fields
"Andy" <info@axxis24.de> wrote in message
news:042801c3459b$130cf6d0$a501280a@phx.gbl...> Russell,
>
> thank you for your answer.
>
> But i guess i have still a problem, the 2 servers are at 2
> different locations. There's no connection, so i have to
> send the "result" per mail, the correspondig DBA has
> to "exectue" something. So in my experience, DTS contains
> the "schema" what to do ... but not the data, or i'm
> wrong ?!
>
> To use a view as source for BCP is of course a good idea,
> but with this solution i can only insert records.
> And how will you check if the record is really new in the
> target table ? BCP just pumps data without checks, or ?!
>
> What we do now:
> I write
>
> IF EXISTS (...)
> UPDATE (...)
> ELSE
> INSERT(...)
>
> statements by myself, but that's only "possible" with less
> data, otherwise it's just to much work !
>
> Can Enterprise Manager autom. script SQL statements like
> this ? I never heard something like that. Or maybe a 3'
> party tool ?
>
> Regards,
> Andy
>> to be linked since> >-----Original Message-----
> >Andy,
> >
> >This sounds like a job for DTS. The servers do not have> DTS's simpler tools and> >DTS runs as a client application. Look into some of> a target table, so> >this should be fairly straightforward.
> >
> >----
> >
> >Regarding point 2: Of course, bcp only inserts data into> source server.> >you could use it if you had the rows copied from the> database that> >
> >Regarding point 3: If you create a view in your source> use bcp to get that> >defines the rows and columns that you want, you can then> servers> >data set out of the source server.
> >
> >Russell Fields
> >
> >"Andy" <info@axxis24.de> wrote in message
> >news:8cd101c3457f$f12ac120$a401280a@phx.gbl...> >> Hi together !
> >>
> >> I have a problem:
> >> I "just" wan't to copy some records from server 1 to
> >> server 2 (same table).
> >>
> >> But here are the problems:
> >> 1. The servers are not connected (can't use linked> >> >> or replication).
> >> 2. The target table already contains records, so i only
> >> wan't to insert the new records, and update the existing
> >> records.
> >> 3. I only wan't to copy some fields and not all records
> >> from the source table, not all (so BCP isn't really
> >> suitable).
> >>
> >> What is the best way to do that ?
> >>
> >> Regards
> >>
> >> Andy
> >>
> >
> >.
> >
Russell Fields Guest
-
Andy #6
Re: Problem: Copy data from server 1 to server 2
Russell,
thank's again for you advice.
Meanwhile i tested a recommended tool, and it exactly
offers what i need :-) Wow !
([url]http://www.sqlscripter.com[/url])
Of course, i think your solution should work too.
Thanks !
Bye
Andy
will need two>-----Original Message-----
>Andy,
>
>Going back to the DTS solution (if you pursue it) youtable to (for example) a>packages.
>
>Package 1: On the source machine extracts from youras an Excell file)>tab-delimited file (or anything OLE DB can talk to suchlogic check for>
>Email the file
>
>Package 2: Reads from the emailed file and supports theat 2>existence and insert of the row is new.
>
>Russell Fields
>
>"Andy" <info@axxis24.de> wrote in message
>news:042801c3459b$130cf6d0$a501280a@phx.gbl...>> Russell,
>>
>> thank you for your answer.
>>
>> But i guess i have still a problem, the 2 servers areto>> different locations. There's no connection, so i havecontains>> send the "result" per mail, the correspondig DBA has
>> to "exectue" something. So in my experience, DTSidea,>> the "schema" what to do ... but not the data, or i'm
>> wrong ?!
>>
>> To use a view as source for BCP is of course a goodthe>> but with this solution i can only insert records.
>> And how will you check if the record is really new inor ?!>> target table ? BCP just pumps data without checks,less>>
>> What we do now:
>> I write
>>
>> IF EXISTS (...)
>> UPDATE (...)
>> ELSE
>> INSERT(...)
>>
>> statements by myself, but that's only "possible" withlike>> data, otherwise it's just to much work !
>>
>> Can Enterprise Manager autom. script SQL statementshave>> this ? I never heard something like that. Or maybe a 3'
>> party tool ?
>>
>> Regards,
>> Andy
>>>> >-----Original Message-----
>> >Andy,
>> >
>> >This sounds like a job for DTS. The servers do notinto>> to be linked since>> DTS's simpler tools and>> >DTS runs as a client application. Look into some of>> >this should be fairly straightforward.
>> >
>> >----
>> >
>> >Regarding point 2: Of course, bcp only inserts datasource>> a target table, so>> source server.>> >you could use it if you had the rows copied from the>> >
>> >Regarding point 3: If you create a view in yourthen>> database that>> >defines the rows and columns that you want, you canonly>> use bcp to get that>> servers>> >data set out of the source server.
>> >
>> >Russell Fields
>> >
>> >"Andy" <info@axxis24.de> wrote in message
>> >news:8cd101c3457f$f12ac120$a401280a@phx.gbl...
>> >> Hi together !
>> >>
>> >> I have a problem:
>> >> I "just" wan't to copy some records from server 1 to
>> >> server 2 (same table).
>> >>
>> >> But here are the problems:
>> >> 1. The servers are not connected (can't use linked>> >> or replication).
>> >> 2. The target table already contains records, so iexisting>> >> wan't to insert the new records, and update therecords>> >> records.
>> >> 3. I only wan't to copy some fields and not all>>> >> from the source table, not all (so BCP isn't really
>> >> suitable).
>> >>
>> >> What is the best way to do that ?
>> >>
>> >> Regards
>> >>
>> >> Andy
>> >>
>> >
>> >
>> >.
>> >
>
>.
>Andy Guest



Reply With Quote

