Showing posts with label login. Show all posts
Showing posts with label login. Show all posts

Friday, March 23, 2012

rename login (Possible OT)

I need to rename a login that owns some tables. I cannot do this via the
enterprise manager? Can I do it via SQL scripting?
Please advise (also if there is a better NG to post this to)
Thanks
Don't think so, butyou could create the new login and then change the owner
of all the object that the old login owns using sp_changeobjectowner and/or
sp_changedbowner (if they own a database). Doing this would accomplish the
rename.
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>
|||Hi,
There is no commands in sql server to rename a Login. The better
recommendation is to set a strong password
which can not be guessed by any one.
Otherwise create a new login/user and assign the object owner to that new
user using sp_changeobjectowner procedure
and drop the existing user.
Thanks
Hari
MCDBA
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>
|||Matt,
Is this a SQL Server login or a domain login? (I assume SQL Server.) There
is not a way to do this directly (although you can monkey with system tables
this is to be avoided).
Suggestion:
1. Create a login with the new name.
2. Give it the same rights the old login had.
3. Use sp_changeobjectowner for all objects affected to point them to the
new owner.
4. Drop the old login.
Russell Fields
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>
|||Thanks.
I have to reset the user not because of password issues but because the
database was moved without detaching it first and the username was held in
the db but not the login name.
thanks for all your help, I will try this method.
"Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
news:OmTBpusLEHA.3216@.tk2msftngp13.phx.gbl...
> Matt,
> Is this a SQL Server login or a domain login? (I assume SQL Server.)
There
> is not a way to do this directly (although you can monkey with system
tables[vbcol=seagreen]
> this is to be avoided).
> Suggestion:
> 1. Create a login with the new name.
> 2. Give it the same rights the old login had.
> 3. Use sp_changeobjectowner for all objects affected to point them to the
> new owner.
> 4. Drop the old login.
> Russell Fields
> "Matt Pollicove" <matt@.maxware.com> wrote in message
> news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
the
>

rename login (Possible OT)

I need to rename a login that owns some tables. I cannot do this via the
enterprise manager? Can I do it via SQL scripting?
Please advise (also if there is a better NG to post this to)
ThanksDon't think so, butyou could create the new login and then change the owner
of all the object that the old login owns using sp_changeobjectowner and/or
sp_changedbowner (if they own a database). Doing this would accomplish the
rename.
--
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>|||Hi,
There is no commands in sql server to rename a Login. The better
recommendation is to set a strong password
which can not be guessed by any one.
Otherwise create a new login/user and assign the object owner to that new
user using sp_changeobjectowner procedure
and drop the existing user.
Thanks
Hari
MCDBA
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>|||Matt,
Is this a SQL Server login or a domain login? (I assume SQL Server.) There
is not a way to do this directly (although you can monkey with system tables
this is to be avoided).
Suggestion:
1. Create a login with the new name.
2. Give it the same rights the old login had.
3. Use sp_changeobjectowner for all objects affected to point them to the
new owner.
4. Drop the old login.
Russell Fields
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>|||Thanks.
I have to reset the user not because of password issues but because the
database was moved without detaching it first and the username was held in
the db but not the login name.
thanks for all your help, I will try this method.
"Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
news:OmTBpusLEHA.3216@.tk2msftngp13.phx.gbl...
> Matt,
> Is this a SQL Server login or a domain login? (I assume SQL Server.)
There
> is not a way to do this directly (although you can monkey with system
tables
> this is to be avoided).
> Suggestion:
> 1. Create a login with the new name.
> 2. Give it the same rights the old login had.
> 3. Use sp_changeobjectowner for all objects affected to point them to the
> new owner.
> 4. Drop the old login.
> Russell Fields
> "Matt Pollicove" <matt@.maxware.com> wrote in message
> news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> > I need to rename a login that owns some tables. I cannot do this via
the
> > enterprise manager? Can I do it via SQL scripting?
> >
> > Please advise (also if there is a better NG to post this to)
> >
> > Thanks
> >
> >
>

rename login (Possible OT)

I need to rename a login that owns some tables. I cannot do this via the
enterprise manager? Can I do it via SQL scripting?
Please advise (also if there is a better NG to post this to)
ThanksDon't think so, butyou could create the new login and then change the owner
of all the object that the old login owns using sp_changeobjectowner and/or
sp_changedbowner (if they own a database). Doing this would accomplish the
rename.
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>|||Hi,
There is no commands in sql server to rename a Login. The better
recommendation is to set a strong password
which can not be guessed by any one.
Otherwise create a new login/user and assign the object owner to that new
user using sp_changeobjectowner procedure
and drop the existing user.
Thanks
Hari
MCDBA
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>|||Matt,
Is this a SQL Server login or a domain login? (I assume SQL Server.) There
is not a way to do this directly (although you can monkey with system tables
this is to be avoided).
Suggestion:
1. Create a login with the new name.
2. Give it the same rights the old login had.
3. Use sp_changeobjectowner for all objects affected to point them to the
new owner.
4. Drop the old login.
Russell Fields
"Matt Pollicove" <matt@.maxware.com> wrote in message
news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
> I need to rename a login that owns some tables. I cannot do this via the
> enterprise manager? Can I do it via SQL scripting?
> Please advise (also if there is a better NG to post this to)
> Thanks
>|||Thanks.
I have to reset the user not because of password issues but because the
database was moved without detaching it first and the username was held in
the db but not the login name.
thanks for all your help, I will try this method.
"Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
news:OmTBpusLEHA.3216@.tk2msftngp13.phx.gbl...
> Matt,
> Is this a SQL Server login or a domain login? (I assume SQL Server.)
There
> is not a way to do this directly (although you can monkey with system
tables
> this is to be avoided).
> Suggestion:
> 1. Create a login with the new name.
> 2. Give it the same rights the old login had.
> 3. Use sp_changeobjectowner for all objects affected to point them to the
> new owner.
> 4. Drop the old login.
> Russell Fields
> "Matt Pollicove" <matt@.maxware.com> wrote in message
> news:e0tH9msLEHA.3596@.tk2msftngp13.phx.gbl...
the[vbcol=seagreen]
>

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.

Saturday, February 25, 2012

removing Builtin\Administrators login

How can I safely remove the Builtin\Administrators login?See the following:
http://www.microsoft.com/technet/tr...chnet/prodtechn
ol/sql/maintain/security/sp3sec/SP3SEC02.ASP
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Thanks
quote:

>--Original Message--
>See the following:
>http://www.microsoft.com/technet/treeview/default.asp?

url=/technet/prodtechn
quote:

>ol/sql/maintain/security/sp3sec/SP3SEC02.ASP
>Thanks,
>Kevin McDonnell
>Microsoft Corporation
>This posting is provided AS IS with no warranties, and

confers no rights.
quote:

>
>.
>

Monday, February 20, 2012

Removing access to see Stored Proc contents.

Howdy all. I have a 3rd party vendor (sort of) that needs to know a login and
password on a SQL server for a DB he will be accessing. He only needs to have
the ability to exec Stored Procs (SP), not write directly to tables. The
problem that Im having with this though is that I:
1; Create a login and user named Test.
2; Add Test to a DB, but assign no permissions.
3; Login as test using Enterprise Manager.
4; I can see the names of the tables.
5; If theres a way around that, Test can also open up the SP's and see the
table names there.
So now Test has a valid login/ password and knows the names of all my
tables. Is there a way to stop him from being able to see the table names for
both #4 and #5? Or any other way Im not thinking of?
TIA, ChrisR.Not with SQL 2000 but with 2005 you can.
--
Andrew J. Kelly SQL MVP
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:9FD0361F-6D5F-4A1F-B93B-7A7EB6EC651B@.microsoft.com...
> Howdy all. I have a 3rd party vendor (sort of) that needs to know a login
> and
> password on a SQL server for a DB he will be accessing. He only needs to
> have
> the ability to exec Stored Procs (SP), not write directly to tables. The
> problem that Im having with this though is that I:
> 1; Create a login and user named Test.
> 2; Add Test to a DB, but assign no permissions.
> 3; Login as test using Enterprise Manager.
> 4; I can see the names of the tables.
> 5; If theres a way around that, Test can also open up the SP's and see the
> table names there.
> So now Test has a valid login/ password and knows the names of all my
> tables. Is there a way to stop him from being able to see the table names
> for
> both #4 and #5? Or any other way Im not thinking of?
>
> TIA, ChrisR.

