HomeForum
Welcome, Guest

How to connect a SQL File with .mdf extension
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: How to connect a SQL File with .mdf extension

How to connect a SQL File with .mdf extension 1 year, 7 months ago #1138

  • wbidin
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
I have a database file with the extension "mdf" , I can connect, but, the software do not give any information about tables, procedures or views that exist in this file,

How I do to connect and retrieve these information? Somebody has a idea? Any suggestion is very important for me!

Thanks a lot,
wbidin

Re: How to connect a SQL File with .mdf extension 1 year, 7 months ago #1141

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2183
  • Karma: 12
Which kind of database are you talking about?

Oracle, SQL Server, Interbase ETC?

Peter

Re: How to connect a SQL File with .mdf extension 1 year, 7 months ago #1142

  • wbidin
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hi Peter,

I'm using the SQLExpress, and I didn't write it, because I thought that this extension was exclusive for this database.

Sorry for this error.

Re: How to connect a SQL File with .mdf extension 1 year, 7 months ago #1143

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2183
  • Karma: 12
It is not possible to connect to mdf file directly.
You have to connect to SQLExpress

Peter

Re: How to connect a SQL File with .mdf extension 1 year, 7 months ago #1144

  • wbidin
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Peter,

in my job, we do not have permission to create a db's in SQL Express, and I do not know attach this mdf in SQL Express (well, I do not know if it is possible too).

You have any suggestion, or know if, the tool has support a connection with Firebird embedded, this would be a other option.

Thanks a lot,

Re: How to connect a SQL File with .mdf extension 1 year, 7 months ago #1145

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2183
  • Karma: 12
This will attach the database

USE [master]
GO
CREATE DATABASE [database_name] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\<database name>.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\<database name>.ldf' )
FOR ATTACH ;
GO

Peter
  • Page:
  • 1
  • 2
Time to create page: 0.18 seconds

Testimonials

Our prior imports were done using VB. Our VB expert retired. No one in my group knows VB. So Visual Importer was the answer to the lack of VB skills problem my group experienced.
Ron Bradshaw,
IT Reporting Manager,
ConAgra Foods / Lamb Weston

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top