Showing posts with label structure. Show all posts
Showing posts with label structure. Show all posts

Sunday, March 25, 2012

DTS Problem

Hi there,
I have created a DTS that copies data from a table in SQL Server to a table
with the same structure, but in Oracle.
Lets suppose I have 100 rows in the origin table. If the DTS fails in he
middle of the operation, supposing the row 55 has an error, the previous
rows are copied to the Oracle table.
How can I now wich rows have been copied?
The DTS runs periodicaly, and I need to know wich rows are copied, so I can
block them on the SQL Server, so they can not be copied again to Oracle.
Can anybody help me? Thanks in advance.
Regards,
Marcothis is not the proper way. but it works for me.
Make it 2 step.
In the first step, put the -ve of the real value; If the dts succees,
select all the rows with -ve value in the field and put it back to positive.
If it abends, you know all the rows with -ve value came from unsuccessful
import.
you can try other methods like prefixing text field like say lastname with
"SQL-"+lname and select all the rows where lastname like "SQL-" and remove
that.sqlsql

Thursday, March 22, 2012

DTS packet size

I have a dts package that transfers data from a view into
a table structure on another server. Occassionly the
scheduled package will fail with the following error:

Error = -2147467259 (80004005) Error string:
[DBNETLIB][ConnectionRead (recv()).]General network error.
Check your network documentation. Error source:
Microsoft OLE DB Provider for SQL Server Help
file: Help context: 0 Error Detail
Records: Error: -2147467259 (80004005); Provider
Error: 11 (B) Error string: [DBNETLIB]
[ConnectionRead (recv()).]General network error. Check
your network documentation. Error source: Microsoft
OLE DB Provider for SQL Server Help file: Help
context: 0 DTSRun OnFinish: Copy Data from PS...
Process Exit Code 1. The step failed.

Once the package fails I will rerun it several times
without any modifications and eventually it will run to
completion successfully. One change that I have made while
troubleshooting is to change the default network package
size from 1 to 1024 or 2048. Although this has worked I'm
not confident that the package wouldn't have run without
that change.

Has anyone seen this error before or anything similar?Default network packet size is 4096. How did you manage to make it 1?|||Under the Data Link Connection tab the default packet size is 1. It gives you the option to Edit the value so I bumped it up to 2048.

DTS Packages and Image/Binary/Blob data

I am trying to build a DTS pacakage that will create the database structure our application uses for our clients. The biggest problem I am having is when it comes to the reports, which we've stored as Image data in the database. During run time we get chunks to get the report out of the database. Has anyone tried and been successfull as using a DTS package to load binary/image data into a SQL table? My preference would be to use a global variable in the package to hold the location where the files are stored, and have them pulled in to their respective tables & fields when the package runs.
Any one have any ideas?
I've tried several resources, with no luck.Look for textcopy.exe on the web. Call a procedure from your DTS Package that will execute the following :

EXEC master.dbo.xp_cmdshell 'textcopy.exe -S ' + @.srvname +
' -U ' + @.login +
' -P ' + @.password +
' -D ' + @.dbname +
' -T ' + @.tbname +
' -C ' + @.colname +
' -W "' + @.whereclause +
'" -F "' + @.filename +
'" -' + @.direction

Ryan