Hi,
After a power outage (and UPS failure), my boss's SQL Server 2000 won't
start (or crashes quickly or something). We don't have any backups, as it's
a test server. Is there a way to import the database files into a new SQL
installation? By "installation," I mean either a re-installed SS, a second
installation on the same PC, or maybe even on another PC. In another words,
given only the files sitting on the harddrive, is there a way to "import"
the DBs in those files into SS?
Sp_attach_db would probably be the answer, except it seems to require
running sp_detach_db...which I cannot do, as SS is not working.
Thanks in advance,
JayYou could try sp_attach_single_file_db, though I believe that may require a
successful detach as well.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jay" <twentycavities@.hotmail.com> wrote in message
news:g2MCb.17882$Vg3.15076@.fe3.columbus.rr.com...
> Hi,
> After a power outage (and UPS failure), my boss's SQL Server 2000 won't
> start (or crashes quickly or something). We don't have any backups, as
it's
> a test server. Is there a way to import the database files into a new SQL
> installation? By "installation," I mean either a re-installed SS, a second
> installation on the same PC, or maybe even on another PC. In another
words,
> given only the files sitting on the harddrive, is there a way to "import"
> the DBs in those files into SS?
> Sp_attach_db would probably be the answer, except it seems to require
> running sp_detach_db...which I cannot do, as SS is not working.
>
> Thanks in advance,
> Jay
>
>|||Jay,
I dont see why you could not simply copy the MDF and LDF
files to another machine (or put in a safe place). Then
fix the issue with SQL2K not starting.
You should then be able to attache the database and log
file again via Enterprise Manager (right-click on
Databases/All tasks/Attach Database...).
Ron
>--Original Message--
>Hi,
>After a power outage (and UPS failure), my boss's SQL
Server 2000 won't
>start (or crashes quickly or something). We don't have
any backups, as it's
>a test server. Is there a way to import the database
files into a new SQL
>installation? By "installation," I mean either a re-
installed SS, a second
>installation on the same PC, or maybe even on another
PC. In another words,
>given only the files sitting on the harddrive, is there
a way to "import"
>the DBs in those files into SS?
>Sp_attach_db would probably be the answer, except it
seems to require
>running sp_detach_db...which I cannot do, as SS is not
working.
>
>Thanks in advance,
>Jay
>
>
>.
>|||I believe all he has to do is attach the databases. Find the old =databases and attach them. I have done this before and in fact will be =doing it again shortly. Attach through the GUI in your other SQL =Manager.
-- George Hester
__________________________________
"Jay" <twentycavities@.hotmail.com> wrote in message =news:g2MCb.17882$Vg3.15076@.fe3.columbus.rr.com...
> Hi,
> After a power outage (and UPS failure), my boss's SQL Server 2000 =won't
> start (or crashes quickly or something). We don't have any backups, as =it's
> a test server. Is there a way to import the database files into a new =SQL
> installation? By "installation," I mean either a re-installed SS, a =second
> installation on the same PC, or maybe even on another PC. In another =words,
> given only the files sitting on the harddrive, is there a way to ="import"
> the DBs in those files into SS?
> > Sp_attach_db would probably be the answer, except it seems to require
> running sp_detach_db...which I cannot do, as SS is not working.
> > > Thanks in advance,
> > Jay
> > > >|||>> I believe all he has to do is attach the databases.
This works fine when the databases have been detached successfully.
However, it's not always so easy when the "detach" wasn't clean (as in Jay's
case).
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||Well I have done it with no detaching. In fact I have to do it again =shortly. The Windows Server crashed and there is no reliable way I know =of to get SQL Server out of there functional and I need the databases. =So as I do it I'll probably remember the corners I had to cut to get it =to work. If he is interested I'll describe the steps here.
-- George Hester
__________________________________
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message =news:uGW9ANwwDHA.3428@.TK2MSFTNGP11.phx.gbl...
> >> I believe all he has to do is attach the databases.
> > This works fine when the databases have been detached successfully.
> However, it's not always so easy when the "detach" wasn't clean (as in =Jay's
> case).
> > -- > Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
> >|||> Well I have done it with no detaching.
I think you have been lucky, and this is certainly not guaranteed to work.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Monday, February 20, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment