Check out this blog post on setting up a SQL Server 2008 R2 Local Database Instance.
Blog post on Setting up a SQL Server 2008 R2 Local Database Instance
Start up the Local Server
Click Start -> Microsoft SQL Server 2008 R2 -> SQL Server Configuration Manager Set the SQL Server(SQLEXPRESS) and SQL Server Browser to automatic start mode. Right click -> Properties -> Service Tab
Login to Local Server
Now open up SQL Server Management Studio and Connect to Object Explorer and select Server Name: [Your PC name]\SQLEXPRESS Example: 8540P-KL\SQLEXPRESS To find your PC name: Right click My Computer -> Properties -> Computer Name tab Login using windows authentication: Using the user name [Your Domain]/[Your User Name]
Setup User Account
In SQL Mgmt Studio -> Expand your local Server -> Security -> Right click on Logins -> New Login Uncheck Enforce password policy, password expiration and user must change pw(Since this is local) Default database -> Your Database User Mapping Page -> Map to your db and grant db_owner role Status Page -> Grant Permission to connect and Enable Login
Setup Access Permissions/Settings for User
Right click your Local Server -> Properties -> Security Tab -> Enable SQL Server and Windows Authentication Mode Open SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> Enable TCP/IP
Database Properties File for Spring Project
database.url=jdbc:jtds:sqlserver://[local PC Computer name];instance=SQLEXPRESS;DatabaseName=[db name]; database.username=[Your user name] database.password=[Your password] database.driverClassName=net.sourceforge.jtds.jdbc.Driver