Re: Lost SA Password
From: Barry McAuslin (barry_mcauslin_at_yahoo.com.nospam)
Date: 09/17/03
- Next message: Martin c: "Hosting Environment - Advice please"
- Previous message: Cindy Gross: "Re: Linked Server to FoxPro"
- In reply to: Sue Hoegemeier: "Re: Lost SA Password"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 17 Sep 2003 17:25:05 +1200
There is one other way to get reset your sa password to blank and reset the
database. But it is not supported. I have done it myself with no trouble
in the past. You should only do this if you have no other option.
You need to do the following steps. Warning! I am writing the script from
memory and can not test it at this time.
Shut down the SQL Server.
Take file copies of your master data file and log file. (Just in case you
need them back)
Copy the master data file and log file to another SQL Server. (Same version
and build!)
Attach the database as mastersa or some thing like that.
run the following
EXEC sp_configure 'allow updates', 'true'
RECONFIGURE WITH OVERRIDE
update dbo.sysxlogins
set password = NULL, -- Blank sa password
dbid = 1 -- Database id of master
WHERE sid = 0x01
AND serverid = NULL
Detach the database.
Copy back to your original SQL Server
Start SQL Server.
Hope this helps.
----------
Barry McAuslin
Look inside your SQL Server files with SQL File Explorer.
Go to http://www.sqlfe.com for more information.
"Sue Hoegemeier" <Sue_H@nomail.please> wrote in message
news:p5vbmv4kemo3m3blfl3uil8mvv4i8k25b5@4ax.com...
> If the builtin\adminstrators group has been deleted, you
> don't have the sa password, there are no other sysadmin
> logins and no one has Enterprise Manager registered with a
> sysadmin account, you are pretty much stuck. The only
> option I know of at this point would be to just backup
> everything, reinstall and restore.
> Did anyone try logging in on the workstation that previous
> admin used and try connecting?
>
> -Sue
>
> On Mon, 15 Sep 2003 09:58:53 -0700, "Bill Honeyman"
> <bhoneyman@oc-redcross.org> wrote:
>
> >Also don't have sa login, since the password is unknown.
> >The administrator login (not sa) had it's default database
> >removed. have tried using isql and osql but cannot login
> >at all. Any other suggestions?
> >
> >Thanks,
> >
> >Bill
> >
> >>-----Original Message-----
> >>If you mean you can't login and only have the sa login to
> >>use which is kicking you out due to the default database
> >>error, try logging in using isql instead. It typically
> >won't
> >>kick you out due to the default database issue. It will
> >just
> >>report something like: Cannot use default database. Using
> >>master instead.
> >>Once logged in through isql, you can change the default
> >>database for sa using sp_defaultdb.
> >>
> >>-Sue
> >>
> >>On Thu, 11 Sep 2003 16:04:35 -0700, "Bill Honeyman"
> >><bhoneyman@oc-redcross.org> wrote:
> >>
> >>>I reciently took over a site with SQL Server v7 running,
> >>>the previous admin apparently deleted the default
> >database
> >>>for the SA. Does anyone know how to recover this?
> >>
> >>.
> >>
>
- Next message: Martin c: "Hosting Environment - Advice please"
- Previous message: Cindy Gross: "Re: Linked Server to FoxPro"
- In reply to: Sue Hoegemeier: "Re: Lost SA Password"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|