Showing posts with label rows. Show all posts
Showing posts with label rows. Show all posts

Monday, March 26, 2012

Import From excel

I have an excel file with 11000 lines
I made up a column for numbering the rows, e.g. 1,2,3,4,5,6...11000

I migrate this excel into table for sql 2000
While i use the custom built and specify order by record,
this gives me sth like that : 1,2,3,4,5,6...100..101, 1011,1012, ,120,121....

I see that I parsed them as floats can this be the issue?
Or should I do sth else wrong?Despite the fact in the procedure I created the select with order by record which record is 1,2,3,4,5,6 and I have it as integer,
unless I export the data to excel and re-import from excel, the records from a simple select popup as they like...and not by record order...

I hope someone has dealt with that in the past...help?sql

Friday, March 9, 2012

Import data error while delete rows in the destination table

Both SQLServer2005, different server, import tableA from serverA to serverB.
When we import tableA for the first time, serverB will get the whole
structure and data of tableA. So far is fine. By the way, we need to change
the type of a column from varchar to nvarchar.
Second time, we want to save the original structure and delete the exist data.
So we choose the "delete rows in the destination table" property. But when
we execute this, there is an error below while validation.

/******************
Error: 0xC02020F4 at Data Flow Task: The column "dbname" cannot be processed
because more than one code page (936 and 1252) are specified for it.
******************/

All the columns in this table have the same errors.
I don't know why. Thank you.

If you made this operation in a SSIS package to work , you have to change the property AlwaysUseDefaultCodepage of a OLEDB Source in a Data Flow Task . The value have to be "false"

Friday, February 24, 2012

import a large table

Hi,
I am importing a large table to a table. The table contains
27 millions rows with 1 or 2 index.
I used Enterprise Manager to do the table import. I see
the "status: 275" on the import screen after 27 millions
rows are inserted. The "status: 275" is on the screen
for 4 hours already. I used "simple" option for the
recovery.
Does import should take more than 10 hours for a 27
millons rows ?
Is there a way which I can use to make import faster,
e.g. command line import option ?
Thanks in advance.
MingTry using bcp to export the data to a file and import from
the file. Use the native format (/N).
Also set batch size.
Create the indexes after the import.
>--Original Message--
>Hi,
>I am importing a large table to a table. The table
contains
>27 millions rows with 1 or 2 index.
>I used Enterprise Manager to do the table import. I see
>the "status: 275" on the import screen after 27 millions
>rows are inserted. The "status: 275" is on the screen
>for 4 hours already. I used "simple" option for the
>recovery.
>Does import should take more than 10 hours for a 27
>millons rows ?
>Is there a way which I can use to make import faster,
>e.g. command line import option ?
>Thanks in advance.
>Ming
>.
>

Sunday, February 19, 2012

Implicit Transations and Deleted Rows

I have a problem where records a being deleted via implicit transactions (I
can see this from the SQL log). I am not sure I understand implicit
transactions fully but no where in our database or application do we ever
delete these records. Why are they being deleted via implicit transactions?Martin,
What do you mean, you can see this from the SQL Log? What is the exact
message in the sql error log?
Can you run a profiler trace on your SQL Server to see what/who is actually
sending these commands?
Do you have replication set up on this server (there is a thing known as
compensating deletes that sometimes surprises people)?
Set up a profiler trace, and make sure to capture sp:starting/completed,
stmt starting/completed, batch starting/completed, rpc starting/completed.
Make sure to include the columns loginname, hostname, etc. Of course you
will want text data and all the regular columns. If you've never set this up
before and you still have questions, post a message here and we can go
through this together.
Donna
"Martin" wrote:
> I have a problem where records a being deleted via implicit transactions (I
> can see this from the SQL log). I am not sure I understand implicit
> transactions fully but no where in our database or application do we ever
> delete these records. Why are they being deleted via implicit transactions?

Implicit Transations and Deleted Rows

I have a problem where records a being deleted via implicit transactions (I
can see this from the SQL log). I am not sure I understand implicit
transactions fully but no where in our database or application do we ever
delete these records. Why are they being deleted via implicit transactions?Martin,
What do you mean, you can see this from the SQL Log? What is the exact
message in the sql error log?
Can you run a profiler trace on your SQL Server to see what/who is actually
sending these commands?
Do you have replication set up on this server (there is a thing known as
compensating deletes that sometimes surprises people)?
Set up a profiler trace, and make sure to capture sp:starting/completed,
stmt starting/completed, batch starting/completed, rpc starting/completed.
Make sure to include the columns loginname, hostname, etc. Of course you
will want text data and all the regular columns. If you've never set this u
p
before and you still have questions, post a message here and we can go
through this together.
Donna
"Martin" wrote:
[vbcol=seagreen]
> I have a problem where records a being deleted via implicit transactions (
I
> can see this from the SQL log). I am not sure I understand implicit
> transactions fully but no where in our database or application do we ever
> delete these records. Why are they being deleted via implicit transactions?[/vbcol
]

Implicit Transations and Deleted Rows

I have a problem where records a being deleted via implicit transactions (I
can see this from the SQL log). I am not sure I understand implicit
transactions fully but no where in our database or application do we ever
delete these records. Why are they being deleted via implicit transactions?
Martin,
What do you mean, you can see this from the SQL Log? What is the exact
message in the sql error log?
Can you run a profiler trace on your SQL Server to see what/who is actually
sending these commands?
Do you have replication set up on this server (there is a thing known as
compensating deletes that sometimes surprises people)?
Set up a profiler trace, and make sure to capture sp:starting/completed,
stmt starting/completed, batch starting/completed, rpc starting/completed.
Make sure to include the columns loginname, hostname, etc. Of course you
will want text data and all the regular columns. If you've never set this up
before and you still have questions, post a message here and we can go
through this together.
Donna
"Martin" wrote:

> I have a problem where records a being deleted via implicit transactions (I
> can see this from the SQL log). I am not sure I understand implicit
> transactions fully but no where in our database or application do we ever
> delete these records. Why are they being deleted via implicit transactions?