Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Find Open Transactions


Is there an easy way (SQL Query or enterprise manager) to see if there is an open transaction pending?


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Open Transactions
Hi!

I've a dude. Can I suspend (delete, stop) open transactions in Sybase SQL Server 10 x? How? (at times I can't dump transaction log). I hope you can help me.

Thanks very much, in advance.

View Replies !   View Related
Active Open Transactions Problem , Please Help
hi
I have few stored procedures in my database; all of them with begin Transaction, and commit transaction and rollback transactions, and some stored procedures execute other SP inside them.
Most of the time the stored procedure are working fine but sometime a user session will have active open transactions and cause permanent locking to resources and I have kill his/her process.
Why the stored procedure are not working all the time

View Replies !   View Related
Active Open Transactions Problem , Please Help
hi
I have few stored procedures in my database; all of them with begin Transaction, and commit transaction and rollback transactions, and some stored procedures execute other SP inside them.
Most of the time the stored procedure are working fine but sometime a user session will have active open transactions and cause permanent locking to resources and I have kill his/her process.
Why the stored procedure are not working all the time

View Replies !   View Related
Tools To See Open Connection, Transactions ... SQLExpress
Hello - where I can find the tools to view/see open connections, transactions not closed ... etc of a MS Sqlexpress database?

Thanks a lot - FOX

View Replies !   View Related
How To Find The Number Of Database Transactions For A Day
How can I find the total number of all the transactions that ishappening on my database for a given period of time ?Thanks, John

View Replies !   View Related
Replication - Where I Can Find The Transactions With Problems
I have the following question. I found out the SP sp_helpsubscriptionerrors give me the list of error from one subscription, but I need to know where I can find the transactions with the problems. Something like rs_helpexception on Sybase


I really appreciate your time. Thank you!!

View Replies !   View Related
Find And Rollback An Open Transaction
We have a locked table and all I need is a way to show all open trans, so I can roll teh offender back

View Replies !   View Related
Cannot Find Server Or DNS Error When Using JAVASCRIPT Window.open With DNS Alias
Using SQL Server 2000 Reporting Services and want to open new IE window to link to a site.
We are using IE 6.0.
 
I am using the following Navigation "Jump to URL" in report:
javascript:void(window.open('http://www.microsoft.com/en/us/default.aspx'))
 
This works as expected if I am not using the DNS alias to reference Reporting Services. But if I use the DNS alias when referencing Reporting Services, then when I click the link in the report I get the "Cannot find server or DNS Error" in the IE window that opens.  Everything else works correctly in the reports when I use the DNS alias.
 
Anyone have a clue why this is happening?
 
Thanks, DR

View Replies !   View Related
Connection.Open () ERROR !!! Unable To Find Stored Procedure Sp_sdidebug.
Hi all,
When I try to open a connection it gives me error "Stored Procedure sp_sdidebug not found"
Can anyone help me in this respect?
I was running the same application with the SQL Server 2005 only earlier when it was running.But now after I reinstalled VS.NET & SQL Server I am getting this error.What could be the problem?
 
Please help... I am badly stuck up.
 
PAM

View Replies !   View Related
Can't Find SQL Native Client In ODBC Connection Manager In SQL Server Open Database Connectivity (ODBC)
I apologize if this is not the correct forum for this posting. Looking at the descriptions, it appeared to be the best choice.

I am running Windows XP Pro SP2. I have installed the SQL Native Client for 
XP. However, when I try to add a new data source through ODBC Connection 
Manager, SQL Native Client is not listed as an option. I have followed this procedure on three other systems with no problems. What would be causing the
SQL Native Client to not show up in the list of available ODBC data sources?

View Replies !   View Related
Changing Connection Transactions To Database Transactions
Hi there,
I have decided to move all my transaction handling from asp.net to stored procedures in a SQL Server 2000 database. I know the database is capable of rolling back the transactions just like myTransaction.Rollback() in asp.net. But what about exceptions? In asp.net, I am used to doing the following:
<code>Try   'execute commands   myTransaction.Commit()Catch ex As Exception   Response.Write(ex.Message)   myTransaction.Rollback()End Try</code>Will the database inform me of any exceptions (and their messages)? Do I need to put anything explicit in my stored procedure other than rollback transaction?
Any help is greatly appreciated

