Re: HELP!!! restore database - left in loading state?? PLEASE H

From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 06/28/04


Date: Mon, 28 Jun 2004 18:11:40 -0400

Any object names that contain special characters, such as a hyphen, need to
be delimited by brackets:

RESTORE DATABASE [DMA-SCRATCH] WITH RECOVERY

-- 
   Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON   Canada
www.pinnaclepublishing.com/sql
.
"KMZ_state" <KMZstate@discussions.microsoft.com> wrote in message
news:64C0DDC9-E033-4394-96D1-D097572C7C3E@microsoft.com...
Hi-
I just tried it:
RESTORE DATABASE DMA-SCRATCH WITH RECOVERY
and I get an error message:  Incorrect syntax near '-'.  The name of the
database is DMA-scratch.  Is the hyphen an illegal character?  This could be
the problem if it is.  Thanks.
"Tom Moreau" wrote:
> Yep.
>
> -- 
> Tom
>
> ---------------------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
>
>
> "KMZ_state" <KMZstate@discussions.microsoft.com> wrote in message
> news:3198ACB9-7762-4640-8A07-B9E5D87BE63E@microsoft.com...
> OK, so bear with me.  I don't normally do this.  So, in the Query Analyzer
I
> can just say RESTORE DATABASE TESTDB WITH RECOVERY, where TESTDB is the
name
> of the database that I have supposedly restored, but is still in this
> loading state???
>
> "Tom Moreau" wrote:
>
> > You have to restore the database somewhere.  I'm assuming that by virtue
> of
> > the fact that it is in a loading state, you have attempted to restore
it.
> > However, it appears to have been restored without recovery.  Therefore,
> you
> > need to recover the database, which is what my code does for you.
> >
> > -- 
> > Tom
> >
> > ---------------------------------------------------------------
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > SQL Server MVP
> > Columnist, SQL Server Professional
> > Toronto, ON Canada
> > www.pinnaclepublishing.com/sql
> >
> >
> > "KMZ_state" <KMZstate@discussions.microsoft.com> wrote in message
> > news:294EC3AF-340F-4C13-8689-BF61DA9D2DC9@microsoft.com...
> > But what if I want to restore to a separate location, and not just blast
> > away the database?
> >
> > "Tom Moreau" wrote:
> >
> > > Try:
> > >
> > > restore database MyDB with recovery
> > >
> > > -- 
> > > Tom
> > >
> > > ---------------------------------------------------------------
> > > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > > SQL Server MVP
> > > Columnist, SQL Server Professional
> > > Toronto, ON Canada
> > > www.pinnaclepublishing.com/sql
> > >
> > >
> > > "KMZ_state" <KMZ_state@discussions.microsoft.com> wrote in message
> > > news:A9DCF94E-276C-4D74-BB22-D55FCD672461@microsoft.com...
> > > Hi all-
> > > I actually don't work in SQL Server administration but I am trying to
> > > restore a database.  I am a developer.  I deleted all the rows from
one
> of
> > > the tables in a database and I need to get that particular table back.
> > The
> > > people that actually do the restore for me tell me that the RESTORE
part
> > has
> > > completed, but now the database says "(loading)" and stays this way
> > > indefinitely!  They are trying to restore the database to a temporary
> > > location on another server, so that we can then just take the ONE
table
> > that
> > > I need back and import it back over.  No one seems to have any idea
how
> to
> > > move beyond this "loading" state and access the tables.  Does this
sound
> > > familiar to anyone???  Please help - this is production data!!!!!!
> Thanks
> > > so much!!!
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: SQL 2000 SP4 on 2003 Server - Single User Mode
    ... I found the section where you list the filename to restore to. ... rename the SQL Server the same as what is listed below Courthouse? ... Once you've created your database (simply right click on the Database ...
    (microsoft.public.sqlserver.setup)
  • Re: Moving databases from SQL 7 to SQL 2000 - More Questions!
    ... want to run sp_updatestats after the restore or attach as well. ... >>There is a lot more that can go wrong with the wizard ... > SQL Server Databases ... >>Issues When a Database Is Moved Between SQL Servers ...
    (microsoft.public.sqlserver.setup)
  • Re: Restore Master DB to New Server
    ... the user database will be suspect. ... Just drop them and then do the restore. ... Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.tools)
  • Re: Migration ?
    ... I've tried every way I can think of trying to restore the master database. ... Will a restore on the SQL ... Install a SQL Server failover cluster instance ...
    (microsoft.public.sqlserver.clustering)
  • Re: Two Disaster Recovery Questions
    ... I support the Professional Association for SQL Server ... > recovery site ... > second restore at the recovery site. ...
    (microsoft.public.sqlserver.server)