Search Results

Search found 2636 results on 106 pages for 'transaction isolation'.

Page 12/106 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Transaction Management

    - by Senthilnathan
    Hi all, In my code I am updating two table, one after the other. update(table1_details); update(table2_details); So if the update fails in table1 , table2 should not be updated or should be rolled back. How to handle this situation. I know I have to use transaction. Can some one help with code !!! I am using Java with spring and hibernate .

    Read the article

  • Nested Transaction issues within custom Windows Service

    - by pdwetz
    I have a custom Windows Service I recently upgraded to use TransactionScope for nested transactions. It worked fine locally on my old dev machine (XP sp3) and on a test server (Server 2003). However, it fails on my new Windows 7 machine as well as on 2008 Server. It was targeting 2.0 framework; I tried targeting 3.5 instead, but it still fails. The strange part is really in how it fails; no exception is thrown. The service itself merely times out. I added tracing code, and it fails when opening the connection for Database lookup #2 below. I also enabled tracing for System.Transactions; it literally cuts out partway while writing the block for the failed connection. We ran a SQL trace, but only the first lookup shows up. I put in code traces, and it gets to the trace the line before the second lookup, but nothing after. I've had the same experience hitting two different SQL servers (both are SQL 2005 running on Server 2003). The connection string is utilizing a SQL account (not Windows integration). All connections are against the same database in this case, but given the nature of the code it is being escalated to MSDTC. Here's the basic code structure: TransactionOptions options = new TransactionOptions(); options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted; using (TransactionScope scope = new TransactionScope(TransactionScopeOption.RequiresNew, options)) { // Database lookup #1 TransactionOptions options = new TransactionOptions(); options.IsolationLevel = Transaction.Current != null ? Transaction.Current.IsolationLevel : System.Transactions.IsolationLevel.ReadCommitted; using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options)) { // Database lookup #2; fails on connection.Open() // Database save (never reached) scope.Complete();<br/> } scope.Complete();<br/> } My local firewall is disabled. The service normally runs using Network Service, but I also tried my user account (same results). The short of it is that I use the same general technique widely in my web applications and haven't had any issues. I pulled out the code and ran it fine within a local Windows Form application. If anyone has any additional debugging ideas (or, even better, solutions) I'd love to hear them.

    Read the article

  • Rolling back a transaction in a Grails Service

    - by UltraVi01
    I have been updating all my services to be transactional by using Grail's ability to rollback when a RuntimeException is thrown in the service. I have, in most cases, doing this: def domain = new Domain(field: field) if (!domain.save()) { throw new RuntimeException() } Anyways, I wanted to verify that this indeed will rollback the transaction... it got me thinking as to whether at this point it's already been committed.. Also, if not, would setting flush:true change that? I am not very familiar with how Spring/Hibernate does all of this :)

    Read the article

  • The PROMOTE TRANSACTION request failed because there is no local transaction active.

    - by Mark J Miller
    Under what circumstances would I see the above message? I have a single call to SQL Server which is wrapped in a call to TransactionScope. In our development and QA environments MSDTC is turned off and the call succeeds fine. However, in our production environment with MSDTC turned on we are failing with this call. Is there something that would cause this when I am sure we are not looking at a distributed transaction call at all?

    Read the article

  • How to Shrink Transaction log in sql server database in replication

    - by Renju
    Hi I'm having a production database and its replicated report database. How to shrink the transaction log files in the production database as the log file size is increasing. I had tried DBCC SHRINKFILE and SHRINKDATABASE commands but it does not work for me. I can't detach and shrink and attach back as the db in replication. Please help me in this issue.

    Read the article

  • Committing Transaction

    - by Costa
    Hi http://msdn.microsoft.com/en-us/library/ms189797.aspx In this link they are committing a transaction within catch clause IF (XACT_STATE()) = 1, I don't get it, if there is an error why they are committing it? even if the problem in select statement and there is no big deal committing it, why don't just roll it back. Thanks

    Read the article

  • Store LAST_INSERT_ID() in a transaction

    - by Oden
    Hi, I use codeigniter's database abstarction, and im doing a transaction with it. My problem is, that i have several inserts into several tables, but i need the insert id from the first insert query. Is there any way to store the last insert id for more than one following insert?

    Read the article

  • Tracing log for user doing transaction

    - by user295334
    Dear All, I want all of you help to create file log for tracing user transaction. I want to do that when a user wants to update or add some information, I want to trace which information that user was updated. The tracing file that I want is easy read and search. Even, it is in text file or xml file. Thanks, Sopolin

    Read the article

  • Money Transaction without using in-app purchase for iphone app

    - by Jaydevsinh Gohil
    I want to implement the payment gateway like functionality in my iphone application other than In-App Purchase feature provided by Apple. So, i have one Question regarding the application approval on Appstore that, if i will redirect user to the UIwebview for payment related functionality, then apple will reject this application for not following the human interface guideline or it will allow this. Other way i can do it by calling web-service for the transaction of money. So, again there is any chance of app rejection on AppStore. Please share your thought on this

    Read the article

  • How to create a "copy" of SQL Server transaction log file

    - by Salman A
    I want a copy of SQL Server transaction log file for "raw" analysis. What is the safest way to get a copy of that file without shutting down the database and disturbing the existing log/backups/backup schedules and just about everything. FYI, Its a SQL Server 2000 database server and I can see the log file (its about 4GB in size) and I cannot copy it as is; I get the "access denied" error when copying from explorer or command line.

    Read the article

  • Openquery - unable to begin a distrubuted transaction

    - by dc2
    I am trying to use open query to run a stored procedure in a remote database, and insert it into a table in my local database: -- this works exec remotesvr.sys.dbo.golden_table 'some', 'parameters' While the above works out, I try the following: insert into my_local_table exec remotesvr.sys.dbo.golden_table 'some', 'parameters' I get a SQL error to the effect of 'unable to begin a distributed transaction'. Is there any way around this?, i.e. can I execute take the results of a remote stored procedure and put its contents in a local table?

    Read the article

  • Check if a connection is in a transaction

    - by acidzombie24
    I am getting a SqlConnection does not support parallel transactions. exception and this answer mentions its when a connection tries to open two transactions. This is exactly what i am doing. I thought nested transactions were ok (i was using sqlite for the prototype). How do i check if the connection is already in a transaction? I am using Microsoft SQL Server Database File.

    Read the article

  • Changes to multiple entities within a single transaction

    - by Nati
    Hy, I am trying to make changes to multiple entities within a single transaction in app engine platform. As I understand in order to succeed doing so, App Engine needs to know in advance which entities will be updated together, so it knows to store them in a way that supports transactions. And therefore, user must declare that an entity belongs to the same entity group as another entity when you create the entity. How do I declare that one entity belongs to another entity group in creation time? Thanks, Nati

    Read the article

  • SQL Server rolling forward lots of transactions, what should I look at?

    - by Anthony D
    I am running SQL Server Express on a Windows XP Embedded box. It runs for a day or two, doing some transactional processing for a POS type system, and with another system pulling data out to an OLAP DB for processing. After a while, I see in the event viewer the sequence SQL Server puts out when it restarts, copy rights, command line parameters, and so on. It seems like that coincides with our OLAP process crashing. I then see that when it restarts our transaction DB, it does a recovery, pulling in 10K or so in transactions that need to be rolled forward. Does this mean SQL has crashed? I don't really see much to indicate what happened. Update 1 I noticed I have my memory limit set to 1MB per query and 2TB for the server. These are the defaults. I only have one GB in the box. We have seen SQL crash a whole box by just using all the system memory. In this case though the whole box is up when we get to it.

    Read the article

  • How to void authorized transaction in authorize.net gateway using ActiveMerchant

    - by m7d
    Goal: Only have successful purchases show up on a customer's billing statement. I don't want declined authorizations showing up on their billing statement (as seen in an online banking system) as pending. A customer often will accidentally input an incorrect billing address, for example, followed by a correct one. Together, the two attempts, one successful and one not both show up on their billing statement as pending prior to settlement. This can scare the customer as it looks potentially like they will be charged twice. Details: When I do an AUTH_CAPTURE (via ActiveMerchant's purchase) or an AUTH (via ActiveMerchant's authorize) which is declined and subsequently want to void that authorization (via ActiveMerchant's void) so as not to have it appear on a customer's billing statement as pending (even though it will settle out after a few days), the gateway can't find the transaction to void using the authorization code returned from the authorization or capture method calls on the gateway. This is specific to the authorize.net AIM gateway. Please advise. Thanks!

    Read the article

  • WCF Transaction Scope SQL insert table lock

    - by lihnid
    Hi All, I have two services talking to two different Data-stores (i.e SQL). I am using transactionscope: eg: using(TransactionScope scope = new TransactionScope()) { service1.InsertUser(user);//Insert to SQL Service 1 table User service2.SavePayment(payment);//Save payment SQL Service 2 table payment scope.Complete(); } Service1 is locking the table (User) until the transaction is completed making subsequent transactions with that table sequential. Is there a way to overcome the lock, so can have more than one concurrent calls to the SQL service1 table while the above code is executing? I would appreciate any input. Thanks in Advance. Lihnid

    Read the article

  • Getting consecutive version numbers from Hibernate's @Version usage once per transaction

    - by Cheradenine
    We use Hibernate with the following version definition for optimistic locking et. al: <version name="version" access="field" column="VERSION" type="long" unsaved-value="negative"/> This is fine and dandy; however, there is one small problem, which is that the first version for some entities is '0', and for others, it is '1'. Why this is happening, is that for some object graphs, an entity will be subject to both onSave and flushDirty - this is reasonable, such as if two object are circular dependencies. However, the version number gets incremented on both occasions, leading to the above '0' / '1' discrepancy. I'd really like the version number only to ever increment once per transaction. However, I can't see a simple way to do this in the hibernate versioning implementation, without hacking about with an Interceptor (which was how I generated a column value for version before, but I wanted hibernate to do it itself)..

    Read the article

  • GAE Entity Groups/Transaction

    - by bach
    Hi, Say you have a Client Buying Card object and a product object. When the client chooses the buy opition you create the object and then add a product. It should be transactional but it's not on the same entity group as the product and the card already been persisted, isn't it? Is there any way to overcome this simple scenario safely and easily? here's a code sample: Transaction tx = pm.currentTransaction(); tx.begin(); Product prod = pm.getObjectById(Product.class, "TV"); prod.setReserved(true); pm.makePersistent(prod); Card card = pm.getObjectById(Card.class, "user123"); /// <--- will thorw an exception as card and prod aren't on the same entity group card.setProd(prod); pm.makePersistent(card); try { tx.commit(); break; }

    Read the article

  • Filter DataTable to show only the most recent transaction for each user

    - by Dan Neely
    I have a datatable that contains rows of transaction data for multiple users. Each row includes UserID and UserTransactionID columns. What would I use for as a RowFilter in the tables DefaultView to only show the row for each user that has the highest UserTransactionID value? sample data and results UserID UserTransactionID PassesFilter 1 1 False 1 2 False 1 3 True 2 1 True 3 1 False 3 2 True My data is orginating in a non-SQL source, the DataTable is being created to be bound to a DataGridView so I can't make changes to a query being used to get the data initially.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >