Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 alter login shows error

Author  Topic 

sql2020
Yak Posting Veteran

54 Posts

Posted - 2010-07-20 : 07:00:46
I use this command for Unlock and EXPIRATION=off
ALTER LOGIN fred WITH PASSWORD = 'hy!at54Cq' UNLOCK
go


ALTER LOGIN fred WITH CHECK_EXPIRATION = OFF
go

But it shows this error

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.

pls tell me URgent

sql2020

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-07-20 : 23:43:11
Which version of sql you are using ?

This alter statements works with 2005.

In case you are using Sql 2000, try the below statement for password changing. ( I assume that you have neccassary permission for doing it)

EXEC master.dbo.sp_password @old='hi', @new=N'newhi', @loginame=[fred]
GO
Go to Top of Page

sql2020
Yak Posting Veteran

54 Posts

Posted - 2010-07-21 : 09:13:25
Ok

but wat is statement for unlock login and set to not expire wat is the statement for these

sql2020
Go to Top of Page
   

- Advertisement -