Re: jeff

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

From: Hari (hari_prasad_k_at_hotmail.com)
Date: 04/29/04


Date: Thu, 29 Apr 2004 08:43:46 +0530

Hi Jeff,

Login to SQl server using the Query analyzer and try attaching the MDF file
as a database.

sp_attach_single_file_db
'dbname','physical_file_name_of_mdf_file_with_exact_path'

Note:

Normally each database consists of 1 MDF and 1 LDF (Transactionlog) file. In
your case it seems you do not have the LDF file. So the above command may
file due to below reasons:-

1. If the database is not detached earlier
2. If the original database had more than 1 LDF files.

If your case does not fall in above categories then you will be able to
attach and then you can export contents to a text file using DTS or BCP.

Thanks
Hari
MCDBA

<anonymous@discussions.microsoft.com> wrote in message
news:5a4a01c42d48$588653b0$a101280a@phx.gbl...
> thanks -
> how do i go about attaching the mdf file?
> to export it?
> thanks
>
> Jeff
> >-----Original Message-----
> >Hi,
> >
> >You can't import/export from a physical SQL server data
> file to a text file
> >or viceversa.
> >To do this first attach the MDF file as a database
> inside SQL server. After
> >that use the SQL server utilities BCP OUT or DTS to
> export the data from
> >tables to a Text file.
> >
> >Thanks
> >Hari
> >MCDBA
> >
> >
> >
> >"antz" <anonymous@discussions.microsoft.com> wrote in
> message
> >news:58b501c42d31$6064e950$a001280a@phx.gbl...
> >>
> >> SQL .mdf file import.
> >> How can i import a .mdf file(291MB in size) into a txt
> >> file?
> >> a step by step guide - as i know nothign about SQL 2000
> >> thanks / Regards,
> >>
> >> Jeff
> >
> >
> >.
> >



Relevant Pages

  • Re: "Hidden" Replication Stored Procedures?
    ... Since the engine has hooks that hide the mssqlsystemresource database from ... 4.)Start the SQL Server service; ... Chris Jones ... aforementioned MDF file in Notepad and doing a quick search, ...
    (microsoft.public.sqlserver.replication)
  • Re: Problem with updating MDF Data file as opposed to updating a running SQL Server DB
    ... In Visual C# Express, I created a windows application, then "Added" a ... Doing this created an MDF file in my project folder, ... database into my database explorer window in the IDE. ... It would seem with this option, then one could use a SQL Server MDF ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: A question about understanding the mdf database file
    ... Service-based Database which will create a mdf file. ... I must have the SQL server express service running otherwise I get ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ASPNETDB.MDF when no SQLExpress, only SQL Server 2005?
    ... You will need to upload the mdf file and have your webhost attach it to the sql server. ... In which case you will need to recreate the database into the database which is available to the hosted domain if you have signed up ... The connection will be closed. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Error 823
    ... Regards. ... Microsoft SQL Server Storage Engine ... > I cannot extract much data out of the database and I can't view the most ... The problem is in the .MDF file, ...
    (microsoft.public.sqlserver.tools)