Article View: bit.listserv.sqlinfo
Article #327Re: Newbie SQL question
From: matthias.please reply to newsgro...
Date: Fri, 17 May 2002 10:19
Date: Fri, 17 May 2002 10:19
30 lines
2432 bytes
2432 bytes
barto wrote: > I had to restore a database from tape (.MDF and .LDF) files. I > created a new SQL database and pointed the datasource to the .MDF > file, and duplicated the original settings on the live database. > I need to be able to access this backup db to check for data > integrity. I cannot see the tables in this restored db. Is there > some import function I need to complete? I have tried going through > the import data wizard, but can't get it to pull the data up. > > Is there a decent web guide that I could use for reference? > > Thanks, I'm very unfamiliar with SQL and have had this dumped on me, > with no support!!! help! > -b In "pointing to the .MDF & .LDF"-files when creating your database you've ruined those files, I'm afraid. Do you have the originals? Then do the following steps: * drop the empty database * Copy the files into your filesystem, where you want the database (e.g. c:\Program files\Microsoft SQL Server\MSSQL\data for SQLS2k) * Start a Query Analyzer * Fire the stored procedure: sp_attach_db 'Name-of-Database', 'Path-to-the-MDF-file' This should do the job. Bests Mat
Technical Details
Message-ID:
<3CE4D902.3020001@wot.at>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed.wxs.nl!amsnews01.chello.com!newsrouter.chello.at!news.chello.at.POSTED!53ab2750!not-for-mailReferences:
<3cd9499c.16443013@mi.news.verio.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11355a,550635dd78a9d049 X-Google-Attributes: gid11355a,public X-Google-ArrivalTime: 2002-05-17 03:19:08 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed.wxs.nl!amsnews01.chello.com!newsrouter.chello.at!news.chello.at.POSTED!53ab2750!not-for-mail Message-ID: <3CE4D902.3020001@wot.at> Disposition-Notification-To: "matthias.please reply to newsgroup.wolf" <"matthias.please reply to newsgroup.wolf"@wot.at> From: "matthias.please reply to newsgroup.wolf" <"matthias.please reply to newsgroup.wolf"@wot.at> Organization: Wolf Office Team User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020510 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: bit.listserv.sqlinfo Subject: Re: Newbie SQL question References: <3cd9499c.16443013@mi.news.verio.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Lines: 31 Date: Fri, 17 May 2002 10:19:00 GMT NNTP-Posting-Host: 213.47.2.236 X-Complaints-To: abuse@news.chello.at X-Trace: news.chello.at 1021630740 213.47.2.236 (Fri, 17 May 2002 12:19:00 CEST) NNTP-Posting-Date: Fri, 17 May 2002 12:19:00 CEST