| Author |
Topic  |
|
|
aswindba1
Starting Member
USA
40 Posts |
Posted - 08/19/2012 : 14:23:39
|
Hi All,
Could you please assist on tlog space issues. I am trying to execute the query have update statement like ''update tblGatewayPersons SET ImportDataXML_NT = ImportDataXML_NT''
tlog space getting full in a few minutes and the query is through the follwing error ''The transaction log for database 'Perspective' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases''.
Please advise me.
Thanks Ashwin
|
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47157 Posts |
Posted - 08/19/2012 : 14:26:21
|
whats the size of table? try doing it in small batches
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
aswindba1
Starting Member
USA
40 Posts |
Posted - 08/19/2012 : 14:41:21
|
Hi Vishal,
Thanks for your prompt reply, Actullay I am executing the the query by bacthes itself. But the error coming when executing that single update statement. ''update tblGatewayPersons SET ImportDataXML_NT = ImportDataXML_NT''.
Table space is
filesizeMB UsedSpaceMB UnusedSpaceMB Type DBFileName ------------------------------------------------------------- 995.00 11.81 983.19 Log Perspective_Log
9000.00 6697.25 2302.75 Data Perspective_Data
6500.00 6318.88 181.13 Data Perspective_Data2
2643.00 2117.44 525.56 Data Perspective_Data3
19138.00 15145.38 3992.63 *** Total for all files *** |
 |
|
|
aswindba1
Starting Member
USA
40 Posts |
Posted - 08/19/2012 : 15:37:32
|
| Hello, Could anybody help me out from that query. |
 |
|
|
sunitabeck
Flowing Fount of Yak Knowledge
5152 Posts |
Posted - 08/19/2012 : 18:42:03
|
| What is that update statement intented for?It seems like it is setting a column to ITSELF. I was hoping that the query optimizer would see that and generate a trivial execution plan. Since it does not, and since there are no where clauses to limit the number of rows it will update the whole table. If it is an XML column, depending the size of the XML data, it can be resource intensive. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47157 Posts |
Posted - 08/19/2012 : 21:30:44
|
quote: Originally posted by aswindba1
Hi Vishal,
Thanks for your prompt reply, Actullay I am executing the the query by bacthes itself. But the error coming when executing that single update statement. ''update tblGatewayPersons SET ImportDataXML_NT = ImportDataXML_NT''.
Table space is
filesizeMB UsedSpaceMB UnusedSpaceMB Type DBFileName ------------------------------------------------------------- 995.00 11.81 983.19 Log Perspective_Log
9000.00 6697.25 2302.75 Data Perspective_Data
6500.00 6318.88 181.13 Data Perspective_Data2
2643.00 2117.44 525.56 Data Perspective_Data3
19138.00 15145.38 3992.63 *** Total for all files ***
this is not batch update the above update fires over entire table in one shot.
My suggestion was to do it in batches by iterating through a loop taking a definite amount of records and processing them each time
also i see the above update is trivial ie setting same column to itself. whats the purpose of this?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
aswindba1
Starting Member
USA
40 Posts |
Posted - 08/19/2012 : 21:44:10
|
Thanks alot sunitabeck...I got an idea of it Thank you soo much |
 |
|
| |
Topic  |
|