Removing access to see Stored Proc contents.

Howdy all. I have a 3rd party vendor (sort of) that needs to know a login an
d
password on a SQL server for a DB he will be accessing. He only needs to hav
e
the ability to exec Stored Procs (SP), not write directly to tables. The
problem that Im having with this though is that I:
1; Create a login and user named Test.
2; Add Test to a DB, but assign no permissions.
3; Login as test using Enterprise Manager.
4; I can see the names of the tables.
5; If theres a way around that, Test can also open up the SP's and see the
table names there.
So now Test has a valid login/ password and knows the names of all my
tables. Is there a way to stop him from being able to see the table names fo
r
both #4 and #5? Or any other way Im not thinking of?
TIA, ChrisR.Not with SQL 2000 but with 2005 you can.
Andrew J. Kelly SQL MVP
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:9FD0361F-6D5F-4A1F-B93B-7A7EB6EC651B@.microsoft.com...
> Howdy all. I have a 3rd party vendor (sort of) that needs to know a login
> and
> password on a SQL server for a DB he will be accessing. He only needs to
> have
> the ability to exec Stored Procs (SP), not write directly to tables. The
> problem that Im having with this though is that I:
> 1; Create a login and user named Test.
> 2; Add Test to a DB, but assign no permissions.
> 3; Login as test using Enterprise Manager.
> 4; I can see the names of the tables.
> 5; If theres a way around that, Test can also open up the SP's and see the
> table names there.
> So now Test has a valid login/ password and knows the names of all my
> tables. Is there a way to stop him from being able to see the table names
> for
> both #4 and #5? Or any other way Im not thinking of?
>
> TIA, ChrisR.

Removing access to see Stored Proc contents.

Howdy all. I have a 3rd party vendor (sort of) that needs to know a login and
password on a SQL server for a DB he will be accessing. He only needs to have
the ability to exec Stored Procs (SP), not write directly to tables. The
problem that Im having with this though is that I:
1; Create a login and user named Test.
2; Add Test to a DB, but assign no permissions.
3; Login as test using Enterprise Manager.
4; I can see the names of the tables.
5; If theres a way around that, Test can also open up the SP's and see the
table names there.
So now Test has a valid login/ password and knows the names of all my
tables. Is there a way to stop him from being able to see the table names for
both #4 and #5? Or any other way Im not thinking of?
TIA, ChrisR.
Not with SQL 2000 but with 2005 you can.
Andrew J. Kelly SQL MVP
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:9FD0361F-6D5F-4A1F-B93B-7A7EB6EC651B@.microsoft.com...
> Howdy all. I have a 3rd party vendor (sort of) that needs to know a login
> and
> password on a SQL server for a DB he will be accessing. He only needs to
> have
> the ability to exec Stored Procs (SP), not write directly to tables. The
> problem that Im having with this though is that I:
> 1; Create a login and user named Test.
> 2; Add Test to a DB, but assign no permissions.
> 3; Login as test using Enterprise Manager.
> 4; I can see the names of the tables.
> 5; If theres a way around that, Test can also open up the SP's and see the
> table names there.
> So now Test has a valid login/ password and knows the names of all my
> tables. Is there a way to stop him from being able to see the table names
> for
> both #4 and #5? Or any other way Im not thinking of?
>
> TIA, ChrisR.