Restore database without providing a name??/

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ray Lavelle (bostonpartykid_at_yahoo.com)
Date: 05/20/04


Date: 20 May 2004 12:36:40 -0700

Is there anyway I can restore a database without having to provide a
database name in the restore command? I have a utility that I wrote
to restore my database, but right now I hardcode the database name
into the restore command. Is it possible for the restore command to
just figure out the name of the database on its own so I don't have to
provide it? I'd like my utility to be able to restore databases with
different names and I don't want to have to prompt the user to enter
one.
Any suggestions?



Relevant Pages

  • Re: Save as in SQL Server(Backup - Restore)
    ... I take it you already know about the RESTORE command ... > "Lars Grøtteland" wrote in message ... >> Create a new database and restore one database into the created one, ... >>> Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Save as in SQL Server(Backup - Restore)
    ... I take it you already know about the RESTORE command and the MOVE option to the ... > Create a new database and restore one database into the created one, ... >> Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: restoring the database has failed
    ... "Mark Allison" a écrit dans le message de ... the RESTORE command requires that no-one is connected to ... You can set the database to single ...
    (microsoft.public.sqlserver.server)
  • Re: Restore SQL database (MSDE)
    ... Read about the RESTORE command in Books Online, and especially the MOVE and REPLACE parameters. ... Tibor Karaszi, SQL Server MVP ... > get the error message "The backup set holds a database other than the ... > existing 'our dbname' database". ...
    (microsoft.public.sqlserver.server)
  • Re: Active directory corruption
    ... default web site and copied the permissions to all the child ... as it may not be the database that is the problem. ... prompt, use the ESENTUTL to check the integrity of the database. ... To recover the database type the following at the command prompt: ...
    (microsoft.public.windows.server.sbs)