w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
When accessing a DB2 database via COBOL, how can one set the Isolation Level, Fetch Size, Scroll Type and Concurrency? (among other performance tips)
For COBOL you need to set the isolation level on the SQL statement using a "WITH" clause in your SQL; SELECT * FROM MY.TESTTABLE WITH UR; Would set the isolation level to "Uncommitted Read" which will never lock, but will give you uncommitted updates. Other options are: "RR" Repeatable Read -- lock read rows so that they can be read again. "RS" Read Stability -- some rows locked "CS" Cursor Stability -- current/next row in cursor is locked You can also set the default Isolation Level on the plan or package BIND with the "ISOLATION" clause. These levels map to their ANSI equivalents ANSI Equivalents

Categories : Database

ADO.NET Isolation Level v TransactionScope isolation level
A Transaction is a unit of work, which basically means there are several activities are performed with in the scope. For example, Booking a Cart involves checking the product, checking the on-hand quantity, calculating shipping costs and updating the financial accounts. All of these actions should go as one or none, if any of them had a phantom reads like in case of Isolation level 'READ COMMITTED' then it puts data in a stale state. If 'SERIALIZED' scope is used then it will prevent any updates to the entities involved while in transaction. In a case, where you are looking at Financial reports for a month, then 'READ COMMITTED' Isolation level works, because you are looking at existing data and not making too many modifications, even phantom reads wouldn't create much difference in the r

Categories : Dotnet

How to change mode from c++98 mode in Dev-C++ to a mode that supports C++0x (range based for)?
Go to Tools -> Compiler Options -> "Compiler" tab Check the checkbox labeled, "Add the following commands when calling the compiler" And add in the text entry box, "-std=c++11" or if that doesn't work "-std=C++0x" Should be something like that anyway, I haven't had Dev C++ installed for many years, so I had to look at some screenshots on Google to remember.

Categories : C++

Processing android mode installation error: could not move mode "Android Mode" to the sketchbook
I needed to download Android mode manually. The steps are given below: Download "Android Mode" zip file from here. Unzip the downloaded "Android Mode" in the directory "C:/ Users/User/My Documents/Processing/modes/". Restart Processing. For more information, visit here.

Categories : Android

How Efficient is Mongo DB ISOLATION
I came across a document that Mongo DB maintains a global write lock That's old information, MongoDB is now on a database level lock, maybe sometime in the future collection, however, that has been put back in favour of concurrency. wanted to know how efficient it is to support "ISOLATION" of "ACID" as of SQL database. First thing first, MongoDB IS NOT AN ACID DATABASE. If you want ACID you should go with an ACID compliant database. Don't try and make a database do what it isn't designed to do. As for actual isolation, currently MongoDB has isolation on a single document level with atomic operations such as $inc, $set, $unset and all those others. Isolation does not occur on multiple documents, there is an $isolated ( http://docs.mongodb.org/manual/reference/operator/isolated/

Categories : Mongodb

Reactivity, isolation, and lists
Explanation can be found in meteor documenation: Reactivity isolation Each template runs as its own reactive computation. When the template accesses a reactive data source, such as by calling Session.get or making a database query, this establishes a data dependency that will cause the whole template to be re-rendered when the data changes. This means that the amount of re-rendering for a particular change is affected by how you've divided your HTML into templates. Typically, the exact extent of re-rendering is not crucial, but if you want more control, such as for performance reasons, you can use the {{#isolate}}...{{/isolate}} helper. Data dependencies established inside an #isolate block are localized to the block and will not in themselves cause the

Categories : Meteor

Transaction isolation in google app engine
You can see how to change the isolation level in the BeginTransaction API Reference. It is currently only configurable in the Google Cloud Datastore HTTP API and it defaults to SERIALIZABLE for all of the App Engine SDKs. However I do not think this will do what you want it to do. SNAPSHOT vs SERIALIZABLE controls transaction isolation or how concurrent transactions interact with each other. It does not control how a transaction interacts with itself (though in some systems these two things are conflated). In the Datastore, setting SERIALIZABLE will not make it so a transaction will see its own uncommitted mutations. It only means that concurrent transactions will collide if their read and write patterns are not valid when serialized. For example, the following two transactions will nece

