Showing posts with label logins. Show all posts
Showing posts with label logins. Show all posts

Friday, March 9, 2012

removing old logins

Using SS2000. I'm removing old logins. When I tried to remove one, I receive
d this message "removing tis login will remove all associated database users
(if any)."
What does this mean?
Thanks,
--
Dan D.Hi,
This error will come when the user has been allocated permissions to some
other databases. So you have to
drop the user associated to that login from all the databases and then drop
the login.
Command to get the databases user is mapped
sp_helplogins <logn_name>
Then use have to go to each database and drop the user
use <dbname>
go
sp_dropuser <user_name>
Once you drop the user from all the databases you could drop the login..
sp_droplogin <login_name>
Thanks
Hari
MCDBA
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:DC4A9B5E-2EB5-40E6-9BD1-F4A9AC51E63D@.microsoft.com...
> Using SS2000. I'm removing old logins. When I tried to remove one, I
received this message "removing tis login will remove all associated
database users (if any)."
> What does this mean?
> Thanks,
> --
> Dan D.|||I understand. Makes perfect sense.
Thanks,
--
Dan D.
"Hari Prasad" wrote:

> Hi,
> This error will come when the user has been allocated permissions to some
> other databases. So you have to
> drop the user associated to that login from all the databases and then dro
p
> the login.
> Command to get the databases user is mapped
> sp_helplogins <logn_name>
> Then use have to go to each database and drop the user
> use <dbname>
> go
> sp_dropuser <user_name>
> Once you drop the user from all the databases you could drop the login..
> sp_droplogin <login_name>
> Thanks
> Hari
> MCDBA
>
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:DC4A9B5E-2EB5-40E6-9BD1-F4A9AC51E63D@.microsoft.com...
> received this message "removing tis login will remove all associated
> database users (if any)."
>
>

removing old logins

Using SS2000. I'm removing old logins. When I tried to remove one, I received this message "removing tis login will remove all associated database users (if any)."
What does this mean?
Thanks,
Dan D.
Hi,
This error will come when the user has been allocated permissions to some
other databases. So you have to
drop the user associated to that login from all the databases and then drop
the login.
Command to get the databases user is mapped
sp_helplogins <logn_name>
Then use have to go to each database and drop the user
use <dbname>
go
sp_dropuser <user_name>
Once you drop the user from all the databases you could drop the login..
sp_droplogin <login_name>
Thanks
Hari
MCDBA
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:DC4A9B5E-2EB5-40E6-9BD1-F4A9AC51E63D@.microsoft.com...
> Using SS2000. I'm removing old logins. When I tried to remove one, I
received this message "removing tis login will remove all associated
database users (if any)."
> What does this mean?
> Thanks,
> --
> Dan D.
|||I understand. Makes perfect sense.
Thanks,
Dan D.
"Hari Prasad" wrote:

> Hi,
> This error will come when the user has been allocated permissions to some
> other databases. So you have to
> drop the user associated to that login from all the databases and then drop
> the login.
> Command to get the databases user is mapped
> sp_helplogins <logn_name>
> Then use have to go to each database and drop the user
> use <dbname>
> go
> sp_dropuser <user_name>
> Once you drop the user from all the databases you could drop the login..
> sp_droplogin <login_name>
> Thanks
> Hari
> MCDBA
>
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:DC4A9B5E-2EB5-40E6-9BD1-F4A9AC51E63D@.microsoft.com...
> received this message "removing tis login will remove all associated
> database users (if any)."
>
>

removing old logins

Using SS2000. I'm removing old logins. When I tried to remove one, I received this message "removing tis login will remove all associated database users (if any)."
What does this mean?
Thanks,
--
Dan D.Hi,
This error will come when the user has been allocated permissions to some
other databases. So you have to
drop the user associated to that login from all the databases and then drop
the login.
Command to get the databases user is mapped
sp_helplogins <logn_name>
Then use have to go to each database and drop the user
use <dbname>
go
sp_dropuser <user_name>
Once you drop the user from all the databases you could drop the login..
sp_droplogin <login_name>
Thanks
Hari
MCDBA
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:DC4A9B5E-2EB5-40E6-9BD1-F4A9AC51E63D@.microsoft.com...
> Using SS2000. I'm removing old logins. When I tried to remove one, I
received this message "removing tis login will remove all associated
database users (if any)."
> What does this mean?
> Thanks,
> --
> Dan D.

Removing Logins from Server and Databases

