Microsoft Sql Server 2008 Error 1807
Contents |
by atulru Status : Closed as By Design By Design The product team believes this item works according to its intended design. A more detailed explanation for the resolution of this particular item may have been provided could not obtain exclusive lock on database 'model' sharepoint in the comments section. 4 0 Sign into vote ID 631177 Comments 2 Status Closed create database failed. some file names listed could not be created. check related errors. Workarounds 0 Type Bug Repros 4 Opened 12/14/2010 9:17:16 AM Access Restriction Public Description While creating new database, if there is sql server error 5030 another session open with 'model' database as current database, the database creation fails with following error Msg 1807, Level 16, State 3, Line 1 Could not obtain exclusive lock on database ‘model'. Retry the operation later. Msg 1802, Level sp_who2 parameters 16, State 4, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors. 1) I beleive this is not the correct way to create database, where an exclusive lock should be required on model database in order to create new database(even when there no changes occuring on database objects, adding or removing of logins) Microsoft should find a way to bypass exclusive requirement. PS: I do know model database is
Exclusive Access Could Not Be Obtained Because The Database Is In Use
template database for creating new database. also the size of new database should be greater or equal to model database. DETAILS ATTACH A FILE EDIT THIS ITEM Assign To Item can only be reassigned when it is active. Comments (2) | Workarounds (0) | Attachments (0) Sign in to post a comment. Please enter a comment. Submit Posted by cdoulis on 12/22/2014 at 1:33 PM This issue can also arise as a result of the System Center Operations Manager (SCOM) HealthService agent monitoring the model database and running the following query.(@P1 bigint)SET NOCOUNT ONSELECT size / 128.0 as fileSize, file_id as fileId, FILEPROPERTY(name, 'SpaceUsed') / 128.0 as fileUsed, CASE WHEN max_size = -1 OR max_size = 268435456 THEN -1 ELSE max_size / 128 END as fileMaxSize, CASE WHEN growth = 0 THEN 0 ELSE 1 END as IsAutoGrow, is_percent_growth as isPercentGrowth, growth as fileGrowth, physical_name FROM sys.master_files WITH (NOLOCK) WHERE type IN (0,1) AND is_read_only = 0 AND database_id = @P1 Thanks,Cesar Posted by Microsoft on 12/15/2010 at 4:42 PM Hi atulru,Thanks for your time to send us the feedback. The exclusive lock on the model database is a necessary step to create a new database. When SQL Server creates a new database, "The SQL Server uses a copy of the model database to initi
SERVER - FIX: Error: 1807 Could not obtain exclusive lock on database ‘model'. Retry the operation later. January 1, 2010Pinal DaveSQL, SQL Server, SQL Tips and Tricks23
The Database Could Not Be Exclusively Locked To Perform The Operation
commentsWhile working on query optimization project, I encountered following error.Msg sql create database 1807, Level 16, State 3, Line 1 Could not obtain exclusive lock on database ‘model'. Retry the operation later. Msg 1802, Level 16, State 4, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.The resolution https://connect.microsoft.com/SQLServer/feedback/details/631177/creating-database-fails-with-error-could-not-obtain-exclusive-lock-on-database-model-retry-the-operation-later of above problem is quick and easy.Fix/Workaround/Solution:Disconnect and Reconnect your SQL Server Management Studio's session. Your error will go away.Reference: Pinal Dave (http://blog.SQLAuthority.com) Tags: SQL Error Messages, SQL Scripts3Related Articles SQL SERVER - Interesting Interview Questions - Difficult SQL Puzzle December 7, 2008Pinal Dave SQL SERVER - Denali - Conversion Function - http://blog.sqlauthority.com/2010/01/01/sql-server-fix-error-1807-could-not-obtain-exclusive-lock-on-database-model-retry-the-operation-later/ PARSE() - A Quick Introduction September 6, 2011Pinal Dave SQL SERVER - Insert Data From One Table to Another Table - INSERT INTO SELECT - SELECT INTO TABLE August 15, 2007Pinal Dave 23 comments. Leave new Lorenzo Raras January 3, 2010 7:10 pmJust a few questions please:1) What causes this issue? 1.a) Is the problem with the client or the server? 1.b) Does this only exist in "Create Database" commands?2) What Version of SQL Server does this affect? 2.a) Specifically, what build we you using when you got the error 2.b) Does this exist in SQL 2005 and Up? 2.c) Is it isolated to 32 or 64 bit?3) Is there a CU or SP Fix to this yet?Thank you.Reply nicolas August 17, 2010 8:29 pmthanks !!Reply aay January 24, 2011 3:56 amdid not fix the problem with sql server 2008 expressReply Prasanna February 8, 2011 1:55 amThanks…works like charm!!!!Reply sexton March 10, 2011 3:46
ASP.NET MVC | Online Interviews | Top Performers | DNF MVP | Top Posts | Winners | Subscribe | Bookmarks | Catalogs Welcome Guest ! Register Login Home > Forums > Error and Solution > Loading ... SQL http://www.dotnetfunda.com/forums/show/3024/sql-server-when-creating-a-new-database Server : When creating a new database... Posted by PandianS under Error and Solution on 12/5/2010 | Points: 10 | Views : 7466 | Status : [Member] [MVP] | Replies : 2 Write New Post | Search Forums | Resolved Posts | Un Answered Posts | Forums Home [Resolved] Many of us may experience this error when creating a new Database..Msg could not 1807, Level 16, State 3, Line 1Could not obtain exclusive lock on database 'model'. Retry the operation later.Root Cause: Root cause of this error may be one of the following reason 1. Somebody exclusively open the Model database in different session 2. If more than one create database statements attempt to run simultaneouslyHow to identity:Use master GOIF EXISTS(SELECT request_session_id FROM could not be sys.dm_tran_locksWHERE resource_database_id = DB_ID('Model')) PRINT 'Model Database being used by some other session'ELSE PRINT 'Model Database not used by other session' So we can identify that whether the Model database being execlusively used by any session.., If you found anybody using the Model database execlusively, You can identify what kind of statement being used by the session...using the script given belowSELECT request_session_id FROM sys.dm_tran_locksWHERE resource_database_id = DB_ID('Model')The script will return the session ID (i.e: 53)We have to identity what kind of query/activity being performed by this session(53).DBCC InputBuffer(53)EventInfo column returns the query performed, Based on that, you have to decide whether the Session ID(53) can be Aborted/ Not. If you want to abort the session(53), run the commandKill 53Now you can try to create a new Database..! Cheers www.SQLServerbuddy.blogspot.com iLink Multitech Solutions Reply | Reply with Attachment Alert Moderator Responses Posted by: Vuyiswamb on: 12/5/2010 [Member] [MVP] [Administrator] NotApplicable | Points: 25 0 Nice, thanks for sharingThank you for posting at Dotnetfunda [Administrator]PandianS, if this helps please login to Mark As Answer. | Alert Moderator Posted by: Ravidnrabarange on: 7/15/