Thursday, March 8, 2012
Alter login issue
r
sql login "log2"
When I connect using "LOG1", right click on "log2" in "logins, security",
try to change its password I get the following error :
Change password failed......Additional info........
Can not alter login 'log2' because it does not exist or you dont have
permissions error 15151
Thanks for your helpProbably because you aren't supplying the old password when
you go through SSMS. Read the rest of the permissions
section in books online for ALTER LOGIN.
-Sue
On Thu, 26 Oct 2006 13:59:01 -0700, SalamElias
<eliassal@.online.nospam> wrote:
>I created a SQL server login "LOG1", granted him "ALTER" privilege on anoth
er
>sql login "log2"
>When I connect using "LOG1", right click on "log2" in "logins, security",
>try to change its password I get the following error :
>Change password failed......Additional info........
>Can not alter login 'log2' because it does not exist or you dont have
>permissions error 15151
>Thanks for your help|||Hello Salam,
I understand that you cannot change password of another login even you have
grant the alter login permission to the login. As Sue mentioned, this
behavior is as designed and you could refer to Books Online
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/e247b84e-c99e-4af8-8b50-
57586e1cb1c5.htm for details. Any users without SQL admin rights/control
server permissions shall provide old password informaiton to change a
password of logins. This even occurs if the login want to change its own
password. This is a security purpose design.
You may try the following statement to change the password
Alter login testuser with password='newpass' old_password='oldpass'
Actually, this calls the following API in SQL Server.
ChangePassword(System.String oldPassword, System.String newPassword)
I understand it might be not convenient under some situation though it may
bring more security to SQL Server. Your feedback on this issue is routed to
the product team, and I also encourage you submit via the link below
http://lab.msdn.microsoft.com/produ...ck/default.aspx
If anything is unclear or you have concerns on the issue, please feel free
to let's know. Thank you.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications
<http://msdn.microsoft.com/subscript...ps/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscript...rt/default.aspx>.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello Salam,
I'm still interested in this issue. If you have any comments or questions,
please feel free to let's know. We look forward to hearing from you.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||"Peter Yang [MSFT]" wrote:
> Hello Salam,
> I understand that you cannot change password of another login even you hav
e
> grant the alter login permission to the login. As Sue mentioned, this
> behavior is as designed and you could refer to Books Online
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/e247b84e-c99e-4af8-8b5
0-
> 57586e1cb1c5.htm for details. Any users without SQL admin rights/control
> server permissions shall provide old password informaiton to change a
> password of logins. This even occurs if the login want to change its own
> password. This is a security purpose design.
> You may try the following statement to change the password
> Alter login testuser with password='newpass' old_password='oldpass'
>
Thanks - this answer solved my problem. Nowhere in the indicated BOL page
does it say about the requirement to supply the old password to change the
new password - it even has the OLD_PASSWORD section in [optional] square
brackets in the Syntax section.
(When we create user accounts we set a default password, then get the user
to login and change it to something only they know. We were getting an
unhelpful "Login doesn't exists or permission denied" message, when the
users tried to change their details on our new SQL Server 2005 Server)|||I think your right in terms of the documentation not being
clear. The help topic for sp_password is alludes to the
issue a bit more. Nothing all that direct though.
-Sue
On Wed, 1 Nov 2006 03:51:02 -0800, chrisredburn
<chrisredburn@.discussions.microsoft.com> wrote:
>
>"Peter Yang [MSFT]" wrote:
>
>Thanks - this answer solved my problem. Nowhere in the indicated BOL page
>does it say about the requirement to supply the old password to change the
>new password - it even has the OLD_PASSWORD section in [optional] squar
e
>brackets in the Syntax section.
>(When we create user accounts we set a default password, then get the user
>to login and change it to something only they know. We were getting an
>unhelpful "Login doesn't exists or permission denied" message, when the
>users tried to change their details on our new SQL Server 2005 Server)|||I opened a request for updating the permissions section of ALTER LOGIN.
Thanks
Laurentiu Cristofor [MSFT]
Software Development Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:hjmik29h0qm3lnrjfgkpostj8h7mjuu1ob@.
4ax.com...
>I think your right in terms of the documentation not being
> clear. The help topic for sp_password is alludes to the
> issue a bit more. Nothing all that direct though.
> -Sue
> On Wed, 1 Nov 2006 03:51:02 -0800, chrisredburn
> <chrisredburn@.discussions.microsoft.com> wrote:
>
>|||Thanks Laurentiu!
-Sue
On Thu, 2 Nov 2006 11:55:24 -0800, "Laurentiu Cristofor
[MSFT]" <Laurentiu.Cristofor@.nospam.com> wrote:
>I opened a request for updating the permissions section of ALTER LOGIN.
>Thanks
Friday, February 24, 2012
Allowing user to connect to his database
I would like to give user access to his database running on mssql 2000 using
enterprise manager.
But... the user must not be able to see any other databases on that server,
I just want him to be able to see his own database and manage it.
Is this possible without installing another instance of sql server and give
that user access to that instance?
and if so how does the licensing work if you have many instances of sql
running on one server?
Regards
GauiThat's a known limitation with Enterprise Manager. It was designed for the
system admin to use to manage all databases.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Just trying to do this aswell.. Never mind will have to
find another way. Do you know if there is a seperate tool
for visually creating stored procedures other than VIEW /
SP parts of Enterprise manager?
>--Original Message--
>That's a known limitation with Enterprise Manager. It
was designed for the
>system admin to use to manage all databases.
>Thanks,
>Kevin McDonnell
>Microsoft Corporation
>This posting is provided AS IS with no warranties, and
confers no rights.
>
>.
>
Sunday, February 19, 2012
Allowing Remote Connections
When I attempt to connect to our new SQLServer 2005 from my workstation running the latest XP Pro and SQL Server Mgmt Studio 2005, I get the following error. I checked the setup on the server, and TCP/IP connections are allowed. I connect to all our older SQL Server 2000 servers/databases just fine.
TITLE: Connect to Server
Cannot connect to <server>\<instance> (deleted).
ADDITIONAL INFORMATION:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
BUTTONS:
OK
Terry,
I'm going to move this thread to the "Data Access" forum where I think you'll get a quicker response.
-Jeffrey
|||Terry,
The error message shows that the sql browser is not able to be contacted by the client. So you need to (1) enble the sql browser service and start it. (2) make exception on your firewall setting to allow 1434 udp port.
Otherwise, you can specify port number of your sqlserver in your connection string. For example. tcp:<servername>,<serverport>
SQL Browswer is used to resolve connection paramenter for named instance. It is a seperate service from SQL Server.
|||Terry,
I didn't do what the one reply did, but it gave me a clue on where to look.
SQL 2005 has a new SQL Server Configuration Manager under Configuration Tools. Click on that, after it opens go to SQL Server 2005 Services and verity that SQL Server Browser is running.
Now this is the change I had to make. Open SQL Server 2005 Network Configuation, and click on Protocols for <server>. You should just need to enable TCP/IP then restart SQL Server 2005 Service, if you like to you can enable the others if you use them here.
Hope this helps.
Randy
Allowing Remote Connections
When I attempt to connect to our new SQLServer 2005 from my workstation running the latest XP Pro and SQL Server Mgmt Studio 2005, I get the following error. I checked the setup on the server, and TCP/IP connections are allowed. I connect to all our older SQL Server 2000 servers/databases just fine.
TITLE: Connect to Server
Cannot connect to <server>\<instance> (deleted).
ADDITIONAL INFORMATION:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
BUTTONS:
OK
Terry,
I'm going to move this thread to the "Data Access" forum where I think you'll get a quicker response.
-Jeffrey
|||Terry,
The error message shows that the sql browser is not able to be contacted by the client. So you need to (1) enble the sql browser service and start it. (2) make exception on your firewall setting to allow 1434 udp port.
Otherwise, you can specify port number of your sqlserver in your connection string. For example. tcp:<servername>,<serverport>
SQL Browswer is used to resolve connection paramenter for named instance. It is a seperate service from SQL Server.
|||Terry,
I didn't do what the one reply did, but it gave me a clue on where to look.
SQL 2005 has a new SQL Server Configuration Manager under Configuration Tools. Click on that, after it opens go to SQL Server 2005 Services and verity that SQL Server Browser is running.
Now this is the change I had to make. Open SQL Server 2005 Network Configuation, and click on Protocols for <server>. You should just need to enable TCP/IP then restart SQL Server 2005 Service, if you like to you can enable the others if you use them here.
Hope this helps.
Randy
allowing other computers to connect to my msde server
I have successfully set up msde on my computer - and would like to know how
can install the MS SQL odbc driver on other computers to connect to my
server.
I cant seem to find the MS SQL driver by itself or with an installation
package.
Thanks
AL
The ODBC and OLE DB drivers come installed with any post Windows 95/ NT 4
Microsoft operating system, and for NT 4 they're included in SP4 IIRC. You
can also download MDAC, which includes all the drivers, from:
http://msdn.microsoft.com/data/downl...s/default.aspx
Jacco Schalkwijk
SQL Server MVP
"Andy Levy" <andy underscore levy at hotmail dot com> wrote in message
news:eY30HAcMEHA.628@.TK2MSFTNGP11.phx.gbl...
> Hi -
> I have successfully set up msde on my computer - and would like to know
how
> can install the MS SQL odbc driver on other computers to connect to my
> server.
> I cant seem to find the MS SQL driver by itself or with an installation
> package.
> Thanks
> AL
>
Thursday, February 16, 2012
Allow iis to connect to a sql express database
Folks,
I have an asp.net web app developed in visual studio 2005. The app works fine with the development server from visual studio and sql express. When I try to test the app under IIS before deploying to my host I get a permission not allowed message.
"[SqlException (0x80131904): User does not have permission to perform this action.]".
How do I give my web app access to my sql server database?
Thanks
Doug
These references should help:
Web Applications -Connect to SQL Server
Configuring an ASP.NET 2.0 Application to Work with Microsoft SQL Server 2000 or SQL Server 2005
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395
How To: Create a Service Account for an ASP.NET 2.0 Application
http://msdn2.microsoft.com/en-us/library/ms998297.aspx
How To: Connect to SQL Server Using Windows Authentication in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/ms998300.aspx
Allow iis to connect to a sql express database
Folks,
I have an asp.net web app developed in visual studio 2005. The app works fine with the development server from visual studio and sql express. When I try to test the app under IIS before deploying to my host I get a permission not allowed message.
"[SqlException (0x80131904): User does not have permission to perform this action.]".
How do I give my web app access to my sql server database?
Thanks
Doug
These references should help:
Web Applications -Connect to SQL Server
Configuring an ASP.NET 2.0 Application to Work with Microsoft SQL Server 2000 or SQL Server 2005
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395
How To: Create a Service Account for an ASP.NET 2.0 Application
http://msdn2.microsoft.com/en-us/library/ms998297.aspx
How To: Connect to SQL Server Using Windows Authentication in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/ms998300.aspx
Sunday, February 12, 2012
all of sudden cant connect with SQL server authentication
all my
code has stopped working ...
When I try to make a new SQL Server registration
I get server does not exist or access denied...Barrett Bonden wrote:
> Can connect with Windows NT authentication, but not with SQL server auth.
So
> all my
> code has stopped working ...
> When I try to make a new SQL Server registration
> I get server does not exist or access denied...
>
Make sure your SQL Server is configured for mixed mode Authentication.
It sounds like it is only configured for Windows Authentication. If you
have sysadmin authority just fire up Enterprise Manager, right-click
your server, and then click Properties. On the Security tab, under
Authentication, click Mixed Mode.
If you are not a sysadmin, you have to update the Registry directly. I
believe the correct key will be called:
HKLM\Software\Microsoft\MSSqlserver\MSSq
lServer\LoginMode
change the DWORD value to 2
If you have a named instance installed the Registry path will be
something like:
HKEY_LOCAL_MACHINE\Software\Microsoft\Mi
crosoft SQL Server\Instance
Name\MSSQLServer\LoginMode
Good luck ...|||Did somebody switched the authentication mode to "Windows Auth" only ?
The mixed Authentication allows Windows Auth. as well as SQL Server
Authentication. try to log on with an adminstrative account on the SQL
Server and set the Authentication mode back to mixed authentication
then.
HTH, Jens Suessmeyer.
all of sudden cant connect with SQL server authentication
all my
code has stopped working ...
When I try to make a new SQL Server registration
I get server does not exist or access denied...
Barrett Bonden wrote:
> Can connect with Windows NT authentication, but not with SQL server auth. So
> all my
> code has stopped working ...
> When I try to make a new SQL Server registration
> I get server does not exist or access denied...
>
Make sure your SQL Server is configured for mixed mode Authentication.
It sounds like it is only configured for Windows Authentication. If you
have sysadmin authority just fire up Enterprise Manager, right-click
your server, and then click Properties. On the Security tab, under
Authentication, click Mixed Mode.
If you are not a sysadmin, you have to update the Registry directly. I
believe the correct key will be called:
HKLM\Software\Microsoft\MSSqlserver\MSSqlServer\Lo ginMode
change the DWORD value to 2
If you have a named instance installed the Registry path will be
something like:
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\Instance
Name\MSSQLServer\LoginMode
Good luck ...
|||Did somebody switched the authentication mode to "Windows Auth" only ?
The mixed Authentication allows Windows Auth. as well as SQL Server
Authentication. try to log on with an adminstrative account on the SQL
Server and set the Authentication mode back to mixed authentication
then.
HTH, Jens Suessmeyer.
all of a sudden, can't connect
has been running smoothly, but today, I cannot connect. Specifically, in
Enterprise mgr, when I click on the name in the tree on the left, or if I
right-click and select Connect, I get a message box which says:
"A connection could not be established to (nodename). Reason: cannot open
user default database. Login failed. Please verify SQL Server is running and
check your SQL Server registration properties by right-clicking the node and
try again."
So I verified that the SQL Server services were running in the Servies
dialog. I even restarted them. I right-clicked the node in Enterprise mgr,
and it won't show my anything in Properties. But when I selected "Edit
Registration Properties", it was a simple dialog with not much on it. I use
Windows authentication (this is a development server, and only I have access
to it), and the only other option is to change the server group, of which
there is only one.
I tried deleting the registration for this server, then re-adding, it, but
it wouldn't let me re-add. I should note that this was done from another
machine, as I didn't want to try deleting the node from the console on the
actual machine where this DB resides. It should be noted that I was getting
this error on both machines.
One more note: In order to copy this database over to another machine which
is running SQL Server 2005 Express, I detached the database a few days ago,
copied it over, and attached it. I thought I had re-attached it in this 2000
machine, but whether I did or didn't, I don't see a way to do it now.
I am at a loss. Any advice?
I should add one more thing. My ASP app which points to that database works
fine, and I have verified that it is pulling data from it. So my problem is
not rooted in failing to re-attach the database. I just cannot connect via
Enterprise manager.
|||> "A connection could not be established to (nodename). Reason: cannot open
> user default database. Login failed. Please verify SQL Server is running
> and check your SQL Server registration properties by right-clicking the
> node and try again."
Read the error message VERY carefully. Note the information about the
default database. It apparently no longer exists. Note that this really
isn't an error - only EM treats it as one. You can still access the server
using QA using the same credentials, where you can change the default
database (sp_defaultdb) to something that is valid. Alternatively, you can
change the EM registration to a login that works (or login as an
administrator with access to the server - if using integrated security) and
change the default database.
|||I can't make it work. Your post says that I can still get in via EM, but I
cannot. It gives me the same error. So I logged in using not my network ID
(because I'm using Windows authentication), but the web user's ID that I use
in my ASP connection string. And it let me in, but it wouldn't let me run
this query:
I tried running EXEC sp_defaultdb '*username*', '*dbname*'
because for username, I put in my Windows network login, and it says you
cannot change someone else's default database.
I have no idea what administrator name I have for this thing. It's been so
long, and I don't recall it asking me that question when I first created
this thing on this server.
|||>I can't make it work. Your post says that I can still get in via EM, but I
>cannot. It gives me the same error. So I logged in using not my network ID
Read the information I posted again. You will need to change the
registration in EM to use a different identity if you want to use EM to
change the default database. Otherwise, use isql (note - QA has the same
problem; I was wrong about that).
> (because I'm using Windows authentication), but the web user's ID that I
> use in my ASP connection string. And it let me in, but it wouldn't let me
> run this query:
> I tried running EXEC sp_defaultdb '*username*', '*dbname*'
> because for username, I put in my Windows network login, and it says you
> cannot change someone else's default database.
Yes - just what I would expect. Users shouldn't be able to change security
information, especially about other users.
> I have no idea what administrator name I have for this thing. It's been so
> long, and I don't recall it asking me that question when I first created
> this thing on this server.
Not much I can do about that. When you set up a server (or a database), you
should be documenting what options you choose just in case something "bad"
happens. If you are using mixed-mode security, you should be able to access
the server using the sa (or any other administrator-level) login (assuming
you still remember the password). Otherwise, you need to login to the
client with an administrator-level login to make these changes.
|||I was able to get in and make the change using sa. Thanks
all of a sudden, can't connect
has been running smoothly, but today, I cannot connect. Specifically, in
Enterprise mgr, when I click on the name in the tree on the left, or if I
right-click and select Connect, I get a message box which says:
"A connection could not be established to (nodename). Reason: cannot open
user default database. Login failed. Please verify SQL Server is running and
check your SQL Server registration properties by right-clicking the node and
try again."
So I verified that the SQL Server services were running in the Servies
dialog. I even restarted them. I right-clicked the node in Enterprise mgr,
and it won't show my anything in Properties. But when I selected "Edit
Registration Properties", it was a simple dialog with not much on it. I use
Windows authentication (this is a development server, and only I have access
to it), and the only other option is to change the server group, of which
there is only one.
I tried deleting the registration for this server, then re-adding, it, but
it wouldn't let me re-add. I should note that this was done from another
machine, as I didn't want to try deleting the node from the console on the
actual machine where this DB resides. It should be noted that I was getting
this error on both machines.
One more note: In order to copy this database over to another machine which
is running SQL Server 2005 Express, I detached the database a few days ago,
copied it over, and attached it. I thought I had re-attached it in this 2000
machine, but whether I did or didn't, I don't see a way to do it now.
I am at a loss. Any advice?I should add one more thing. My ASP app which points to that database works
fine, and I have verified that it is pulling data from it. So my problem is
not rooted in failing to re-attach the database. I just cannot connect via
Enterprise manager.|||> "A connection could not be established to (nodename). Reason: cannot open
> user default database. Login failed. Please verify SQL Server is running
> and check your SQL Server registration properties by right-clicking the
> node and try again."
Read the error message VERY carefully. Note the information about the
default database. It apparently no longer exists. Note that this really
isn't an error - only EM treats it as one. You can still access the server
using QA using the same credentials, where you can change the default
database (sp_defaultdb) to something that is valid. Alternatively, you can
change the EM registration to a login that works (or login as an
administrator with access to the server - if using integrated security) and
change the default database.|||I can't make it work. Your post says that I can still get in via EM, but I
cannot. It gives me the same error. So I logged in using not my network ID
(because I'm using Windows authentication), but the web user's ID that I use
in my ASP connection string. And it let me in, but it wouldn't let me run
this query:
I tried running EXEC sp_defaultdb '*username*', '*dbname*'
because for username, I put in my Windows network login, and it says you
cannot change someone else's default database.
I have no idea what administrator name I have for this thing. It's been so
long, and I don't recall it asking me that question when I first created
this thing on this server.|||>I can't make it work. Your post says that I can still get in via EM, but I
>cannot. It gives me the same error. So I logged in using not my network ID
Read the information I posted again. You will need to change the
registration in EM to use a different identity if you want to use EM to
change the default database. Otherwise, use isql (note - QA has the same
problem; I was wrong about that).
> (because I'm using Windows authentication), but the web user's ID that I
> use in my ASP connection string. And it let me in, but it wouldn't let me
> run this query:
> I tried running EXEC sp_defaultdb '*username*', '*dbname*'
> because for username, I put in my Windows network login, and it says you
> cannot change someone else's default database.
Yes - just what I would expect. Users shouldn't be able to change security
information, especially about other users.
> I have no idea what administrator name I have for this thing. It's been so
> long, and I don't recall it asking me that question when I first created
> this thing on this server.
Not much I can do about that. When you set up a server (or a database), you
should be documenting what options you choose just in case something "bad"
happens. If you are using mixed-mode security, you should be able to access
the server using the sa (or any other administrator-level) login (assuming
you still remember the password). Otherwise, you need to login to the
client with an administrator-level login to make these changes.|||I was able to get in and make the change using sa. Thanks