Is there any way to remove logins from the server and all related databases
in including all roles in the databases?
Thanks,
David
======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485Hi,
Execute
sp_helplogins <loginname>
This will list out all the roles and users associated for the login. Then
you could use the appropriate system procedures to drop the users,login and
roles.
Take a look into books online for below system procs
sp_dropuser
sp_droprole
sp_droplogin
Thanks
Hari
SQL Server MVP
"dotNetDave" <dotNetDave@.discussions.microsoft.com> wrote in message
news:0B172044-F55A-47D2-B812-ED45DED0BB21@.microsoft.com...
> Is there any way to remove logins from the server and all related
> databases
> in including all roles in the databases?
> Thanks,
> David
> ======================================
> David McCarter
> www.vsdntips.com
> VSDN Tips & Tricks .NET Coding Standards available at:
> www.cafepress.com/vsdntips.20412485|||Thanks. I was hoping for one command to do it all ;-)
"Hari Prasad" wrote:

> Hi,
> Execute
> sp_helplogins <loginname>
> This will list out all the roles and users associated for the login. Then
> you could use the appropriate system procedures to drop the users,login an
d
> roles.
> Take a look into books online for below system procs
> sp_dropuser
> sp_droprole
> sp_droplogin
> Thanks
> Hari
> SQL Server MVP
> "dotNetDave" <dotNetDave@.discussions.microsoft.com> wrote in message
> news:0B172044-F55A-47D2-B812-ED45DED0BB21@.microsoft.com...
>
>|||Hi,
You could do every thing using SQL Enterprise manager / SQL Server
Management studio. But internally it does all the below commands.
Thanks
Hari
SQL Server MVP
"dotNetDave" <dotNetDave@.discussions.microsoft.com> wrote in message
news:6308E118-80EA-4D9D-8621-578F9E514209@.microsoft.com...[vbcol=seagreen]
> Thanks. I was hoping for one command to do it all ;-)
> "Hari Prasad" wrote:
>

Removing Logins from Server and Databases

Is there any way to remove logins from the server and all related databases
in including all roles in the databases?
Thanks,
David
====================================== David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485Hi,
Execute
sp_helplogins <loginname>
This will list out all the roles and users associated for the login. Then
you could use the appropriate system procedures to drop the users,login and
roles.
Take a look into books online for below system procs
sp_dropuser
sp_droprole
sp_droplogin
Thanks
Hari
SQL Server MVP
"dotNetDave" <dotNetDave@.discussions.microsoft.com> wrote in message
news:0B172044-F55A-47D2-B812-ED45DED0BB21@.microsoft.com...
> Is there any way to remove logins from the server and all related
> databases
> in including all roles in the databases?
> Thanks,
> David
> ======================================> David McCarter
> www.vsdntips.com
> VSDN Tips & Tricks .NET Coding Standards available at:
> www.cafepress.com/vsdntips.20412485|||Thanks. I was hoping for one command to do it all ;-)
"Hari Prasad" wrote:
> Hi,
> Execute
> sp_helplogins <loginname>
> This will list out all the roles and users associated for the login. Then
> you could use the appropriate system procedures to drop the users,login and
> roles.
> Take a look into books online for below system procs
> sp_dropuser
> sp_droprole
> sp_droplogin
> Thanks
> Hari
> SQL Server MVP
> "dotNetDave" <dotNetDave@.discussions.microsoft.com> wrote in message
> news:0B172044-F55A-47D2-B812-ED45DED0BB21@.microsoft.com...
> > Is there any way to remove logins from the server and all related
> > databases
> > in including all roles in the databases?
> >
> > Thanks,
> > David
> >
> > ======================================> > David McCarter
> > www.vsdntips.com
> > VSDN Tips & Tricks .NET Coding Standards available at:
> > www.cafepress.com/vsdntips.20412485
>
>|||Hi,
You could do every thing using SQL Enterprise manager / SQL Server
Management studio. But internally it does all the below commands.
Thanks
Hari
SQL Server MVP
"dotNetDave" <dotNetDave@.discussions.microsoft.com> wrote in message
news:6308E118-80EA-4D9D-8621-578F9E514209@.microsoft.com...
> Thanks. I was hoping for one command to do it all ;-)
> "Hari Prasad" wrote:
>> Hi,
>> Execute
>> sp_helplogins <loginname>
>> This will list out all the roles and users associated for the login. Then
>> you could use the appropriate system procedures to drop the users,login
>> and
>> roles.
>> Take a look into books online for below system procs
>> sp_dropuser
>> sp_droprole
>> sp_droplogin
>> Thanks
>> Hari
>> SQL Server MVP
>> "dotNetDave" <dotNetDave@.discussions.microsoft.com> wrote in message
>> news:0B172044-F55A-47D2-B812-ED45DED0BB21@.microsoft.com...
>> > Is there any way to remove logins from the server and all related
>> > databases
>> > in including all roles in the databases?
>> >
>> > Thanks,
>> > David
>> >
>> > ======================================>> > David McCarter
>> > www.vsdntips.com
>> > VSDN Tips & Tricks .NET Coding Standards available at:
>> > www.cafepress.com/vsdntips.20412485
>>