Wednesday, March 7, 2012

Change the default database

This is a SQL Server 2000 database with several databases
with Windows groups and users.
If a user is in a Windows group how can the user change
his or her default database without changing the Window
group default database?
Thank You,
MarkI haven't tried it, but I'm not sure you can use EXEC sp_defaultdb
'domain\username', 'dbname' unless the user is explicitly listed as a login
in SQL Server.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Mark" <anonymous@.discussions.microsoft.com> wrote in message
news:01d801c4acaa$76d19140$a501280a@.phx.gbl...
> This is a SQL Server 2000 database with several databases
> with Windows groups and users.
> If a user is in a Windows group how can the user change
> his or her default database without changing the Window
> group default database?
> Thank You,
> Mark|||Each user will have to run sp_defaultdb 'ntdomain\ntloginname' ,
'defaultdatabse' from a QA window.
- Bhanu.
"Mark" <anonymous@.discussions.microsoft.com> wrote in message
news:01d801c4acaa$76d19140$a501280a@.phx.gbl...
> This is a SQL Server 2000 database with several databases
> with Windows groups and users.
> If a user is in a Windows group how can the user change
> his or her default database without changing the Window
> group default database?
> Thank You,
> Mark

No comments:

Post a Comment