View Replies !   View Related
Cannot Open User Default Database. Login Failed. (only When IDE Is Open)
I get the below error only when my IDE open. It connects well when it is found closed.
[SqlException (0x80131904): Cannot open user default database. Login failed.Login failed for user 'JPASPNET'.]
I could solve this by giving the logged in windows user to impersonate under IIS window > WEBSITE > ASP.NET tab > EDIT CONFIG > APPLICATION tab
But I wish someone could give me the proper solution.
I almost tried all from giving ASPNET user as a administrator to configuring the same in Express management tool.
Environment: XP pro, VWD and SQL Express

View Replies !   View Related
Unable To Open New Iwndow Open Clicking On Cell In Reportviewer For Jum To Url
hai,
Iam Having a reportviewer.Whenever i click on cell in reportviewer into navigate to child report and show thtat report in new window.i set cell property ->navigation->jum to url  and calling new aspx page.But the aspx is not open in new window.It is showed in same instance of broswer.Please help me ..

View Replies !   View Related
Leave The Connection Open Or Always Open And Close Immediately?
Hi there,
 
I got an approach like that:
1) Read something from DB - check the value, if true stop if false go on2) Read the second Value (another SQL Statement) - check the value etc.
Now I could open the connection at 1) and if I have to go to 2) I leave the connection open and use the same connection at 2). Is it ok to do that?
The other scenario would be opening a connection at 1), immediately close it after I read the value and open a new connection at 2).
Thanks for the input!

View Replies !   View Related
Anything That You Find In SQL Object Scripts, You Can Also Find Them In System Tables?
I tried all the INFORMATION_SCHEMA on SQL 2000 andI see that the system tables hold pretty much everything I aminterested in: Objects names (columns, functions, stored procedures, ...)stored procedure statements in syscomments table.My questions are:If you script your whole database everything you end up havingin the text sql scripts, are those also located in the system tables?That means i could simply read those system tables to get any informationI would normally look in the sql script files?Can i quickly generate a SQL statement of all the indexes on my database?I read many places that Microsoftsays not to modify anything in those tables and not query them since theirstructure might change in future SQL versions.Is it safe to use and rely the system tables?I basically want to do at least fetching of information i want from thesystem tables rather than the SQL script files.I also want to know if it's pretty safe for me to make changes in thesetables.Can i rename an object name for example an Index name, a Stored Procedurename?Can i add a new column in the syscolumns table for a user table?Thank you

View Replies !   View Related
Problem: Find All Table Names In Db And Then Find
I have 3 database say
db1
db2
db3

I need to setup a script to read all the table names in the database above and then query the database to find the list of Stored Procedure using each table.(SQL Server)

View Replies !   View Related
Open Report In New Window: Window.open Method Gives Error
 

   Hi,

      I am using SSRS Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00. I want to open linked report in new window.

I tried whats mentioned in   http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=240172&SiteID=1 but i get an error on Window.Open method.

   How do I solve the problem?

    Thanks

 

View Replies !   View Related
Keep A Few Connections Open All The Time Or Open/close Connections On The Fly?
Just a quick question about connection management. My application willnever need more than 1 or 2 connections about at any given time. Also, I donot expect many users to be connected at any given time. For efficiency, Iwould like to keep connections alive throughout the lifetime of the objectsrequiring them, rather than opening a new connection, executing code andthen closing it again. What is the most efficient way of doing this?Should I perform the open/close or just one open when I create the objectand a close when I dispose of it?

View Replies !   View Related
Transactions
Hi All,
Can anybody suggest me a website where I can find articles on Managing transactions with Sql server. Also a scenario where the transactions take place in a environment involving 2 different databases, Like the bank account and credit card transactions (specifically of 2 way kind)
Thanks

View Replies !   View Related
Transactions
I have a web application with a shopping cart, how do I stop all the shopping cart transaction from going into the db log? Is this possible?  These are are only transient data movements, and will never be need to to restore to, and they are cause log bloat. Or is there a better way to stop log bloat?
 
Thanks

View Replies !   View Related
Transactions
I have a small database that I have been testing.I get an error about a transaction deadlock.The code is in stored procedures and I added transactions to the sp'sbut the error happened again.I wrapped the whole sp in just one transaction and I don't have anyindex on the tables.When I test just by running a program that sends 3 calls at a time itwill get a deadlocked transaction as I send 6 or 9 at a time.I am not sure how it can have a deadlocked transaction after I usedtransactions(begin and commit) in the sp's.Steve

View Replies !   View Related
Transactions
hello guys, need help, i;m a bit confused about transactions afterreading some articles about locking/snapshotlet's stay i have this scenario-----------------------------------------------------------------------------------begin Tran 1 |select Max Id = 5 |set @a = MaxId + 1 = 6 |insert into t values(@a) |-----------------------------------------------------------------------------------| begin Tran 2| select max Id = XX| set @a = maxId + 1 = ?| insert and commit tran2-------------------------------------------------------------------------------------commit tran 1 |------------------------------------------------------------------------------------what will XX be ? I thought transactions run in queues, but i sawillustrations like the above

View Replies !   View Related
Transactions
Is there a point to wrapping a single UPDATE or INSERT statement in an explicit TRANSACTION:


BEGIN TRANSACTION

INSERT INTO Table (...) VALUES (...)

COMMIT TRANSACTION


I understand ACID and concept of transactions. However, I thought they were only necessary for multi-statement operations. I'm maintaining code that does this and am wondering if this is necessary. Does SQL Server guarantee ACID for single statements? Are single UPDATE/INSERT statements prone to race condition like affects without using explicit transactions?

View Replies !   View Related
Max. Transactions
what is maximum limit of no. of transactions per sec. in sql server 2000

View Replies !   View Related
TRANSACTIONS IN DTS
Hi All,

How can we change connection properties in a DTS pkg with connection?
You can loop through the connection count but the connection ID is not static one.So can’t rely on that.
Is there another way of changing connection properties?

Thanks in Advance

Barath

View Replies !   View Related
Help With DTS Transactions
Hi all....

I am currently designing a DTS Package to import data that is processed daily into a large database.

I have to design the package such that if any step fails when importing, I roll back the entire transaction.

I have designed the package with this in mind, checked "join transaction if present" and "rollback transaction on failure" in all of the workflows. I have also made all workflows serialized.

However, when I run the package, it fails on one of the data pumps with the error:

Transaction context in use by another session.

Any ideas?

Thank you,

Brian

View Replies !   View Related
I Want To See My Transactions
I am replicating (finally!!) and on my publishers agent history I can see it says xx transactions with xx commands were delivered. (xx being the number)
Where can I look to see what the transactions or commands are?

Is there a place the system stores this information?

View Replies !   View Related
Transactions/Sec
I have a table with around 240 columns and one of the column in the Table is the Inserttime ( DATETIME ) and I using a GETDATE() function in the stored Proc, when we insert data into the table. In the same Milli second 2007-06-27 09:32:58.303 , I have around 7600 records in the database. The Stored Proc is called for each Individual record and we don't bunch the transactions. Is this possible.

I did some bench marking on this server and I can insert only 700 - 800 records approx / sec on this particular table.

Thanks

View Replies !   View Related
Transactions
If you run the Begin Transaction code and then run a create such as an update query and you see that it effects the number of rows that you wanted it to effect is there a way to look at the actual data that changed before you Commit Transaction?

Thanks!

View Replies !   View Related
Transactions
Are there any scenarios where an un-commited transaction would block further queries?

View Replies !   View Related
Using Transactions
Hi,

I am using C#.NET 2005, SQL Server 2000.

I have a few questions to ask. Firstly, can anybody help me by telling the difference between the code below and the same code with comments removed:

            string localquery = "select bla bla";            SqlDataAdapter _sda;            DataTable _dt;            SqlCommand _cmd;            bool isErrCatched = false;            Exception ExcToThrow = new Exception();            using (SqlConnection _cn = NewConnection) // NewConnection returns a static SQLConnection object            {                _cn.Open();                _cmd = new SqlCommand(localquery, _cn);                //SqlTransaction myTrans;                //myTrans = _cn.BeginTransaction();                //_cmd.Transaction = myTrans;                _dt = new DataTable();                _sda = new SqlDataAdapter(_cmd);                try                {                    _sda.Fill(_dt);                    _sda.Dispose();                    //myTrans.Commit();                }                catch (Exception exc)                {                    //try { myTrans.Rollback(); } catch {}                    isErrCatched = true;                    ExcToThrow = exc;                }                finally                {                    _cn.Close();                }                _cmd.Dispose();            }            _cmd = null;            if (isErrCatched)                throw ExcToThrow;            return _dt;


My first question: Can there be a performance loss if I uncomment the lines about transaction usage? I mean, when I do this I start to get more timeouts.

My problem goes on. When I comment those lines and run a stress tool, I am getting "column X does not belong to table Y" errors. If those lines are not commented i am not getting this error, but I get timeout errors frequently. So, my second question: is there something wrong in my query or is there a bad coding practice I am following? Could someone offer a better and more robust sample for this code block?

By the way, connection pooling is on. And these errors are observed under high loads.

Thanks everybody.

View Replies !   View Related
Transactions
I've been searching around and haven't found anything that simply states what I want to know.

 

I want to use a transaction within my CLR Stored Proc, to do so I've got System.Transactions referenced and I can access the current transaction via Transaction.Current.

 

My questions are

Will there always be a current transaction?

Do I need to create a new transaction if one doesn't already exist?

View Replies !   View Related
Sql Transactions
Hello All,

When i am working with Transactions i got one doubt.

If i am inserting any records into a table with primary key if a transaction is rolled back i am finding one primary ID is missing. Is it so.

View Replies !   View Related
Transactions
I have transaction that will run on an hourly bases. I need to make sure that no one will start this transaction while it is running. I just need to know the system table that has all the transaction names in them and check to see if the transaction is running or not. what i am trying to do is not to have locks....just wanting to make sure that no one would run the same transaction twice. does anyone have any idea on how we can do this?

View Replies !   View Related
Transactions/sec
Hi all,
 
What does "Transactions/sec" counter in SQL 2005 under databases do in terms of performance. My counter shows almost 100% all the time in 4 terrbyte DB in superdome with many CPUs.
 

Which is the optimal value for this counter?
 
thanks in advance
 
Priw

View Replies !   View Related
Transactions
 
If you ask a .net developer he would likely say that he uses System.Transactions to manage transactions, a DBA on the other hand places transactions within the T-SQL of stored procedures.
 
What rules do architects and others, use when determining if the transactions should be placed in:


.net Middle Tier Components using System.Transactions for example.

T-SQL Stored Procedures.

Both .net Middle Tier Components and T-SQL Stored Procedures.
Thanks in advance,
 
Doug Holland
 

View Replies !   View Related
Transactions
I am working with transactions and use try catch to capture errors and in the event of an error i have to rollback the transaction. How can i perform this?, most of the errors which i forsee are either insertion of null values into non nullable columns or violation of Primary keys while inserting duplicates.
I started by coding the following way but it does not rollaback apparently the try catch does not work for above kind of errors..Can somebody help..
 
 

DECLARE @REPORTING_PERIOD VARCHAR(6)

BEGIN TRY

BEGIN TRANSACTION

-- SET NOCOUNT ON added to prevent extra result sets from

-- interfering with SELECT statements.

SET NOCOUNT ON;

SET @REPORTING_PERIOD =(Select REPORT_PERIOD_ID from dbo.T_REPORT_PERIOD where C_FLAG_ACTIVITY=1)

 
--Step 1

 
INSERT INTO [dbo].[T_COUNTRIES]

([C_COUNTRY]

,[LB_COUNTRY]

,[C_REGION]

,[FK_REPORTING_PERIOD])

SELECT [C_COUNTRY]

,[LB_COUNTRY]

,[C_REGION]

,@REPORTING_PERIOD

FROM [dbo].[IN_T_COUNTRIES]

 
--Step 2
 

INSERT INTO [dbo].[T_FLE]

([FK_P_FLE]

,[C_COSMOS]

,[LB_FLE]

,[C_PARETO]

,[C_OPCO_SCOPE]

,[C_LEVEL]

,[C_FLE_TYPE]

,[C_ACTIVITY]

,[F_MATERIAL]

,[C_MATERIAL_PRIORITY]

,[C_CALCULATION_METHOD]

,[F_CREDIT_RISK_MATERIALITY]

,[V_PARTICIPATION]

,[FK_REPORTING_PERIOD])

SELECT Null as [FK_P_FLE]

,[C_COSMOS]

,[LB_FLE]

,[C_PARETO]

,[C_OPCO_SCOPE]

,[C_LEVEL]

,[C_FLE_TYPE]

,@REPORTING_PERIOD

FROM [dbo].[IN_T_FLE]
 
COMMIT TRANSACTION

 
END TRY

 
BEGIN CATCH

 
SELECT

ERROR_NUMBER() as ErrorNumber,

ERROR_LINE() as ErrorLine,

ERROR_MESSAGE() as ErrorMessage;

-- Test XACT_STATE for 1 or -1.

-- XACT_STATE = 0 means there is no transaction and

-- a commit or rollback operation would generate an error.

-- Test whether the transaction is uncommittable.

IF (XACT_STATE()) = -1

BEGIN

PRINT

N'The transaction is in an uncommittable state. ' +

'Rolling back transaction.'

ROLLBACK TRANSACTION;

END;

-- Test whether the transaction is active and valid.

IF (XACT_STATE()) = 1

BEGIN

PRINT

N'The transaction is committable. ' +

'Committing transaction.'

COMMIT TRANSACTION;

END;





END CATCH;

 
 

View Replies !   View Related
Transactions In SQL CE 2.0 And CF1.1
Hi world:

I have this issue:

I need to push rows from CE to SQL Server 2000 and after delete these rows of CE database only if all rows have been sent to SQL Server 2000.

I think the best is work with transactions. Since I know I can use transactions for this purpose, can anybody give me a link with push transaction examples ?

View Replies !   View Related
Testing Transactions
I am using SqlServer 2005  Express Edition.  I have written a  stored procedure that has a transaction to make sure that it rolls back in case of failure.  Is there a way to test that the transaction works. I don't now how to cause an error that would cause the transaction to roll back and raise the error with the details of the exception.
 Thanks,
laura

View Replies !   View Related
Ending Transactions
Hi Guys,
Im having trouble stopping a transaction once the result on one or more of my sql statements rolls back the transaction. Take a look at one my first 'IF' statement (below).  If the parameter '@Return' is 'False' i want the transaction rolleback and all sql execution to stop. But my problem is the rest of the sql gets executed and i end up getting rubbish data. Im still new to transactions so i think im doing something really wrong. Please take a look at my sql and help me out in what ever way you think is best. thanks in advance.
MattBEGIN TRY
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
BEGIN TRANSACTION;
BEGIN
DECLARE @Return BIT;
SELECT @Return = (SELECT IsReturnable FROM INVENTORY WHERE InventoryID = 6)
IF (@Return = 'False') ROLLBACK TRANSACTION;
DECLARE @Already_In INT;
SELECT @Already_In = (SELECT ReturnedBy FROM InventoryInUse WHERE (CheckOutNumber = 375))
IF (@Already_In IS NOT NULL) ROLLBACK TRANSACTION;
DECLARE @Outstanding As INT;
SELECT @Outstanding = (SELECT (QtyTaken - 40) AS Outstanding FROM InventoryInUse WHERE (CheckOutNumber = 375));
DECLARE @OutstandingReason As VARCHAR(200);
DECLARE @Get_Person_ID INT;
Select @Get_Person_ID = (SELECT PersonID From [User] WHERE Username = 'matthewsk');
IF (@Outstanding < 0) ROLLBACK TRANSACTION;
ELSE IF (@Outstanding > 0)BEGIN
IF (@OutstandingReason = '') SELECT @RollBack = @RollBack + 1;
UPDATE InventoryInUse SET ReturnedBy = @Get_Person_ID, ReturnDate = GETDATE(), QtyReturned = 40, QtyOutstanding = @Outstanding, WriteOffReason = 'Testing This' WHERE (CheckOutNumber = 375);
UPDATE Inventory SET TotalQty = TotalQty - @Outstanding, QuantityInUse = QuantityInUse - (40 + @Outstanding) WHERE InventoryID = 6;
END;ELSE IF (@Outstanding = 0)
BEGIN
UPDATE InventoryInUse SET ReturnedBy = @Get_Person_ID, ReturnDate = GETDATE(), QtyReturned = 50 WHERE CheckOutNumber = 375;
UPDATE Inventory SET QuantityInUse = QuantityInUse - 50 WHERE InventoryID = 6;
END;
COMMIT TRANSACTION;
END;END TRY
BEGIN CATCH IF (XACT_STATE()) = -1
BEGIN ROLLBACK TRANSACTION;
 
