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

Wednesday, March 7, 2012

Can't Create and Connect to a new Database (.mdf file)

Unfortunately I was sent to this product by my Hosting Site since all I was trying to do was Create and Manage a User Login with authentication to my subsites in MS Frontpage. (rant: Why doesn't Frontpage support this technology?)

Anyway, I have now spent (wasted?) 8 hours downloading, installing, and tyring to configure SQL Express along with MS Visual Web Developer Express for ASP.NET 2.0 ... For the life of me I can't find detailed configuration informatin and setup information to build a SIMPLE database to connect to the VW product. Folk: this HAS to be simpler to do than what you present in the product! This is way too difficult to deal with compare with frontpage.

Is there a simple "how to" link someplace that is specific enough to preclude me from uninstalling this entire suite ?

Hi Cody,

Sounds like you've already put some effort into this, so I really hate to redirect you again, but I believe it will be worth your while to go over and check out ASP.net web. This site is all about web development using ASP.NET and Visual Web Developer. You will find a number of resources on the site which I think should help you. Of particular interest, I think, will be the How Do I video series and the ASP.NET 2.0 Quickstart tutorials. Both of these are available from the Learn tab if the links above don't work and contain samples about handling logins.

Hope this gets you moving in the right direction.

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

Sunday, February 12, 2012

can''t connect to local user instance

Just when I think I have this stuff figured out, it bites me back everytime.

I'm

trying to deploy an mdf out to a different machine, and attached to it with local user instance. I connect without problem from my development

machine with a local user instance, which also has Express Manager resident,

and I can connect to a server instance without problem.

What I can't do is

copy the .mdf database over to another workstation, which has Sql Native

Client installed, and connect to the database using a local user

instance! I can connect to a server instance without problem from this

other workstation. Here's my connect string for local user instance

that works fine from my dev machine:

Provider=SQLNCLI.1;Persist

Security Info=False;Integrated Security=SSPI;Data

Source=.\sqlexpress;AttachDBFileName=<full path_name and mdf

filename>;User Instance=true;

The error I get upon trying to connect with other stations is:

Error -2147467259
Database not found or cound not connect to database

I've

tried this every way I know how. I've copied the database from my dev

machine both with and without having detached the database from the

local instance. I've tried detaching from a server instance and copying

the file over. Nothing works, and I've done this before! What gives with this thing?

Rick

Hi,

is SQL Server Service allowed to access the datafiles ?

Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||Jens ... How can tell this? What service should I examine? I don't see any reference to the Sql Native client, other than I know it's installed.

I thought this process consisted of:

- install the Sql Native Client on target machine
- put a local copy of the database on target machine
- connect to the mdf with a local user instance

As I said, I can connect to remote server database from the machine. The folder names differ from my development machine to the target machine, but that shouldn't make difference, should it? I will say that in Sql Express Manager on my dev machine (which works), the full path and database name (i.e..c:\_source\project\mydata.mdf) shows in the database tree.

Rick|||

Hi Rick,

SQL Express does not allow attaching database from a UNC or mapped drive. It wasn't totally clear, but it reads like that what you're trying to do. Also, you can not connect to a User Instance on a different machine as User Instances only support local named pipes connections.

Mike

|||Nevermind. I'm apparently having a mental episode and forgot the one vital requirement of installing SqlExpress on the target instead of just the Sql Native Client. Hadn't had to do this in a while since I've been hitting a server for Sql Express databases. Sorry!

Rick

can't connect to local user instance

Just when I think I have this stuff figured out, it bites me back everytime.

I'm

trying to deploy an mdf out to a different machine, and attached to it with local user instance. I connect without problem from my development

machine with a local user instance, which also has Express Manager resident,

and I can connect to a server instance without problem.

What I can't do is

copy the .mdf database over to another workstation, which has Sql Native

Client installed, and connect to the database using a local user

instance! I can connect to a server instance without problem from this

other workstation. Here's my connect string for local user instance

that works fine from my dev machine:

Provider=SQLNCLI.1;Persist

Security Info=False;Integrated Security=SSPI;Data

Source=.\sqlexpress;AttachDBFileName=<full path_name and mdf

filename>;User Instance=true;

The error I get upon trying to connect with other stations is:

Error -2147467259
Database not found or cound not connect to database

I've

tried this every way I know how. I've copied the database from my dev

machine both with and without having detached the database from the

local instance. I've tried detaching from a server instance and copying

the file over. Nothing works, and I've done this before! What gives with this thing?

Rick

Hi,

is SQL Server Service allowed to access the datafiles ?

Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||Jens ... How can tell this? What service should I examine? I don't see any reference to the Sql Native client, other than I know it's installed.

I thought this process consisted of:

- install the Sql Native Client on target machine
- put a local copy of the database on target machine
- connect to the mdf with a local user instance

As I said, I can connect to remote server database from the machine. The folder names differ from my development machine to the target machine, but that shouldn't make difference, should it? I will say that in Sql Express Manager on my dev machine (which works), the full path and database name (i.e..c:\_source\project\mydata.mdf) shows in the database tree.

Rick|||

Hi Rick,

SQL Express does not allow attaching database from a UNC or mapped drive. It wasn't totally clear, but it reads like that what you're trying to do. Also, you can not connect to a User Instance on a different machine as User Instances only support local named pipes connections.

Mike

|||Nevermind. I'm apparently having a mental episode and forgot the one vital requirement of installing SqlExpress on the target instead of just the Sql Native Client. Hadn't had to do this in a while since I've been hitting a server for Sql Express databases. Sorry!

Rick