We all know that VS10 has one builtin SQL Server database but if we want to use SQL Server 2008 instead of the VS10 SQL Server then this might work for you.
You need to first download the SQL Server 2008 from the Internet Source. Then you must install it. There are many tutorials on the WWW showing how to do that.
Step 1
Open SQL Server Management Studio. If you are using Window Authentication then your Server Name is local, if you are using SQL Server Authentication then during installation, whatever the server name is, you provide what you gave there. Moreover if you are using SQL Server Authentication than it will ask you for Username and Password, that also comes from the installation process, so take care about these things during installation.
Step 2
Click on Connect. If things are correct then it will open SQL Server Studio for you.
This is the Object Explorer, the same as Server Explorer in VS10. Here you can make a new database, tables, Store Procedures and many more things.
Step 3
Let’s start by creating a new database. Click on Database in the Object Explorer then New Database. The New Database window will open. Provide your database name and click on Ok. See the following image.
You can see your database under Database, see the following image.
Step 4
Here make a new table by going to mynewdb -> Table -> New Table.
Step 5
Open Visual Studio 2010 then open Server Explorer. Click on Connect to database.
It will open an Add Connection window as in the following image. There you need to provide the username that comes automatically if you click on refresh, if not come then specify your server name.
Once you have your database your work is done, just check it out by Test Connection, if you get the message Test connection successful then everything is right and you can proceed by pressing OK.
After pressing OK, check out in Server Explorer, you have your database and tables under your servername.databasename.dbo file, see the following image.
I hope you like this. Thanks for reading. Have a good day.