andrea,
Regarding moving data from one machine to another with bcp, you do not need
a format file for every table if: you:
1. Choose an overall format -c (character mode) or -n (native mode)
2. The table definitions between servers are identical.
Following is an example xfer.cmd file
------ BCPXFER.BAT
REM Parms %1=SourceServer %2=TargetServer %3=DatabaseName %4=TableName
%5=LogPath
bcp %3..%4 out \\Server\Xfer\%4.dat -c -S%1 -T -e%4-bcpout.log >> %5bcp.log
osql -S%1 -Q"truncate table %3..%4" -E >> %5bcp.log
bcp %3..%4 in \\Server\Xfer\ -c -S%2 -T -e%4-bcpout.log >> %5bcp.log
------
This makes some assumptions:
1. TRUNCATE TABLE will work on your target server, so there cannot be any
foreign key constraints for that to work. If there are FK constraints, you
will need to change to "delete table"
2. One trusted connection works on both servers. If this is not the case,
you will need to add more login information (including passwords) to the
parameter list.
3. Both servers can reach the same file share. If this is not true, then
you will need to insert a copy file step between the bcp out and the bcp in.
Etc. etc.
This is not a full solution for you, since there are many unknowns, but if
this works you then create a higher level BAT file in the form:
---- MyXfer.BAT
call bcpxfer.bat Server1 Server2 MyDatabase MyTable1 MyLogPath
call bcpxfer.bat Server1 Server2 MyDatabase MyTable2 MyLogPath
call bcpxfer.bat Server1 Server2 MyDatabase MyTable3 MyLogPath
RLF
PS - Are you the same person as Andrea Anastasescu?
> Hi everybody,
>
[quoted text clipped - 15 lines]
> Any help is welcomed,
> Andre