Ok, can you open your services console and scroll down to S for SQL Server. You should now see the services. Please ensure SQL Server (SQLEXPRESS) is running and then try .\SQLEXPRESS instead of (local).
So as per your example:
Server type: Database Engine
Server name: .\SQLEXPRESS
Authentication: Windows Authentication
Hope this helps
Update: These instructions are because I assume you are running Express Edition not Dev/Std/Ent edition of SQL Server
Try ensuring the appropriate protocols are enabled:
- Start the SQL Configuration Manager (ie: Start->Programs->SQL Server->Configuration Tools)
- Expand the SQL native Client configuration
- Click Client Protocols (you may have a 32-bit and a 64-bit, apply to both)
- Ensure Shared memory, TCP/IP, Named Pipes are enabled in that order
- Expand SQL Server Network Configuration
- Ensure Shared Memory for either SQLEXPRESS and/or MSSQLSERVER is enabled
- Click SQL Server Services
- Restart any running services
You should now be able to login to the instance
If you find you cannot login at all you may need to follow these instructions to get SQL Server into single user mode. See here for the full instructions from Microsoft.
By default, sqlservr.exe is located at C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn.
If a second instance of SQL Server is installed, a second copy of sqlservr.exe is located in a directory such as
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\binn.
You can start one instance of SQL Server by using sqlservr.exe from a different instance, but SQL Server will start the version of the incorrect instance as well, including service packs, which may lead to unexpected results.
To avoid this, use the MS-DOS change directory (cd) command to move to the correct directory before starting sqlservr.exe, as shown in the following example.
cd \Program Files\Microsoft SQL Server\MSSQL10_50.1\MSSQL\Binn
To start the default instance of SQL Server in single-user mode from a command prompt
From a command prompt, enter the following command:
sqlservr.exe -m
Single-user mode can be useful for performing emergency maintenance when you do not want other users to connect to SQL Server, but any user can become the single user, including the SQL Server Agent service.
You should now be able to login to the instance and add yourself to the security tab and grant full access.
Alternate Method:
THere is a script here that claims to add the current user to the SQL Server sysadmin role. This may work in single user mode but I have not verified it
I haven't looked further into this but can confirm this is what happens - perhaps due to the service pack levels differing? (installed instance being SP1 and the tool installer not)
I just used control panel and changed the installed SQL 2008 to remove the database service instance.
Then I installed the MSSQL 2008 Express edition that includes the standard tools - and the option for management studio was there to check... not an elegant solution but it worked - so I didn't bother to figure out the original problem.
Best Answer
This blog post details all the steps you need to go through to ensure you can connect to SQL Server Express remotely. While the post is for Vista, it's applicable to the server operating systems as well. One thing you'll probably want to do to isolate where the issue is with respect to connecting is to use ODBC Data Sources from a remote server and see if you can establish a connection once you've done all the configuration work. If you can, then SQL Server Express is set up properly and it's a matter of getting the Java app configured correctly.