J
Jonathan Wood
I'm new to SQL Server and seem to have a lot of problems with my connection
string not working. I finally got it working on one system but then it
stopped working when I moved to another system. Can anyone give me some
ideas as to why?
IMPORTANT: This is not on the final Web-hosting machine. I'm just trying to
get it running on my production machine for development and testing.
My current connection string is "Server=.\SQLEXPRESS;Integrated
security=SSPI;Initial Catalog=BlackBelt".
Which gives me the error "Cannot open database "BlackBelt" requested by the
login. The login failed. Login failed for user 'Jonathan-PC\Jonathan'."
I'm running as an administrator on Vista and, when I right-click on the
database (BlackBelt.mdf) in the Server Explorer and select the Modify
Connection command, I see 'Use
Windows Authentication' is selected, for which I obviously have correct
authentication. And if I click 'Test Connection' from this same dialog, it
reports that the connection succeeded.
I have SQL Server Express installed and SQL Server Configuration Manager is
setup as follows:
SQL Server 2005 Services
- SQL Server (SQLEXPRESS) = Running
- SQL Server Browser = Stopped
SQL Server 2005 Network Configuration
- Protocols for SQLEXPRESS
- Shared Memory = Enabled
- Named Pipes = Disabled
- TCP/IP = Disabled
- VIA = Disabled
SQL Native Client Configuration
- Client Protocols
- Shared Memory = Enabled
- Named Pipes = Enabled
- TCP/IP = Enabled
- VIA = Disabled
Aliases
(Empty)
I was able to get it working with the connection string "Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Jonathan\Documents\Visual
Studio 2005\WebSites\BlackBelt\App_Data\BlackBelt.mdf;Integrated
Security=True;User Instance=True" but I have no idea why and some folks told
me that there are problems connecting with User Instance = True.
I don't get why I'm having so much trouble with this. Any suggestions
appreciated.
string not working. I finally got it working on one system but then it
stopped working when I moved to another system. Can anyone give me some
ideas as to why?
IMPORTANT: This is not on the final Web-hosting machine. I'm just trying to
get it running on my production machine for development and testing.
My current connection string is "Server=.\SQLEXPRESS;Integrated
security=SSPI;Initial Catalog=BlackBelt".
Which gives me the error "Cannot open database "BlackBelt" requested by the
login. The login failed. Login failed for user 'Jonathan-PC\Jonathan'."
I'm running as an administrator on Vista and, when I right-click on the
database (BlackBelt.mdf) in the Server Explorer and select the Modify
Connection command, I see 'Use
Windows Authentication' is selected, for which I obviously have correct
authentication. And if I click 'Test Connection' from this same dialog, it
reports that the connection succeeded.
I have SQL Server Express installed and SQL Server Configuration Manager is
setup as follows:
SQL Server 2005 Services
- SQL Server (SQLEXPRESS) = Running
- SQL Server Browser = Stopped
SQL Server 2005 Network Configuration
- Protocols for SQLEXPRESS
- Shared Memory = Enabled
- Named Pipes = Disabled
- TCP/IP = Disabled
- VIA = Disabled
SQL Native Client Configuration
- Client Protocols
- Shared Memory = Enabled
- Named Pipes = Enabled
- TCP/IP = Enabled
- VIA = Disabled
Aliases
(Empty)
I was able to get it working with the connection string "Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Jonathan\Documents\Visual
Studio 2005\WebSites\BlackBelt\App_Data\BlackBelt.mdf;Integrated
Security=True;User Instance=True" but I have no idea why and some folks told
me that there are problems connecting with User Instance = True.
I don't get why I'm having so much trouble with this. Any suggestions
appreciated.