Hi.. I found my database transaction log keep increasing,, now the mdf is 3GB but the transaction log grow to 35 GB. May I know what is causing the transaction log to grow so big and how to reduce it or clear it?
When I back up the database to a file, it is only 2.5Gb and I transfer to another server and restore, it prompts me disk space is less than enough as transaction log is 35Gb, how to restore without the transaction log ?
I'm getting this when executing the code below. Going from W2K/SQL2k SP4 to XP/SQL2k SP4 over a dial-up link.
If I take away the begin tran and commit it works, but of course, if one statement fails I want a rollback. I'm executing this from a Delphi app, but I get the same from Qry Analyser.
I've tried both with and without the Set XACT . . ., and also tried with Set Implicit_Transactions off.
set XACT_ABORT ON Begin distributed Tran update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TRANSACTIONMAIN set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.TRANSACTIONMAIN set REPFLAG = 0 where REPFLAG = 1 and DONE = 1 update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.WBENTRY set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.WBENTRY set REPFLAG = 0 where REPFLAG = 1 update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.FIXED set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.FIXED set REPFLAG = 0 where REPFLAG = 1 update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.ALTCHARGE set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.ALTCHARGE set REPFLAG = 0 where REPFLAG = 1 update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TSAUDIT set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.TSAUDIT set REPFLAG = 0 where REPFLAG = 1 COMMIT TRAN
It's got me stumped, so any ideas gratefully received.Thx
I have a design a SSIS Package for ETL Process. In my package i have to read the data from the tables and then insert into the another table of same structure.
for reading the data i have write the Dynamic TSQL based on some condition and based on that it is using 25 different function to populate the data into different 25 column. Tsql returning correct data and is working fine in Enterprise manager. But in my SSIS package it show me time out ERROR.
I have increase and decrease the time to catch the error but it is still there i have tried to set 0 for commandout Properties.
if i'm using the 0 for commandtime out then i'm getting the Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.
and
Failed to open a fastload rowset for "[dbo].[P@@#$%$%%%]". Check that the object exists in the database.
I am getting this error :Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.have anybody idea?!
i have a sequence container in my my sequence container i have a script task for drop the existing tables. This seq. container connected to another seq. container. all these are in for each loop container when i run the package it's work fine for 1st looop but it gives me error for second execution.
Message is like this:
Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.
i am getting this error "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.".
my transations have been done using LINKED SERVER. when i manually call the store procedure from Server 1 it works but when i call it through Service broker it dosen't work and gives me this error.
I had a databases running on SQL Server (EVALUATION VERSION).I moved it to another system running:-Windows 2000 Server-IIS 5.0-BlueDragon Server-MSDEI applied all of the latest service packs, security updates, etc...Intalled SQL Server Web Data Administrator and .NET framework.I attached the database using sp_attach_db:[color=blue]>osql –U sa>password>Sp_attach_db ‘whatever',>@filename1 = ‘C:Program FilesMicrosoft SQL[/color]ServerMSSQLDataCollaborationTools.mdf',[color=blue]>@filename2 = ‘C:Program FilesMicrosoft SQL[/color]ServerMSSQLDataCollaborationTools.ldf'[color=blue]>go[/color]I added my datasource using the ODBC Admin Tool...Verified it using the BlueDragon Admin Datasources page....But now I'm getting the error message:'Could not run BEGIN TRANSACTION in database 'whatever' because thedatabase is read-only.'Any help/guidance would be appreciated.Thanks very much.Shaun
System.Data.SqlClient.SqlException: The transaction log for database 'mydatabase' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases I have my website on a web hotel and I only have limited access to my database. How can I solve this for now, and the future??
Hi all, I'm getting the following error message in NT event view:
Error: 9002, Severity: 17, State: 2 The log file for database 'db_sys' is full. Back up the transaction log for the database to free up some log space.
But I don't know how to back up the transaction log for the database. Do I need TRUNCTE LOG (in E.M) to free up some log space? I only know back up all the database using ALL TASKS -> BACKUP DATABASE in E.M. Please help me. Thanks in advance. TH
I am trying to load transaction log but I am getting an error message saying database is in use, my question is Is it possible to load transaction log when database is in use? if yes how?
I still have transactions in use mainly to set isolation levels. There are obviously no update/delete statements in them. I'm pretty sure this will still add rows to the transaction log even though there won't be any writes to the db data files. Is it still a critical best practice to use RAID 1/0 instead of RAID 5 for the logs? Looking to re-use some existing storage rather than buy new ones. Thoughts?
I am doing some replication setup in test environment. Will it be possibleto use the transaction log from a production server to update the testserver? Any reference to any document will also be appreciated.I know I have to restore most recent backup from the production server tothe test server. and all the transactions after the backup on the productionserver has to be run on the test server.Thanks for your reply.-Mokles
I already did the following but still it wont delete the log file because it is not empty- DBCC SHRINKFILE('logfilename',EMPTYFILE) - DBCC SHRINKFILE('logfilename',TRUNCATEONLY)- ALTER DATABASE databasename REMOVE FILE logfilename
The transaction log takes up a lot of space on my database, and even after I try truncating the log, doing a transaction log backup, and then shrinking it, I am not allowed to reduce the size of the transaction log to less than 250MB. Is there some reason why this space is required?
I have an application that wraps all of the stored procedures it executes in a transaction.
On one of the stored procedures there is an IF statment and if the conditions of that are met then a RaisError will be triggered with a severity of 16.
Before the RaisError, a number of variables are passed to another stored procedure which will create a string and email it to a user using database mail.
The problem i am having is caused by the rollback transaction of the raiserror also rolling back the actions of the email send stored procedure.
Basically i need a way of rolling back the transaction with the execption of the email that is queued.
The only way that i have found to do it is the rollback the transaction in the if statment and then begin a new transaction for the database mail, then Commit it after the SP has been executed and then begin a new transaction for the RaisError.
Here i have two options (neither of which are ideal). Firstly i could commit the RaisError transaction but doing this makes the application cry becuase the transaction count is diffrent to what it expected. The second option is to leave the transaction open and let the application close it. This works fine but i am not comfortable with this as there is the potential of leaving an open transaction.
There must be another way of doing this so any other ideas would be fantastic.
How can I repair the database (5 gb) and remove the transaction log (45 gb). Whenever I run the maintanence wizard, it corrupts the db and I have to restore the db. Whenever I try to shrink the transaction log, the query runs but it doesn't shrink it at all. Is there a manual method for either of these and if so, how?
I always get this message, when i want to run a stonger query or a transaction that takes a longer time:
"The transaction log for database 'tempdb' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases"
I checked the log_reuse_wait_desc column: LOG_BACKUP I ran tr log backup...nothing... I tried to set to simple reco mode the db...this helped... temporaly...i got again below message. ( i wouldn't like to set to simple mode the db because the size of db is 160GB now....so i don't want to eun a fullbackup)
TempDB size is 50MB now and it can grow until 7GB. The trqansaction log size is 14GB and there are 50GB free space, so it can grow.
This symptom occurs since i installed SP2 and the CP Rev.4.0
As per the advice given by somebody i set ldf initial log size as 29 gb and restricted the growth and set the autogrowth to 500 mb i did not run and shrink ldf command on daily basis. this is the advice given by another dba.
then he suggested to create a maintenance plan to check database integrity check. whick will check the disk space threshold.
i did not understand how will the maintenance plan check the disk space and give an alert. where should i check the alert for this maintenance plan. secondly how can i stop my database log file to deliver a message that my disk is full.
please suggest me a best method. where i am wrong , how should i handle the situation without the dba monitoring. and our system has lot of batches running for every minute.
Is it possible to truncate Transaction Log and Shrink DATABASE while the database is being used by users or the database becomes unuvailable during this operations?
I have a problem when trying to save a transaction remotely. I'm using my pc as the server and I can save without any problem from local (the same project). But when I try accessing the project from other pc, the transaction doesn't get saved into the db. No error displayed. It's just doesn't get saved. What is the problem? Is there any IIS setting that I should put in?
I have a asp.net 2.0 web application. In one of the modules I have following scenario. In the UI there are 3 pages to take the input from the user. On the 1st page, we are inserting data in the master table and with the same we are beginning new sql transaction with the isolation level READ UNCOMMITTED. so that uncommited master table data can be read. Master table has also has 4 detail tables. Then the user is navigated to 2nd and then to 3rd page where the user can enter multiple records in the detail tables. And only after finishing on the 3rd page, the transaction is commited. I want to ask that is it the right way of doing this kind of functionality? And is there any other way of doing this?
SQL Server 2000, C#, ASP.NET and ADO.NET. I have searched for 3 days trying to figure out why my ADO.NET Transaction executes my stored procedures and runs the .COMMIT() on the server, figured this out by using the SQL Profiler, but the data doesn't show up in the database tables and I recieve no error from SQL or ASP.NET. What gives???? Anyone else ever heard of such a thing. Please help, before I loose my sanity.
We have an order posting stored procedure that's been executing for 14 hours now. This procedure has simple update statements but all the tables updated have triggers which update other tables with triggers and so on. This procedure hasn't commited yet. I have a full database backup from last night and transaction log backup from this morning while it was running. I want to kill this job and restore database from last backup. Only thing I am afraid of is that it will take too long to roll back which I have no estimate of time. Is there any faster way to get rid of all the uncommited transactions? Has anybody rolled back such a massive transaction? Any idea on how long it can take? Can it affect the overall server performance as this is the main production ERP server. I can see in profiler that this procedure is still running and not hung.
I am new to Microsoft SQL and have been dumped right into the deep end with an anchor around my ankles.
The problem I am experiencing is about 6 months back a guy setup a Microsoft SQL server at my client. He then took his bags and left. Then a developer developed an application which uses a database on this sql server. Everything worked well for around 4 months.
Yesterday IBM Director notified me that I am running dangerously low on disk space on the server. By the time I came in to work this morning I had 12mb free disk space. The evil thing here is the transaction log for the downtime database. It has grown to over 60gb, all because the correct measures were not implemented to prevent this.
The problem that is occuring is no one can do anything on the database now due to the lack of free space. I have tried reading the sql books online but due to my lack of sql experience and knowledge I am stuck.
Can someone please help me? What I would like to do is pull my transaction log down to an acceptable size.
I was thinking of creating a new database and then importing all the data from the current database and then just deleting the current database however am slightly concerned that this may result in some data being lost.
Hi y'all, I am doing some searching in the archived threads, but I have a need to copy a table in a database to a new table in the same database, but the new table will be just a table with test data. There are several million rows in the table and I want to do the copy without logging the new inserts in the transaction log.
Is there an easy way to do this? I found this in my search efforts so far, but am just wondering if there is an easier/better way to accomplish what I want to do.
BTW, I normally wouldn't care, but the boss is complaining that it is taking too long to do the copy for a different team, so asked if I knew a way to copy data to a new table without logging. I don't, so here I am ;)
Here is what I found so far:Following 3 things need to be done 1) create table as not logged initially 2) set autocommit=off 3) and activate the not logged initially option Now the inserts happen without the use of transaction logs
I have a database server with over 300 databases. I want that MS-SQL Server should daily report me the sizes of SQL databases along with Transaction log files by sending me an email on my address.
How can I do that. Does someone have any script which can help me to do that.
I have a wrapper stored procedure ProcMain_wrapper that executes in one main dataabase and it calls child stored procedure in multiple databases. Does the rollback occur in all the databases if the stored procedure fails in any one of the multiple databases?
create procedure dbo.db_Main.ProcMain_wrapper ( declare @curClientCode as cursor ,@db varchar(10),@dbName varchar(20) BEGIN TRANSACTION TRAN1 BEGIN TRY SET @curClientCode = CURSOR FOR SELECT [name] from sys.databases where name like 'dbclient_%'
Is it possible to load both the SQL 7 database and transaction logbackups to SQL 2000 ? I assume it will perform the upgrade during theload.Thanks,James