June 1, 2005 at 10:57 am
HI. I am noticing that on some of my security records, the default database has been modified. Does anyone know how this can happen automatically? I am the only person that modifies such things. they got changed to databases the users does not have security to.
Juanita
June 1, 2005 at 11:35 am
Are you aware that any user can change their own default database ?
If you have tracing enabled, the hostname, SQL login name, Windows login and program can be captured.
SQL = Scarcely Qualifies as a Language
June 1, 2005 at 11:38 am
Start the trace and look for this sp execution :
sp_defaultdb
Public is granted access by default.
June 2, 2005 at 2:17 pm
Our users would not have a clue as to how to change their default database. I don't think that was it. But I can try the trace. Is that through sql profiler?
June 2, 2005 at 2:24 pm
Yes... and it takes only one .
June 2, 2005 at 2:39 pm
HI..when I run profiler what data field can i use to narrow down my trace to sp_defaultdb?
also, if a user has a default database that is set to a database he/she doesn't even have security to, would that necessarily mean their connection to their application would not work? or as long as their application uses the USE statement to put the application in the correct database context.
sorry if this is confusing.. hard to put into words.
juanita
June 2, 2005 at 3:06 pm
I'm no expert at this either... had to do a few test but this seems to work :
Under the events to profil (user the standard trace)
keep the Stored proc RCP:Complete event
and TSQL : BatchCompleted
In filters :
textdata / like / %sp_defaultdb%
June 2, 2005 at 3:10 pm
AH HA !!! that was it.. I had everything like you said, except I didn't put the % signs in front and back..
Thanks so much
Juanita
June 2, 2005 at 3:14 pm
Hence my few tries .
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply