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
 General SQL Server Forums
 New to SQL Server Programming
 What truncated my table

Author  Topic 

GhantaBro
Posting Yak Master

215 Posts

Posted - 2008-03-31 : 10:51:18
say if I am doing an simple insert (50 million records) with union all into a table.... when i check it while the query is running I see some records inserted.... however, at the end i have no data... table gets truncated. Is it so because I was out of space (I checked the drives and seems like data drive is running out of space).

Thanks for ur help.

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-03-31 : 10:53:25
1. You see records because you are using NOLOCK hint or READ UNCOMMITTED isolation level which means you are seeing records which are not committed to the database yet.

2. In case the database runs out of space, the statement is automatically rolled back which is the reason you don't see any records in the table.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

GhantaBro
Posting Yak Master

215 Posts

Posted - 2008-03-31 : 10:57:28
Yeah I was running the select with nolock .. thanks a lot harsh...
Go to Top of Page
   

- Advertisement -