Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Insertion process for huge data

Author  Topic 

keyursoni85
Posting Yak Master

233 Posts

Posted - 2011-11-08 : 07:58:06
Hi,

I am inserting records on server from one table to another table.
Records are appx near 4,00,000

I have executed my query and it is running since 3 hours .. and still shows processing..
Now, I do not understand what I have to check now.

Please suggest proper work around for the same.

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-11-08 : 08:05:15
I would bcp it out and in or use ssis (and have no indexes on the destination).
Have you checked the disk io to see if it is still running - have a look at master..sysprocesses or sp_who2.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

keyursoni85
Posting Yak Master

233 Posts

Posted - 2011-11-08 : 08:10:44
sp_who2 shows status as RUNNABLE.

Can you please suggest another way to get out of it?
May I stop process execution?
Or what to do with that much large insertion of data after cancelling current execution because 3 hrs already completed with current insertion process running.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-11-08 : 08:47:31
sp_who doesn't show enough info.

Query sys.dm_exec_requests. What's the status, what's the wait type (and resource) if applicable?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-11-08 : 09:00:49
quote:
Originally posted by keyursoni85

sp_who2 shows status as RUNNABLE.

Can you please suggest another way to get out of it?
May I stop process execution?
Or what to do with that much large insertion of data after cancelling current execution because 3 hrs already completed with current insertion process running.



Did you check the diskio to see if it is increasing.
Is it blocked?

You can kill the spid but that will rollback which could take a long time - if it's not doing any io then you might as well try it.


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -