Showing posts with label mdf. Show all posts
Showing posts with label mdf. Show all posts

Thursday, 22 March 2012

connect to MDF file without having SQL Server 2005 Express installed

All --

Please help.

Is it possible to connect to MDF file without having SQL Server 2005 Express installed on the machine?

That is-- can one connect directly to an MDF in the same way and Access MDB file can be used?

If no, then is there any way around this?

If yes, then are there any limitations?

Please advise.

Thank you.

-- Mark Kamoski

No, it's not possible. However, you can try Sql Compact

http://www.microsoft.com/sql/editions/compact/default.mspx

Thursday, 8 March 2012

Connect .mdf file to MSDE 2000

I'm using a product (SAP Business one) using MSDE 2000A. Another product I
receintly bought also uses SQL. According to this products manual I need to
connect the *.mdf database to my SQL server using SQL Enterprise Manager. How
does it work?
hi,
GV wrote:
> I'm using a product (SAP Business one) using MSDE 2000A. Another
> product I receintly bought also uses SQL. According to this products
> manual I need to connect the *.mdf database to my SQL server using
> SQL Enterprise Manager. How does it work?
you are required to "attach" the provided database to an existing SQL
Server/MSDE instance...
as MSDE does not provide Entrprise Manager, you have to resort on the
command line tool, oSql.exe, to execute the corresponding Transact-SQL
statement to attach the database using the system stored procedure
sp_attach_db...
you can find the full synopsis of the introduced stored procedure at
http://msdn.microsoft.com/library/de...ae-az_52oy.asp
at http://support.microsoft.com/default...;EN-US;q325003 you will
find some information on how to use oSql.exe to perform this task as long as
other related management tasks..
for your convenience, you can have a look at a free prj of mine, available
at the link following my sign., which provides a graphical user interface
similar to Enterprise Manager in order to accomplish management tasks,
including the one here discussed..
futher tools for MSDE, both commercial and free, are listed
http://www.microsoft.com/sql/msde/partners/default.asp and/or
http://www.aspfaq.com/show.asp?id=2442
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Saturday, 25 February 2012

Confliction between SQL Server 2005 and SQL Server 2005 Express Edition

Hi,

My objective is using a single DB file (mdf file) + SQL Server Express 2005 to run my program

I got two softwares here, Visual Studio 2005 and SQL Server 2005. Firstly, I installed Visual Studio 2005, normally the SQL Server 2005 Express Edition will be installed with this software. After finishing the installation. I opened a new project and try to open a DB file (.mdf) from Visual Studio 2005, it works. The problem is that I can't restore the mdf file from an old database file since it lose a lot of functions that appear in SQL Server 2000 / SQL Server 2005. And it is too troublesome and inconvenient to edit a DB file in Visual Stuio 2005.

Therefore, I have to install SQL Server 2005 for me to edit the mdf file, so that I can modify, backup, or even restore the mdf file with another DB file. After the installation of SQL Server 2005, I got a tool, SQL Server Managment Studio, to edit the mdf file. I can open the mdf file but when I double-clicked on the mdf file in Visual Studio 2005, it gives me the following error message:

Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL:http://go.microsoft.com/fwlink/?LinkId=49251

It seems the SQL Server 2005 modify some of the files in SQL Server 2005 Express Edition. Is that SQL Server 2005 and SQL Server 2005 Express Edition cannot be exist at the same time?

The issue is I'm working on my computer, but I dun want to install SQL Server 2005 in the server that I will transfer to. It will be much like using Access DB file, without the Microsoft Access software, the program can still work well. However, when I'm still in programming stage, I do hope to have a DB file as the source file for my program, but I can do some editing works with SQL Server 2005.

Does anyone can give me a suggestion? Thanks for your kindly reply.

Calvin

On my machine I have SQL2005 and SQL Express installed at the same time, and both of them work fine. I guess the problem lays in connection string of the database. You can check as following:

Go to database explorer-data connections.
Right click your mdf database and click "modify connection"...
Click the advanced button
Search for the "data source" string
Set the string to refer to your SQL Server2005 instance.

You can take a look at this link:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124596&SiteId=1.

BTW, if you just want to operate on the database file more directly, you do not need to install SQL Server2005. You can intall "SQL Server Management Studio Express " from here:

http://msdn.microsoft.com/vstudio/express/sql/download/

.

Friday, 17 February 2012

Configuring SQL server express for VWD

For some reason I can't seem to be able to add SQL databases to VWD

I receive the following error message:

Connections to SQL Server Files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251

I have reinstalled SQL server but I still have the same problem, I tried tweaking some of the Server configurations without success.

I searched for hours on the web for answers but couldn't find any.

If anyone has any idea what could be the problem please help me.

My OS is Windows XP Professional SP2
IIS is installed.

Do you have SQL Server Remote connections enabled on your machine ? Can you in addition post your connection string you are using.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||Yes remote connections are allowed, configured in the Surface Area Configuration.

I'm able to connect to a database I've created with Management Studio. But i can't create databases in VWD.

Code Snippet

connectionString="Data Source=DENNIS;Initial Catalog=Inventaris;Integrated Security=True"


This is the one I use for an existing database.

I forgot to mention that both SQL Server express and VWD run on the same computer.

|||

That wonders me a bit, you error is stating that you are trying to connect to a userinstance, your connection string uses a server instance. Could it be that you are using a different connection string than you think ;-) ? This error message comes if you are either using a SQL Server Express instance which is not enabled for user instances or you use a "bigger" instance than SQL Server Express.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||When I use add connection in the database explorer I can chose the "Microsoft SQL Server" option and it works so long as the database exists.
But if I use the "Microsoft SQL Server Database File (SQLClient)" option and browse to an existing database or try to create a new one, it doesn't work and produces an error saying that the SQL server probably doesn't allow remote connections. Although I'm pretty sure it does.

I also allowed userinstances with the use of a query in Management Studio.

|||

Having a SQLServer Express instance you will have to name it in the connection using the following syntax:

connectionString=@."Data Source=DENNIS\SqlExpress;Initial Catalog=Inventaris;Integrated Security=True"

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||After changing DENNIS (the server name) to 127.0.0.1 it works.

I guess when running the server local this is required.

Thanks for your help and quick responses.