Home All Groups Group Topic Archive Search About

long time process - what's the progress?

Author
29 Nov 2007 2:33 PM
Piotr Lipski
Hi.

SQL 2005 Std. Linked server to iSeries. I have run INSERT INTO <sql
table> SELECT * FROM [I].[SERIES].[TA].[BLE]

There are about 23mln records to copy. I's been running for the last
half an hour and I would like to check what the progress is. Is there
any way of doing this?

--
PL

Author
29 Nov 2007 3:00 PM
Tibor Karaszi
How about below?

SELECT COUNT(*) FROM <sql table> WITH(NOLOCK)

Show quote
"Piotr Lipski" <p*@mibi.pl> wrote in message news:fimij9$56h$1@news.onet.pl...
> Hi.
>
> SQL 2005 Std. Linked server to iSeries. I have run INSERT INTO <sql table> SELECT * FROM
> [I].[SERIES].[TA].[BLE]
>
> There are about 23mln records to copy. I's been running for the last half an hour and I would like
> to check what the progress is. Is there any way of doing this?
>
> --
> PL
Author
29 Nov 2007 3:08 PM
Piotr Lipski
Tibor Karaszi wrote:
> How about below?
>
> SELECT COUNT(*) FROM <sql table> WITH(NOLOCK)

The result is zero. I guess that the whole import is being done through
some kind of temporary storage and enclosed in a transaction so it can
be tricky (impossible?) to see the progress.

Any other ideas?

--
PL
Author
29 Nov 2007 4:55 PM
Russell Fields
Piotr,

I suppose that if you know the size of your data and any other update load
being placed on the database, you could track the size of your transaction
log to see how much it is growing as the data is imported.

    DBCC SQLPERF(LogSpace)

So, assume:
  23,000,000 rows at 50 bytes average size.
  Indexes add about 20% in size. (Depends on your index definitions)
  Add another 20% overhead for the log entries.

  1,656,000,000 bytes of log space

These are definitely just made up numbers, but do your own calculation
(taking into account all the factors that I do not know) and maybe you can
guess.   (Truth in Advertising: I have never tried to use this approach for
figuring out the 'progress bar'.)

RLF

Show quote
"Piotr Lipski" <p*@mibi.pl> wrote in message
news:fimklr$bj5$1@news.onet.pl...
> Tibor Karaszi wrote:
>> How about below?
>>
>> SELECT COUNT(*) FROM <sql table> WITH(NOLOCK)
>
> The result is zero. I guess that the whole import is being done through
> some kind of temporary storage and enclosed in a transaction so it can be
> tricky (impossible?) to see the progress.
>
> Any other ideas?
>
> --
> PL

AddThis Social Bookmark Button