Search Results

Search found 7391 results on 296 pages for 'record locking'.

Page 3/296 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Column locking in innodb?

    - by ming yeow
    I know this sounds weird, but apparently one of my columns is locked. select * from table where type_id = 1 and updated_at < '2010-03-14' limit 1; select * from table where type_id = 3 and updated_at < '2010-03-14' limit 10; the first one would not finish running even in a few hours, while the second one completes smoothly. the only difference is the type_id between the 2 queries. a bit of background, the first statement screwed up before which i had to kill manually. Thanks in advance for your help - i have an urgent data job to finish, and this problem is driving me crazy

    Read the article

  • Locking on an object...

    - by Mystere Man
    I often see code like that which is shown here, ie where an object is allocated and then used as a "lock object". It seems to me that you could use any object for this, including the event itself as the lock object. Why allocate a new object that does nothing? My understanding is that calling lock() on an object doesn't actually alter the object itself, nor does it actually lock it from being used, it's simply used as a placeholder for multiple lock statements to anchor on. So my question is, is this really a good thing to do?

    Read the article

  • Locking behaviour is different via network shares

    - by MattH
    I have been trying to lock a file so that other cloned services cannot access the file. I then read the file, and then move the file when finished. The Move is allowed by using FileShare.Delete. However in later testing, we found that this approach does not work if we are looking at a network share. I appreciate my approach may not have been the best, but my specific question is: Why does the below demo work against the local file, but not against the network file? The more specific you can be the better, as I've found very little information in my searches that indicates network shares behave differently to local disks. string sourceFile = @"C:\TestFile.txt"; string localPath = @"C:\MyLocalFolder\TestFile.txt"; string networkPath = @"\\MyMachine\MyNetworkFolder\TestFile.txt"; File.WriteAllText(sourceFile, "Test data"); if (!File.Exists(localPath)) File.Copy(sourceFile, localPath); foreach (string path in new string[] { localPath, networkPath }) { using (FileStream fsLock = File.Open(path, FileMode.Open, FileAccess.ReadWrite, (FileShare.Read | FileShare.Delete))) { string target = path + ".out"; File.Move(path, target); //This is the point of failure, when working with networkPath if (File.Exists(target)) File.Delete(target); } if (!File.Exists(path)) File.Copy(sourceFile, path); }

    Read the article

  • SQLserver multithreaded locking with TABLOCKX

    - by WilfriedVS
    I have a table "tbluser" with 2 fields: userid = integer (autoincrement) user = nvarchar(100) I have a multithreaded/multi server application that uses this table. I want to accomplish the following: Guarantee that field user is unique in my table Guarantee that combination userid/user is unique in each server's memory I have the following stored procedure: CREATE PROCEDURE uniqueuser @user nvarchar(100) AS BEGIN BEGIN TRAN DECLARE @userID int SET nocount ON SET @userID = (SELECT @userID FROM tbluser WITH (TABLOCKX) WHERE [user] = @user) IF @userID <> '' BEGIN SELECT userID = @userID END ELSE BEGIN INSERT INTO tbluser([user]) VALUES (@user) SELECT userID = SCOPE_IDENTITY() END COMMIT TRAN END Basically the application calls the stored procedure and provides a username as parameter. The stored procedure either gets the userid or insert the user if it is a new user. Am I correct to assume that the table is locked (only one server can insert/query)?

    Read the article

  • MySQL locking problem

    - by teehoo
    I have a simple setup of a set of writers and a set of readers working with a MySQL ISAM table. The writers are only inserting rows while the readers are only checking for new rows. OK, so I know that I don't need a lock in this situation, since I'm not modifying existing rows. However my Writers are accessing one more table that does need a lock. I piece of information seems irrelevant except for the following limitation stated in the MySQL documentation: A session that requires locks must acquire all the locks that it needs in a single LOCK TABLES statement. While the locks thus obtained are held, the session can access only the locked tables. For example, in the following sequence of statements, an error occurs for the attempt to access t2 because it was not locked in the LOCK TABLES statement: So to access the table I want to insert rows into, I NEED to lock it, which is causing me performance problems. Any suggestions of how to get around this?

    Read the article

  • Explain the code: c# locking feature and threads

    - by Mendy
    I used this pattern in a few projects, (this snipped of code is from CodeCampServer), I understand what it does, but I'm really interesting in an explanation about this pattern. Specifically: Why is the double check of _dependenciesRegistered. Why to use lock (Lock){}. Thanks. public class DependencyRegistrarModule : IHttpModule { private static bool _dependenciesRegistered; private static readonly object Lock = new object(); public void Init(HttpApplication context) { context.BeginRequest += context_BeginRequest; } public void Dispose() { } private static void context_BeginRequest(object sender, EventArgs e) { EnsureDependenciesRegistered(); } private static void EnsureDependenciesRegistered() { if (!_dependenciesRegistered) { lock (Lock) { if (!_dependenciesRegistered) { new DependencyRegistrar().ConfigureOnStartup(); _dependenciesRegistered = true; } } } } }

    Read the article

  • Pessimistic locking is not working with Query API

    - by Reddy
    List esns=session.createQuery("from Pool e where e.status=:status "+ "order by uuid asc") .setString("status", "AVAILABLE") .setMaxResults(n) .setLockMode("e", LockMode.PESSIMISTIC_WRITE) .list(); I have the above query written, however it is not generating for update query and simultaneous updates are happening. I am using 3.5.2 version and it has a bug in Criteria API, is the same bug present in query API as well or I am doing something wrong?

    Read the article

  • Strange Locking Behaviour in SQL Server 2005

    - by SQL Learner
    Can anyone please tell me why does the following statement inside a given stored procedure returns repeated results even with locks on the rows used by the first SELECT statement? BEGIN TRANSACTION DECLARE @Temp TABLE ( ID INT ) INSERT INTO @Temp SELECT ID FROM SomeTable WITH (ROWLOCK, UPDLOCK, READPAST) WHERE SomeValue <= 10 INSERT INTO @Temp SELECT ID FROM SomeTable WITH (ROWLOCK, UPDLOCK, READPAST) WHERE SomeValue >= 5 SELECT * FROM @Temp COMMIT TRANSACTION Any values in SomeTable for which SomeValue is between 5 and 10 will be returned twice, even though they were locked in the first SELECT. I thought that locks were in place for the whole transaction, and so I wasn't expecting the query to return repeated results. Why is this happening?

    Read the article

  • In DNS can an IN NS point to a CNAME?

    - by Mark Wagner
    Is it allowed to have an NS record be a CNAME? E.g.: subdomain.example.com. IN NS ns1.example.com. ns1.example.com. CNAME foo.example.com. foo.example.com. IN A 10.1.1.1 This doesn't seem to work in bind though this (of course) does: subdomain.example.com. IN NS foo.example.com. foo.example.com. IN A 10.1.1.1 Any pointers to RFCs prohibiting this setup would be appreciated.

    Read the article

  • MX Record Propagation

    - by Ryan
    How long does it take a change in MX records to propagate? Is the MX record TTL the max time it will take or do we also need to wait for all DNS records to propagate? We are changing our mail server from Exchange 2003 to Exchange Online. Our current MX records (at Network Solutions) have a 1 & 2 hour TTL (primary and backup MX respectively). When we change the MX records to point to Exchange Online should all MX records worldwide be updated within 2-4 hours or should we assume the traditional 48 hours for DNS to propagate? I assume that once all MX records propagate that all new incoming email will be directed to the new server.

    Read the article

  • MX Record for SubDomains

    - by Steve Sloka
    I want to be able to send email to any subdomain I like and not have to configure A records and MX records for each subdomain. Ideally I could send an email to [email protected] and [email protected] and not have to configure anything other than my original domain.com. My current setup: I have a domain (domain.com) and want to have multiple subdomains. (a.domain.com, b.domain.com, c.domain.com, etc). I have an MX record setup to point to domain.com and all email works fine for that domain. I have NOT setup A records for all the subdomains (and really don't want to).

    Read the article

  • nginx www.domain.com vs domain.com virtualhost

    - by m33lky
    I have an http block where I include virtual hosts for the different domains hosted on the same server. For each virtual host I do: listen domain.com:80; Now, domain2.com works fine. However, when I do www.domain2.com it shows the page for domain1.com! How to properly configure nginx? Does this have something to do whether www is a CNAME or an A record? Update: It looks like you can do the following: listen 80; server_name domain.com www.domain.com;

    Read the article

  • PTR Record for host in VLSM subnet

    - by paradroid
    I understand that this is the way a PTR record would be made on a Class A subnet (10.100.250.100 255.0.0.0) dnscmd /RecordAdd 10.in-addr.arpa. 100.250.100 PTR host.domain.tld To clarify the syntax, this is what it should be for a Class C subnet (192.168.1.100 255.255.255.0) dnscmd /RecordAdd 1.168.192.in-addr.arpa. 100 PTR host.domain.tld Is that right? Now how do I do this for a host with the IP address 172.31.111.210 on a 172.31.111.192/26 network? I'm not sure how to do this with a classless subnet mask.

    Read the article

  • C#:checking existing record in database Mysql

    - by Meko
    HI.I searched this question inform and I found solution to change column property Unique Index.Now If I try to insert same record cmd.ExecuteNonQuery() gives error that record exist ,but how can use this exception to give user a message that record exist and must enter new one ? I am trying to make some thing like if(cmd.ExecuteNonQuery() !=true ) { MessageBox.Show("User Exists"); } But I dont know what returns cmd.ExecuteNonQuery() ? Or I must get records using reader in table and compare them with text in Textfiel?

    Read the article

  • Basics of SQL Server 2008 Locking

    Relational databases are designed for multiple simultaneous users, and Microsoft SQL Server is no different. However, supporting multiple users requires some form of concurrency control, which in SQL Server's case means transaction isolation and locking. Read on to learn how SQL Server 2008 implements locking.

    Read the article

  • Basics of SQL Server 2008 Locking

    Relational databases are designed for multiple simultaneous users, and Microsoft SQL Server is no different. However, supporting multiple users requires some form of concurrency control, which in SQL Server's case means transaction isolation and locking. Read on to learn how SQL Server 2008 implements locking.

    Read the article

  • PTR record not valid for all domains

    - by charnley
    We have an issue sending emails to certain domains, namely Time Warner and Cox. Last week, we decommissioned our Exchange 2003 server and now our Exchange 2010 server is doing all of the transport for our domain. We run our own authoritative name servers, so we are in charge of the DNS and have modified our PTR record to reflect the new server. All mailflow is working except for these 2 domains. When I telnet on port 25 to the mail servers for Cox and Time Warner I am receiving errors. For Cox the error is: 554... rejected - no rDNS And when I telnet to port 25 to the Time Warner mail server we get this: 554 5.7.1 - Connection refused. IP name lookup failed for x.x.x.x I have run through the outbound SMTP test on Microsoft Remote Connectivity Analyzer and get 100% completely successful results. MXToolbox comes up with all successful tests on SMTP as well, showing correct reverse banner check, and no blacklisting. DNSQueries.com shows a valid reverse DNS entry as well for us. Outbound emails to these 2 domains continue to sit in the queue. Any ideas or advice would be greatly appreciated. Thanks!

    Read the article

  • PowerDNS CNAME with multiple A records produces unexpected results

    - by bwight
    This problem from what i can tell is isolated to PowerDNS. The servers are running two packages pdns-static-3.0.1-1.i386.rpm and pdns-recursor-3.3-1.i386.rpm on the most recent version of Amazon Linux. The amazon ec2 loadbalancers are assigned a CNAME with multiple hosts. Below is an example of the actual behavior. Notice how the hosts are always in the same order. [root@localhost ~]# host cache.domain.com cache.domain.com is an alias for xxxxx.us-east-1.elb.amazonaws.com. xxxxx.us-east-1.elb.amazonaws.com has address aaa.aaa.aaa.aaa xxxxx.us-east-1.elb.amazonaws.com has address bbb.bbb.bbb.bbb [root@localhost ~]# host cache.domain.com cache.domain.com is an alias for xxxxx.us-east-1.elb.amazonaws.com. xxxxx.us-east-1.elb.amazonaws.com has address aaa.aaa.aaa.aaa xxxxx.us-east-1.elb.amazonaws.com has address bbb.bbb.bbb.bbb [root@localhost ~]# host cache.domain.com cache.domain.com is an alias for xxxxx.us-east-1.elb.amazonaws.com. xxxxx.us-east-1.elb.amazonaws.com has address aaa.aaa.aaa.aaa xxxxx.us-east-1.elb.amazonaws.com has address bbb.bbb.bbb.bbb Expected behavior is round robin for the hosts [root@localhost ~]# host cache.domain.com cache.domain.com is an alias for xxxxx.us-east-1.elb.amazonaws.com. xxxxx.us-east-1.elb.amazonaws.com has address aaa.aaa.aaa.aaa xxxxx.us-east-1.elb.amazonaws.com has address bbb.bbb.bbb.bbb [root@localhost ~]# host cache.domain.com cache.domain.com is an alias for xxxxx.us-east-1.elb.amazonaws.com. xxxxx.us-east-1.elb.amazonaws.com has address bbb.bbb.bbb.bbb xxxxx.us-east-1.elb.amazonaws.com has address aaa.aaa.aaa.aaa [root@localhost ~]# host cache.domain.com cache.domain.com is an alias for xxxxx.us-east-1.elb.amazonaws.com. xxxxx.us-east-1.elb.amazonaws.com has address aaa.aaa.aaa.aaa xxxxx.us-east-1.elb.amazonaws.com has address bbb.bbb.bbb.bbb The addresses eventually do swap but it seems to be on a 30 minute cache timer changing the TTL of the record doesn't appear to affect anything. It appears as though the resolver has a cache of the response. This adversely affects my application because all of the load is only being sent to one of the loadbalancers (Availability Zones) so if I have servers in two zones then only one zone is under load at a time. Do you know how I can fix this so that each time the host is resolved the order of the addresses is alternating.

    Read the article

  • Alternatives to Pessimistic Locking in Cluster Applications

    - by amphibient
    I am researching alternatives to database-level pessimistic locking to achieve transaction isolation in a cluster of Java applications going against the same database. Synchronizing concurrent access in the application tier is clearly not a solution in the present configuration because the same database transaction can be invoked from multiple JVMs concurrently. Currently, we are subject to occasional race conditions which, due to the optimistic locking we have in place via Hibernate, cause a StaleObjectStateException exception and data loss. I have a moderately large transaction within the scope of my refactoring project. Let's describe it as updating one top-level table row and then making various related inserts and/or updates to several of its child entities. I would like to insure exclusive access to the top-level table row and all of the children to be affected but I would like to stay away from pessimistic locking at the database level for performance reasons mostly. We use Hibernate for ORM. Does it make sense to start a single (perhaps synchronous) message queue application into which this method could be moved to insure synchronized access as opposed to each cluster node using its own, which is a clear race condition hazard? I am mentioning this approach even though I am not confident in it because both the top-level table row and its children could also be updated from other system calls, not just the mentioned transaction. So I am seeking to design a solution where the top-level table row and its children will all somehow be pseudo-locked (exclusive transaction isolation) but at the application and not the database level. I am open to ideas and suggestions, I understand this is not a very cut and dried challenge.

    Read the article

  • How to record streaming camera video and auto-erase old data before drive fills up?

    - by nLinked
    I'm interested in making my own home CCTV system using Ubuntu. I want to get network cameras similar to this: http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=260745150596 I want a way to dump or record the live stream to a large hard drive, but have Ubuntu automatically delete the oldest parts of the video while the drive fills, so it can continue recording new data continuously. How can this auto-delete while recording be accomplished? I've searched and searched.

    Read the article

  • insert and modify a record in an entity using Core Data

    - by aminfar
    I tried to find the answer of my question on the internet, but I could not. I have a simple entity in Core data that has a Value attribute (that is integer) and a Date attribute. I want to define two methods in my .m file. First method is the ADD method. It takes two arguments: an integer value (entered by user in UI) and a date (current date by default). and then insert a record into the entity based on the arguments. Second method is like an increment method. It uses the Date as a key to find a record and then increment the integer value of that record. I don't know how to write these methods. (assume that we have an Array Controller for the table in the xib file)

    Read the article

  • insert and mofigy a record in an entity using Core Data

    - by aminfar
    I tried to find the answer of my question on the internet, but I could not. I have a simple entity in Core data that has a Value attribute (that is integer) and a Date attribute. I want to define two methods in my .m file. First method is the ADD method. It takes two arguments: an integer value (entered by user in UI) and a date (current date by default). and then insert a record into the entity based on the arguments. Second method is like an increment method. It uses the Date as a key to find a record and then increment the integer value of that record. I don't know how to write these methods. (assume that we have an Array Controller for the table in the xib file)

    Read the article

  • Query only the first detail record for each master record

    - by Neal S.
    If I have the following master-detail relationship: owner_tbl auto_tbl --------- -------- owner --- owner auto year And I have the following table data: owner_tbl auto_tbl --------- -------- john john, corvette, 1968 john, prius, 2008 james james, f-150, 2004 james, cadillac, 2002 james, accord, 2009 jeff jeff, tesla, 2010 jeff, hyundai, 1996 Now, I want to perform a query that returns the following result: john, corvette, 1968 jeff, hyundai, 1996 james, cadillac, 2002 The query should join the two tables, and sort all the records on the "year" field, but only return the first detail record for each master record. I know how to join the tables and sort on the "year" field, but it's not clear how (or if) I might be able to only retrieve the first joined record for each owner. Three related questions: Can I perform this kind of query using LINQ-to-SQL? Can I perform the query using T-SQL? Would it be best to just create a stored procedure for the query given its likely complexity?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >