Solved

How to pass this error?

Posted on 2006-11-17
7
283 Views
Last Modified: 2012-08-13
I am user with dbo,db_securityadmin roles. I am trying to change passwords , i run into following erroe, do i need to be a SA?



Server: Msg 15210, Level 16, State 1, Procedure sp_password, Line 20

Only members of the sysadmin role can use the loginame option. The password was not changed
0
Comment
Question by:crishna1
  • 3
  • 2
  • 2
7 Comments
 
LVL 29

Expert Comment

by:Nightman
ID: 17968460
Yes, you need to be a sysadmin to change the password of another user with this procedure
0
 

Author Comment

by:crishna1
ID: 17968479
does'nt server level role "security administrators" let you do this, let me try.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17968560
If you are using SQL 2005, you can try
ALTER LOGIN LoginName WITH PASSWORD = 'password';
or
ALTER LOGIN LoginName WITH OLD_PASSWORD = 'oldpassword', PASSWORD = 'password';

Not sure if you need to be a sysadmin to do this though. I suspect that if you have the old password, the extra permissions check is ignored (sorry, don't have 2005 with me right now).

sp_password can be run for any user in context of their own account.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:crishna1
ID: 17968647
I am using Sql Serv 2000,

sp_password @new = 'XXXX', @loginame = 'sa'

Server: Msg 15210, Level 16, State 1, Procedure sp_password, Line 20

Only members of the sysadmin role can use the loginame option. The password was not changed
0
 
LVL 29

Assisted Solution

by:Nightman
Nightman earned 100 total points
ID: 17968689
From Books Online:

Execute permissions default to the public role for a user changing the password for his or her own login.
Only members of the sysadmin role can change the password for another user's login.

So no, you cannot change it without being a member of the sysadmin role. And you CERTAINLY cannot change the password for the sysadmin without being a sysadmin yourself!
0
 
LVL 42

Accepted Solution

by:
EugeneZ earned 400 total points
ID: 17973372
try  sql server server role: "Security Administrators" :

Security Administrators (securityadmin) Designed for users who need to manage logins, create database permissions, and read error logs. Members of this role can add members to securityadmin; grant, deny, and revoke CREATE DATABASE; and read the error logs. In addition, they can also perform these tasks: sp_addlinkedsrvlogin, sp_addlogin, sp_defaultdb, sp_defaultlanguage, sp_denylogin, sp_droplinkedsrvlogin, sp_droplogin, sp_grantlogin, sp_helplogins, sp_remoteoption, and sp_revokelogin.

http://www.microsoft.com/technet/prodtechnol/sql/2000/books/c05ppcsq.mspx
0
 
LVL 42

Expert Comment

by:EugeneZ
ID: 17973390
sp_password
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_pa-pz_5x44.asp

Permissions
Execute permissions default to the public role for a user changing the password for his or her own login. Members of the securityadmin and sysadmin fixed server roles can change the password for another user's login.                                                                                                                                  /\
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Replication question 9 44
always on switch back after failover 2 35
Create snapshot on MSSQL 2012 3 23
database level memory cache..? 8 19
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question