Categories : Google App Engine

Sql Connection Isolation Level retention
I think that the isolation level is being carried over via the connection pool. This is by design, as this kb article states. There are ways to work around this as in specifying the transaction isolation level explicitly. You might want to check out this article.

Categories : C#

Serializable vs snapshot isolation level
There is just four isolation levels in SQL92,Snapshot Isolation was invented by oracle first,but sql server 2005 and innodb also support it;Snapshot isolation usually is implemented by MVCC~ Take MariaDB/Innodb as an example: Default isolation level is repeatable read,as sql92 defines,this isolation level may occur phantom,but because of mvcc,innodb could prevent phantom even in repeatable read~ I think: Snapshot isolation is not defined in sql standard,oracle treats it as a non-lock serialized isolation,innodb treat it as a mvcc based avoiding phantom repeatable read isolation,but the effect is same:higher performance than normal serialized isolation,non-phantom than normal repeatable read isolation~

Categories : Misc

Understanding Transaction Isolation Levels
The default locking schemes in sql server will prevent queries from returning invalid data. When a command is issued it will wait for blocking commands or return a deadlock error after timeout. The victim is the easiest to rollback, usually reads. This prevents dirty data. You may want to look into lock hints and various ways to go about circumventing the default behavior. Using NOLOCK for read-only commands will lead to better performance in a OLTP system when you do not care about what is going on while the command is issued.

Categories : Sql Server

Read Committed Snapshot Isolation and Transactions
Every (useful) statement runs within a transaction. If there isn't an open one when you run a particular query, then by default SQL Server opens one, runs the query, and then commits it. This is called Autocommit mode. This behaviour can be changed so that it doesn't do that third step automatically (the commit) and leaves the transaction open. That's called Implicit Transaction Mode.

Categories : SQL

