February 4, 2011 at 5:08 pm
Hello...
Recently I got a report on a database error catched in the user application... the error shows the "Login failed for user 'produccion'. Only one administrator can connect at this time.". I did some googlin' and what I found out is that the database.. might have "switched" to Single user mode?... any clues on what could have caused that error to show?... could a database backup temporarily switch the database to single user mode? ... Your help is greatly appreciated, thanks in advance!
February 5, 2011 at 1:54 am
Someone ran ALTER DATABASE ... SET SINGLE_USER. However the error looks more like the entire instance is in single user mode. That would require someone to have added the -m flag to the startup parameters
Open up the SQL error log (file called ERRORLOG) and see what it says. If the instance is in single user mode, it will be clearly indicated towards the beginning of the log. If it's just the database, there will be an entry indicating that an ALTER DATABASE was run.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 5, 2011 at 6:21 am
another help can be found in your default trace files.
/*
* Import Default Trace
*/
/*
* read SQL default trace file name
*/
SET nocount ON
declare @wrkTraceFilename nvarchar(500)
-- read trace info
SELECT @wrkTraceFilename = convert(nvarchar(500),[value] )
FROM :: fn_trace_getinfo(1) -- 1 = default trace
where [property] = 2
-- Property
-- 1 = Trace options. For more information, see @options in sp_trace_create (Transact-SQL).
-- 2 = File name
-- 3 = Max size
-- 4 = Stop time
-- 5 = Current trace status
print @wrkTraceFilename
select *
into #tmpTrace
from ::fn_trace_gettable(@wrkTraceFilename , default)
Select db_name(DatabaseID) as DatabaseName0
, NtDomainName + NTUserName as TheNtDomainName_NTUserName
, HostName as TheHostName
, ApplicationName as TheApplicationName
, LoginName as TheLoginName
, StartTime as TheStartTime
, EndTime as TheEndTime
, ObjectId as TheObjectId
, ServerName as TheServername
, *
from #tmpTrace
order by TheStartTime, DatabaseName, TheLoginName, TheNtDomainName_NTUserName, TheHostName, TheApplicationName
;
I pulled it in a temp table , so you can further query it to figure out the situation.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply