Re: Correct Deleted Default Database??

From: jimmers (jimmers@yandex.ru)
Date: 06/13/02


From: "jimmers" <jimmers@yandex.ru>
Date: Thu, 13 Jun 2002 16:26:07 +0400


Your are completely right.

Cheers
jimmers

"Pete F" <phf175SPAMBLOCK@hotmail.com> wrote in message
news:e6d201c212d4$67e62d20$3bef2ecf@TKMSFTNGXA10...
> I think you'll find the -d switch to I/OSQL.EXE is a
> little less drastic - connect to master then change the
> default database for your sysadmin group with
> sp_defaultdb. No need to restart the server, mess around
> with the registry or anything else.
>
> Pete
>
> >-----Original Message-----
> >It is not possible to restore dropped database because
> SQL Server deleted
> >files physically when DROP DATABASE statement is issued
> (but one may try
> >recover files at OS filesystem level).
> >
> >As far as I see Your problem is in fact simple: dropped
> default database for
> >connected over trusted connection users and SQL
> Authentication is disabled
> >(so 'sa' cannot login). To correct this use scheme
> described below.
> >
> >1. Stop mssqlserver service by typing in command prompt:
> >
> > net stop mssqlserver
> >
> >2. Backup Registry using any suitable tool.
> >
> >3. Open regedit.exe or regedt32.exe and go to key
> >
> >
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServ
> er
> >
> >There are DWORD value named LoginMode. Set it to 2.
> >
> >4. Start mssqlserver service by typing in command prompt:
> >
> > net start mssqlserver
> >
> >5. Using Query Analyzer or any other tool try to login
> as 'sa'.
> >
> >Cheers
> >jimmers
> >
> >
> >
> >"Tri M. Nguyen" <tmnguyen2@raytheon.com> wrote in message
> >news:cad701c212b9$0e3ec680$36ef2ecf@tkmsftngxa12...
> >> Is there a way to correct a deleted database?
> >>
> >> The default database for the Administrators
> >> group is SMC_DB. I deleted the SMC_DB in order to
> >> re-create the SMC_DB with bigger maximum data file
> sizes.
> >> When I launched Query Analyzer, it tries to open a
> >> connection into SMC_DB, but SMC_DB no longer exists. I
> >> tried
> >> logging in as sa, but SQL Server complains that sa is
> not a
> >> trusted connection. Help!
> >>
> >> Do you know of a backdoor access into MS SQL Server?
> >>
> >>
> >
> >
> >
> >
> >.
> >



Relevant Pages

  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cluster will not fail over.
    ... > As far as the TCP/IP issue goes, you had to rebuild the cluster and were ... > able to restore the master database. ... > a cluster installation you'll have to revisit. ... >> This worked bringing up the sql server in minimal mode. ...
    (microsoft.public.sqlserver.clustering)
  • Re: SQL2005 sys tables
    ... Maybe you don't have the SQL Editor toolbar open. ... You can also change the database context by using the USE statement in the ... SQL Server Documentation Team ... I mean in sql2000 query analyzer I can do the select statement against ...
    (microsoft.public.sqlserver.security)
  • Re: Word 2003/Access2000/SQLSVR
    ... SQL server being where the data is held and this is accessed through a MS ... entire database and that may be say a record for Berkshire. ... "Peter Jamieson" wrote: ... replaced with the first record on the table in use. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: MS Access DAO -> ADO.NET Migration
    ... full SQL Server and I see the logic you explained in a multi user ... allow two users to access the same database file Read/Write at any given ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.dotnet.framework.adonet)