END;
END CATCH;
 

View Replies !   View Related
Transactions And Exceptions
I am a novice with SQL, and I am failing to understand an aspect of Transactions.
The following is the code I have created, having referred to a handful of resources including MSDN documentation.
    public void CreateSection(Section section)    {        string sql =             @"INSERT INTO sectiontable (nodeid, title)              VALUES (@nodeid, @title)              SELECT Scope_Identity() FROM sectiontable";        SqlConnection connection = new SqlConnection(this.connectionString);        SqlCommand command = new SqlCommand(sql, connection);        command.Parameters.AddWithValue("@nodeid", section.Node.Id);        command.Parameters.AddWithValue("@title", section.Title);
        connection.Open();        SqlTransaction transaction = connection.BeginTransaction();        try        {            command.Transaction = transaction;            object result = command.ExecuteScalar();            if (result == null)                throw new DataException("Returned identity was invalid.");            section.Id = Convert.ToInt32(result);            transaction.Commit();        }        catch (Exception exception)        {            string message = "Could not create section.";            try            {                transaction.Rollback();                message += " Transaction was reversed.";            }            catch (SqlException booboo)            {                message += " An exception of type " + booboo.GetType();                message += " occurred while attempting to roll back the transaction.";            }            // Note: DataAccessException below is a custom class.            throw new DataAccessException(message, exception);        }        finally        {            connection.Close();        }    }        What seems clumsy is that we must have connection.Open() outside the try-catch block. The following cannot work, because the compiler notes the "Use of unassigned local variable 'transaction'" at the location shown below:
        SqlConnection connection = new SqlConnection(this.connectionString);        SqlTransaction transaction;        try        {            connection.Open();            transaction = connection.BeginTransaction();            // commands execute            transaction.Commit();        }        catch (Exception exception)        {            transaction.Rollback(); // <-- Compiler notes use of unassigned variable.                                    // (First testing the variable does not help.)            // handle exception.        }        finally        {            connection.Close();        }                The following also does not work, as the BeginTransaction() method must be called against an open connection.
        SqlConnection connection = new SqlConnection(this.connectionString);        SqlTransaction transaction = connection.BeginTransaction();        try        {            connection.Open();            // commands execute            transaction.Commit();        }        catch (Exception exception)        {            transaction.Rollback();            // handle exception.        }        finally        {            connection.Close();        }       
So, in MSDN documentation, the connection.Open() method is called outside the try-catch block (as shown in my full code). Yet, that same documentation notes that this method can lead to two types of exceptions. So it seems that the use of transactions forces an exception-throwing method to be used outside of a try-catch block. My question, then: is this unavoidable?

View Replies !   View Related
DataSet And Transactions...
hi all,
i'm developing a WebApplication with VisualStudio2005 (with C# code).i've defined a DataSet with some TableAdatpter. For each TableAdapter, i've definet some "customized" commands, performing specialized operations over the table on DB. (db is SqlServer2000).For each TableAdapter, i've set as "public" the connection, so that i can use it within my code for beginning a new transaction. Now, how can i set that transaction, to the specialized commands I defined for each TableAdapter?
Thanks all.Andrea.

View Replies !   View Related
Transactions In Sql Server
I am using ADO.Net for data access and was wondering if anyone knows a good resource for information of sql transactions? Also, do you know if the ForEach statement can be made in sql transactions?

View Replies !   View Related
Transactions And MSDTC
I have a class that use a TransactionScope object for make make two operations into a database. The problem is that in a computer works well but in another I receive a error message: "MSDTC is not running in .SQLEXPRESS". I had watched the services in the computer and the "Microsoft Distributed Transaction Coordinator" is running.
Does somebody know what is happening?
Thankyou and sorry for my English.

View Replies !   View Related
Transactions And Exceptions
if i have a loop that runs through records in a dataset like thisfor(int i=0;i<ds.Tables[0].Rows.Count;++i) and in this loop i have several sql commands that run as a transaction in a try / catch block like : try{ // do stuff}catch{    trans.RollBack();}how can i keep the loop going even if a transaction failed.  So the transaction works for each individual row.  if row 100 fails for whatever i would like the loop to continue running, do i just simply remove the "throw" and it will continue looping ? my catch block currently looks like catch(Exception ex){transaction.Rollback();activity.Log("Transaction aborted, rolling back. Error Message: " + ex.Message + " Stack Trace: " + ex.StackTrace.ToString());throw; }thanks,mcm

View Replies !   View Related
Transactions And Profiles
HiI'm trying to make a transaction with the TransactionScope class and if I modify a profile and call ProfileBase.Save(), it throws an exception with the message: "MSDTC is unavailable".thanks

View Replies !   View Related
Query Using Transactions With .NET
Hello All,
I've one query with using transactions in .NET. I've one long running transaction. Mean while when I try to fire SELECT query on same table (For other data in same table) it is not allowing me to do so. May because SQL Server locks the table during transaction. But I want to know whether is it something like row level locking in sql server. Following is the sample code that i use for same. Please highlight how can I access table with joins which is involved in transactions.
objConnection = New OleDb.OleDbConnection(keyUserSettings.GetValue("ConnectionString"))
If objConnection.State <> ConnectionState.Open Then
objConnection.Open()
objTransaction = objConnection.BeginTransaction(IsolationLevel.ReadUncommitted)
objCommand = objConnection.CreateCommand()
objCommand.Transaction = objTransaction
End If
Thanks in advance. Regards.
 

View Replies !   View Related
Nesting SQL Transactions
Hopefully someone can point me in the right direction, I've been searching on the net for the answer to this question and can't seem to come up with anything.
First, I'm using ASP.NET 2.0 and Visual Studio 2005 with a SQL Server 2000 backend. 
My SQL database is relational and is used to store names, addresses, etc of other companies. 
What I need to be able to do is have 2 transactions, one nested within the other.  In pseudo-code:
BEGIN TRANSACTION1


BEGIN TRANSACTION2
INSERT INTO COMPANY TABLE
COMMIT TRANSACTION2 -OR- ROLLBACK TRANSACTION2
GET COMPANYID JUST ADDED
PERFORM REMAINING INSERTS
COMMIT TRANSACTION1 -OR- ROLLBACK TRANSACTION 1 & 2
Right now I have everything grouped into one VB.NET transaction, which doesn't work because the company is not actually added until the transaction reaches commit.  Therefore, I can't retrieve the companyID halfway through.
Is what I'm trying to do even possible?  Thanks in advance for the help!
 
 

View Replies !   View Related
New To Transactions: Need Some Advice
I currently have a web form with about 12 procedures (containing stored
procedures) updating several database tables after form submission. I
will however have to use the transaction mechanism to make sure that
all relevant tables are updated after submission and so avoid data
entry which will have only some of the tables updated and not others.

From my very basic understanding of implementing transactions, I will
have to create a single procedure containing all the stored procedures
which are currently in their own separate procedures. Is that correct?

Thanks!

View Replies !   View Related
Nested Transactions
Please kindly provide some examples and T-SQL samples on nested transactions.Thanks much.

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved