tell me how to reset it? Thanks.
If the account you login with is an administrator on the local machine, you
can use the osql command line tool to execute the sp_password stored
procedure:
osql -E -Q "EXEC sp_password @.new='newpassword', @.loginame = 'sa'"
That's not a spelling mistake in loginame. Apperently long, long ago when
the sp_password procedure was created bytes were really expensive and
someone decided to save some on that extra n. <g>
Jacco Schalkwijk
SQL Server MVP
"Marcus" <Marcus@.discussions.microsoft.com> wrote in message
news:47F057B4-2D41-450F-BCB0-026ADD4B2123@.microsoft.com...
>I have forgotten the SA password for my MSDE install. Can some one please
> tell me how to reset it? Thanks.
|||When I run that command, I get the following error: "Cannot open user default
database. Login failed." Thanks for the help.
"Jacco Schalkwijk" wrote:
> If the account you login with is an administrator on the local machine, you
> can use the osql command line tool to execute the sp_password stored
> procedure:
> osql -E -Q "EXEC sp_password @.new='newpassword', @.loginame = 'sa'"
> That's not a spelling mistake in loginame. Apperently long, long ago when
> the sp_password procedure was created bytes were really expensive and
> someone decided to save some on that extra n. <g>
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Marcus" <Marcus@.discussions.microsoft.com> wrote in message
> news:47F057B4-2D41-450F-BCB0-026ADD4B2123@.microsoft.com...
>
>
|||Hi,
Login into MSDE using trunsted connection and change the default db for the
user
OSQL -E -S Servername (enter)
Now change the default db for the use
sp_defaultdb (see books online for details)
Now change the password for user using SP_password command
Thanks
Hari
SQL Server MVP
"Marcus" <Marcus@.discussions.microsoft.com> wrote in message
news:FE6B61E1-0C69-4F72-B2CA-2C3DF21DD2D7@.microsoft.com...
> When I run that command, I get the following error: "Cannot open user
default[vbcol=seagreen]
> database. Login failed." Thanks for the help.
> "Jacco Schalkwijk" wrote:
you[vbcol=seagreen]
when[vbcol=seagreen]
please[vbcol=seagreen]
|||I am logged into the server using an administrator account, however, when I
try to run the initial OSQL command you suggest, I get the same: "Cannot open
user default database. Login failed." Thanks for your help.
"Hari Prasad" wrote:
> Hi,
> Login into MSDE using trunsted connection and change the default db for the
> user
> OSQL -E -S Servername (enter)
> Now change the default db for the use
> sp_defaultdb (see books online for details)
> Now change the password for user using SP_password command
> Thanks
> Hari
> SQL Server MVP
> "Marcus" <Marcus@.discussions.microsoft.com> wrote in message
> news:FE6B61E1-0C69-4F72-B2CA-2C3DF21DD2D7@.microsoft.com...
> default
> you
> when
> please
>
>
|||Specify the database explicitly:
osql -E -d master -Q "EXEC sp_password @.new='newpassword', @.loginame = 'sa'"
Jacco Schalkwijk
SQL Server MVP
"Marcus" <Marcus@.discussions.microsoft.com> wrote in message
news:FE9E1610-F55A-4C60-B4E4-455A562850FF@.microsoft.com...[vbcol=seagreen]
>I am logged into the server using an administrator account, however, when I
> try to run the initial OSQL command you suggest, I get the same: "Cannot
> open
> user default database. Login failed." Thanks for your help.
> "Hari Prasad" wrote:
|||That did the trick! Thanks for everyone's help
"Jacco Schalkwijk" wrote:
> Specify the database explicitly:
> osql -E -d master -Q "EXEC sp_password @.new='newpassword', @.loginame = 'sa'"
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Marcus" <Marcus@.discussions.microsoft.com> wrote in message
> news:FE9E1610-F55A-4C60-B4E4-455A562850FF@.microsoft.com...
>
>
No comments:
Post a Comment