Correct approach to clear row in singularitygs using isolation
As discussed in this similar question, Singularity doesn't clear your floats for you when you're using Isolation output (isolation being when each float is isolated from one another's position, as opposed to float where they are not). The short version of that answer is to use the CSS clear property, as explained very well in the Mozilla Developer Docs

Categories : Misc

Entity Framework Volatile Isolation Level
I think this is highest isolation level you can get. According to this link , this should be enough for your need. SERIALIZABLE Specifies the following: Statements cannot read data that has been modified but not yet committed by other transactions. No other transactions can modify data that has been read by the current transaction until the current transaction completes. Other transactions cannot insert new rows with key values that would fall in the range of keys read by any statements in the current transaction until the current transaction completes.

Categories : Entity Framework

spring transaction isolation SERIALIZABLE does not work
I got the answer to this question. here problem was time delay between thread one and tow, here I have given time delay as 100ms but this delay is not enough because before insertUser() get the table lock getUsers() occupy the lock and get the data and process it, so once I changed the time delay as 1000ms this problem was resolved. so insertUser() occupied the lock and getUsers() waited till insertUser() finished and commit the insertion part.

Categories : Java

Why does a transaction under Snapshot Isolation Level take S and IX locks?
Writes always take locks. IX is a write lock. As for the other processes (the two SELECTs, process process6593498 and process5cc1498) they are under read committed. If you want to avoid contention with snapshot isolation your must use it for your read transactions first of all.

Categories : Sql Server

Can I use both ReadCommited and ReadCommitedSnapshot Transaction Isolation Levels in my c# app?
Use Snapshot isolation level, it actually maps to READ_COMMITTED_SNAPSHOT here is msdn link http://msdn.microsoft.com/en-us/library/system.transactions.isolationlevel.aspx

Categories : C#

App pool identity, Users group and iis isolation
This question is also answered in the answer you linked to, by Kev. You should preferably set up your web root on a separate non-system drive. There you can remove the Users group from the top level and grant rights to the home folder of each site to the respective application pool identities only.

Categories : Security

Does REPEATABLE_READ isolation prevent inserts for non-ranged queries?
REPEATABLE_READ doesn't block the table. It guarantees that the transaction see the same rows at any point. Let me explain it by an example: Time Transaction 1 Transaction2 1 Begin Tx 1 2 Begin Tx 2 4 Select count(*) from my_tab; 5 Select count(*) from my_tab; 6 Insert into ... my_tab; 7 Commit; 8 Select count(*) from my_tab; 9 Insert into ... my_tab; 10 Select count(*) from my_tab; 11 Commit; 12 Begin Tx3 13 Select count(*) from my_tab; If my_tab has 10 rows then the result of the count will be:

Categories : SQL

Set Transaction Isolation level serializable blocks others transactions?
It's a trick question. The query only runs on the SalesOrder table. Even though Customers is used in the CTE definition, the CTE is never accessed so SQL Server will never take a lock. EDIT: If the CTE was used, there's not enough information to answer the question. The given answers seem to assume a table lock - but SQL Server will use row and range locks in most cases. So the only way to analyze the blocking behavior is by reviewing both queries involved. In general, for SERIALIZABLE, any query that would modify the resultset would be blocked. This includes introducing a non repeatable read (eg., an UPDATE to a SELECTed row), and introducing a phantom read (eg., an INSERT that would satisfy the WHERE clause). The latter part is the additional guarantee that SERIALIZABLE gives over REPE

Categories : Sql Server

Transaction isolation level REPEATABLE READ causes deadlocks
You can set the deadlock priority of transaction in setp 4 to be higher For more details see http://technet.microsoft.com/en-us/library/ms186736.aspx

Categories : Sql Server

What are the user permissions needed to enable snapshot isolation in a DB?
This is not setting an isolation level: ALTER DATABASE dbname SET ALLOW_SNAPSHOT_ISOLATION ON; That is altering the database. For that you need to provide them with ALTER rights on the database: GRANT ALTER ON DATABASE::dbname TO username; Otherwise you get this error: Msg 5011, Level 14, State 9, Line 1 User does not have permission to alter database 'dbname', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 1 ALTER DATABASE statement failed. Now, ALTER is all or nothing - you can't use it to allow them to change the allow snapshot setting but not other settings like forced parameterization, compatibility level, etc. You can do this much more granularly, though; perhaps you could create a stored p

Categories : Database

"SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED" not taking? Or am I looking in the wrong way?
The problem here is that the SqlConnection.BeginTransaction that does not take parameters defaults to read committed. I guess we didn't understand what the "default isolation level" text is on that page. That page has this text: If you do not specify an isolation level, the default isolation level is used. To specify an isolation level with the BeginTransaction method, use the overload that takes the iso parameter (BeginTransaction). The isolation level set for a transaction persists after the transaction is completed and until the connection is closed or disposed. Setting the isolation level to Snapshot in a database where the snapshot isolation level is not enabled does not throw an exception. The transaction will complete using the default isolation level. (my highlight) Here's

Categories : Sql Server

How does request isolation work in CherryPy. I don't understand the basic concept
As @DanielRoseman noticed you should not set variables on self. You have create only one instance of getCustomers class so CherryPy will call GET method on the same instance from multiple threads (there's a thread pool which handles requests). Therfore using self.cursor = self.cnxn.cursor() is not thread-safe and you end up with different cursor in self.cursor.execute("""select * from customers """, self.job_worknumber) or self.cursor.fetchall() or in any other place (it is a bit random). However changing all variables to local (don't use self at all in GET) should fix the problem.

Categories : Python

mysql isolation level of select query (insert visibility)
Check this out:- One more thing to keep into account – INSERT … SELECT actually performs read in locking mode and so partially bypasses versioning and retrieves latest committed row. So even if you’re operation in REPEATABLE-READ mode, this operation will be performed in READ-COMMITTED

Categories : Mysql

Why does entity framework uses “set transaction isolation level read committed” and what does this mean?
You should check the wiki about isolation levels. I guess you know transactions a little bit, the SaveContext() saves the changes in a transaction. There are several transaction levels, with increasing error filtering capabilities and decreasing performance. It is a good task to find the balance between safety and performance. The read committed transaction level protects you from "dirty reads", but doesn't protect from "non-repeatable reads" and "phantom reads" (see wiki). Kinda deep topic, but you shall go through it once you plan to create more complicated and safe systems. You can modify the transaction level like it is written here. But for basic applications you won't need this.

Categories : Entity Framework

postgresql trigger: disable auto commit and set isolation level
PostgreSQL doesn't have a setting that disables autocommit except for embedded SQL. If you try to set autocommit off in, say, PSQL, you'll see something like this error. sandbox=# set autocommit=off; ERROR: SET AUTOCOMMIT TO OFF is no longer supported Instead, use BEGIN to start a transaction. In PostgreSQL, you can start a transaction and set the isolation level in a single statement. (Other platforms require multiple statements.) Skeleton syntax for PostgreSQL 9.2 is BEGIN [ WORK | TRANSACTION ] [ transaction_mode [, ...] ] where transaction_mode is one of: ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED } READ WRITE | READ ONLY [ NOT ] DEFERRABLE End the transaction with either COMMIT or ROLLBACK.

Categories : SQL

Laravel & PHPUnit : allow process isolation to prevent Mysql Too many connections error
I would take a look at Mocks and remove your MySQL dependency: https://github.com/padraic/mockery#mocking-public-static-methods Going forward, I would actually suggest focusing more on testing your SQL. My firm recently spent a good amount hiring DBAs that really turned our legacy slowness around.

Categories : Mysql

Does wrapping all sql calls in ISOLATION LEVEL SERIALIZABLE remove all concurrency issues?
Serializable isolation level protects against all three known concurrency problems,because serializable level applies range locks so you can't modify rows with the range of transaction. It prevents against(but deadlocks are possible): Dirty Reads occur when one transaction reads data written by another, uncommitted, transaction. The danger with dirty reads is that the other transaction might never commit, leaving the original transaction with "dirty" data. Non-repeatable Reads occur when one transaction attempts to access the same data twice and a second transaction modifies the data between the first transaction's read attempts. This may cause the first transaction to read two different values for the same data, causing the original read to be non-repeatable Phantom Reads occur when o

Categories : SQL

verify invocation n times, depending on whether test run in isolation or as part of suite
With Mockito I can simply use the reset method. Specifically designed for container based injection of mocks.

Categories : Java

How do I enforce test isolation in MSpec when static members/methods are required?
It's a technical and a historic limitation. You need statics fields to share information between the delegates (Establish, Because, It, Cleanup). MSpec tries to mimic rspec, so I think Aaron considered delegates to be a good fit and released the syntax you see today back in 2008 or 2009. This syntax is still in place today. As for context sharing / context base classes: From what you state it seems like you're overusing the concept. You should always initialize static fields in the Establish, so it the global state will become a non-issue. Context sharing should be well considered, so, to quote you, it doesn't happen randomly. Try using helper methods for complex setup and be more verbose (I'd say explicit) in the Establishs. It will help make your specs more readable.

Categories : C#

which registers is changed when we move from user mode to kernel mode ?! and what is the reason to move to kernel mode?
From your questions i found that you are very poor in operating system concepts. Ok let me explain,(I am assuming you are using linux not windows). "which registers is changed when we move from user mode to kernel mode ?" For knowing answer for this question you need to learn about process management. But i can simply say, linux uses system call interface for changing from user space to kernel space. system call interface uses some registers (Based on your processor) to pass system call number and arguments for system call.

Categories : C++

How to change UINavigationBar background image when iPad goes from portrait mode to landscape mode?
You must use: - (void)viewDidLoad { [super viewDidLoad]; [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:@"UIDeviceOrientationDidChangeNotification" object:nil]; } - (void) orientationChanged:(id)object { UIInterfaceOrientation interfaceOrientation = [[object object] orientation]; if(orientation == UIInterfaceOrientationPortrait) { NSLog(@"orientation is UIInterfaceOrientationPortrait"); // Assuming "self" is a view controller pushed on to a UINavigationController stack [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"portrait_

Categories : Objective C

How do Emacs diary-mode and calendar-mode read so many date formats? Magic?
Date::Parse handles a good number of a date formats pretty well. It's part of the TimeDate distribution which has a lot of interesting date formatting stuff.

Categories : Perl

Portrait mode and landscape mode views display adjustment with phone size
You simply create 2 different layout files. You should read the developer guides on this subject. Basically you make 2 res/layout folders: res/layout and res/layout-land Then you add a layout for landscape to the land folder and the portrait version to the other.

Categories : Android

UIImagePickerController in portrait mode inside UIPopoverController when view is locked for landscape mode
you can do this with Subclassing UIImagePickerController @interface UAImagePickerController : UIImagePickerController { } @end @implementation UAImagePickerController - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return UIDeviceOrientationIsPortrait(toInterfaceOrientation); } @end

Categories : IOS

What is difference in debugging in debug mode and release mode with disabled optimization?
There's very little magic to it. Debug and Release are simply names assigned to a set of compiler options. The most relevant option for the Debug configuration is the /Od option, it disables the optimizer so your code is easier to debug. Clearly you can always change the Release configuration options to resemble the Debug configuration options. Like disabling the optimizer. Now there's no relevant difference anymore between them and the Release configuration behaves a lot like the Debug configuration in the debugger. Other options normally used in the Debug configuration that affects your code: the _DEBUG macro is defined, asserts will fire function inlining is turned off the /RTC option is turned on, very good at catching bugs in your code the _HAS_ITERATOR_DEBUGGING macro is defi

Categories : Visual Studio

Qt Application shows build error in Debug mode, OK in release mode
When you installed qt, did you configure it to install static debug libraries also. If not then try reconfiguring and reinstalling it. In windows, I think you installed from a preconfigured, precompiled binary that may not have static debug support. Try downloading the source and then configure and compile it according to your needs

Categories : Qt

How to access kernel mode memory in user mode application in WinCe7
I'm not sure if this will help considering you're on Win CE 7, but in Windows 7, I have a driver that maps a kernel mode address to a user mode address before returning the resulting user-mode address to my application. void *userSpaceAddr; // Allocate the MDL describing our kernel memory pmdl = IoAllocateMdl((PVOID)&my_heap_var, (ULONG)size_of_my_heap_var, FALSE, FALSE, NULL); if(!pmdl) { DbgPrintEx(DPFLTR_IHVVIDEO_ID, DPFLTR_INFO_LEVEL, "Error on IoAllocateMdl. Returning from driver early. "); return STATUS_INSUFFICIENT_RESOURCES; } MmBuildMdlForNonPagedPool(pmdl); userSpaceAddr = (void *)MmMapLockedPagesSpecifyCache(pmdl, UserMode, MmWriteCombined, NULL, FALSE, LowPagePriority); userSpa

Categories : Windows

Renaming a file on HDFS works in local mode but not in cluster mode
Just curious, but how can you rename a file that officially doesn't exist (because you're still writing at that point)? The fix is to rename after the file has been completed. That is, when you invoked the close method. So your code should look like this: public void close() { String newPath = String.format("%s_dir/%s_file", date, timestamp); try { writer.close(); fileSystem.rename(new Path(hdfs_path+path), new Path(hdfs_path+newPath)); } catch (IOException e) { e.printStackTrace(); } }

Categories : Java

Acces Query runs smoothly in "select" mode, fails in "make table" mode
After some more research and trial and error, I was convinced this is a memory issue. So if anyone is having the same problem, and does not have the time or resources to upgrade to 64 bit access or create and sql server, here is a pretty simple workaround. Since the query runs in select mode, use vba to export the query result into a delimited .txt file, that you can read back into the original database, or a new database, as a table. for anyone looking, the vba code to do that is very simple: Sub exportQuery2Text() DoCmd.TransferText acExportDelim, "", "mapProducts2Bills",_ "[filepath].txt", True End Sub I hope this is helpful Cheers

Categories : SQL



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.