all groups > sql server dts > may 2005 >
You're in the

sql server dts

group:

DTS Import Problem


DTS Import Problem GW
5/14/2005 11:51:02 PM
sql server dts:
Hi Experts,

Appreciate if someone can help me. I'm trying to import a text file
mytable.txt
delimeted with pipe(|) and containing 300K of rows into empty table that I've
created earlier. While I'm executing the DTS got this message :-

There is already an object named 'MYTABLE' in the database.
Warning :The table 'MYTABLE' has been created but its maximum row
size (136057) exceeds the maximum number of bytes per row (8060). INSERT
or UPDATE of a row in this table will fail if resulting row length exceeds
8060 bytes.

FYI, before that I tried on other text file named mytable2.txt of which has
a longer bytes per row than the previous text file into other table but it
was successfully
imported. Pls help me..

TQ.

Re: DTS Import Problem Allan Mitchell
5/15/2005 12:00:00 AM
OK

The "...) exceeds the maximum number of bytes per row (8060)...."
message is informational and it is because SQL Server can store only
8060 bytes in a table. Your MYTABLE has a definition lager than this
for each row so SQL Server is warning you that should you INSERT > 8060
bytes OR UPDATE a row to > 8060 bytes then it will fail. If you do not
exceed this amount then you are fine.

The error message also tells me you are trying to CREATE a table each
time and that it exists already. Is this the case? If it is and this
is the behavior you require then you will need to drop MYTABLE first
everytime you run the package but I am guessing that you will want to
keep the table but maybe remove the rows so you can delete the rows in
the table as a first step in the package.

Hope this helps

Allan

[quoted text, click to view]
Re: DTS Import Problem Allan Mitchell
5/15/2005 12:00:00 AM
Are you recreating that table each time though?
The error message says you are trying to.


[quoted text, click to view]
Re: DTS Import Problem GW
5/15/2005 1:12:01 AM
Hi Allan,

I've put MYTABLE in a destination table in DTS funtion because the table was
created earlier and the table not containing any data (INSERT INTO EXISTING
BLANK TABLE). How to tackle this kind of problem. Glad if you can show me how.
TQ

[quoted text, click to view]
Re: DTS Import Problem GW
5/15/2005 6:16:07 PM
Dear Allan,

I'm not creating a new table. The table was newly created and theres is no
data in
the said table. I'm using the DTS Import Wizard and I've specified the
destination
tables in that wizard. Glad if you can show me how to increase the bytes per
row because I failed to find that function. FYI, All the fields created are
VARCHAR data type and the field size is maximum for each field.

Tq.

[quoted text, click to view]
Re: DTS Import Problem GW
5/15/2005 11:25:02 PM
Hi Allan,

Tq so much for your help. I'm new on SQL so I dont know so much about sql
script.
You said that I can change it in Query analyzer. Appreciate it if you can
guide me or
give me a sample how to solve this problem.

Anyway TQ.


[quoted text, click to view]
Re: DTS Import Problem Allan Mitchell
5/16/2005 12:00:00 AM
You cannot increase the bytes per row. It is fixed at 8060. The
warning you receive is just that a warning at table creation time.

The destination table definition has VARCHAR(8000) for every attribute?
You should change this in Enterprise Manager or Query Analyser.

Are you using the wizard every time?

The fact you get this message " There is already an object named
'MYTABLE' in the database." Tells me the wizard is trying to recreate
the table.



[quoted text, click to view]
Re: DTS Import Problem Allan Mitchell
5/17/2005 12:00:00 AM
Then your best bet may be in Enterprise Manager.

In QA we could do

ALTER TABLE <table name>
ALTER COLUMN <column Name> <datatype and size if needed>

This will not stop you getting the CREATE TABLE error as that is in your
package

Have a look here

Building a Package in the DTS Designer
(http://www.sqldts.com/default.aspx?278)




[quoted text, click to view]
AddThis Social Bookmark Button