How do I create tables in Microsoft SQL Server 2008 R2 Express - sql-server

I have installed Microsoft SQL Server 2008 Express R2 with tools. In windows start menu now I have an option for SQL Server Management Studio. So I click on that and a dialogue window pops up asking me to connect to a server. I don't know what server to enter into here and all I want to do is create a new database so I can store some simple information in tables. I did press cancel on the dialogue box and looked around in the management studio but I couldn't find a "create new table" option or anything particularly like that.

It's looking for <%ComputerName%>\SQLEXPRESS
If you don't know the name of your compter then...
Click Start
Right Click on My Computer
Click Properties
Click ComputerName tab

I haven't played around with the manager studio in a while, but I hope this helps
http://msdn.microsoft.com/en-us/library/ms186312.aspx

Use localhost as your server if you don't need to connect to an external server. Then in Object Explorer you'll be able to create new Databases and Tables within those databases

Related

How to solve an error when trying to create tables using the menu and the right button in the mouse in SQL Server?

My problem is this: when I try to create a table in SQL Server database using the right click button in the mouse and then choosing "New > Table", an error message appears
This back-end version is not supported to design database diagrams or tables. (MS Visual Database Tools)
I tried downloading the Database Tools but still the same error message appears.
Any ideas?
Thank you all!
It normally happens when the database version is newer than the database Tool you are using.
Its always better to use a newer version of SSMS or datatools than the database
I also have the similar question.
When I use the SQL Server Management Studio 2014 to connect to the SQL Server 2017 and right click "New -> Table" the error appears.
error message screenshot
But if I use the SSMS 2014 to connect the SQL Server 2012 and also right click "New -> Table", the table design page occurs normally.
It is not suggested to do operations via using the GUI for SSMS which version is earlier than SQL Server.
As workarounds:
1. please use the T_SQL to execute operations instead of GUI.
2. please use the matched or higher versions for SSMS.
By the way, from SQL Server 2016, SSMS is not installed along with SQL Server. You can download the latest SSMS separately from the link.
Download SQL Server Management Studio (SSMS)

unable to view table design in microsoft sql server management studio

I have microsoft sql server management studio installed for existing databases and I can connect and write queries without a problem. However I experience problems when right clicking on the table to open the design view. I get the following error, has anyone seen this before?
If I click okay on this error message the right click context menu displays, i.e. displaying options for new table, design view, select top 1000 rows, edit top 20 rows etc.. and then I get the following error message (see image 3).
Any help greatly appreciated.
Error message
Version of SQL
If I click design view in the right click context menu
Thanks,
It means your Management Studio's version is not >= the version of SQL Server.
If you, for example, use Management Studio 2008 R2 to connect to SQL Server 2014, you'll get this message.
You'll need to install the latest version of SSMS.
If both versions show 2008, it's still possible you have a different version, because there is SQL Server 2008 and SQL Server 2008 R2.

Visual Studio 2013 crashes when building connection string to microsoft sql server

I am trying to migrate my application from mysql to microsoft sql server 2014. When I create a new application and attempt to build a connection string to a microsoft sql server 2014, I can test the connection and it returns an successful connection but vs2013 crashes when I click the OK button. This process works on the mysql connection I have on another application so I suspect it is looking at a bad reference to the sql-server dll. I have looked everywhere and there is no reference to this problem.
This is exactly the same problem as this post
Microsoft Visual Studio 2013 Stopped Working when adding connection but user, B413, never post a fix to his problem
I found a work around for this problem. It's not pretty but it works.
Go to Server Explorer and right click on data connections
Select "Create a new SQL database"
Click the down arrow for the server name and select your sql server
Give your database a name like "test"
This will create a new database in the sql server
Now go and right click on the new instance of your new database in server explorer and chose "Modify Connection"
Now click the "advanced" button
Now scroll down to the Source section and change the name of "Initial Catalog" to the database you wish to connect to.
Ok out of everything and you should be able to see your tables.
Go the Sql Server and delete the instance of the new database you created for this exercise.
Good Luck...I hope this helps.
For me the solution was to (temporarely) remove the MySQL DataProvider entry in the registry as explained here. Hope it helps others!

Can't find servers in Data Connection in Visual Studio 2012?

http://msdn.microsoft.com/en-us/data/jj193542
I'm following the tutorial in the link above, and when I get to the step "Connect to either LocalDb ((localdb)\v11.0) or SQL Express (.\SQLEXPRESS), depending on which one you have installed" in the "Where's my data" section, the server name drop down is blank. I have LocalDB installed, and the program is writing to a database since following the previous steps of the tutorial I created two tables that were saved, but for some reason I can't add a connection to any server in Database Explorer.
I'm using Visual Studio 2012 Express for Desktop.
If it's blank it means you never set it up before so add it manually, if you are not sure what to put as the server name you can try .

Missing Diagram folder in Database Explorer at Visual Studio 2012

I was in a middle of designing a website when suddenly Database Diagram folder just disappeared from the Database Explorer. I have no idea what happened and what to do right now, as I desperately need it to continue my work - adding tables to database manually are not an option for me.
I've been seeking for the solution for a whole day, and I even re-installed the Visual Studio and local IIS server, but it wasn't helpfull at all.
Is there any way to bring the feature back or at least is there any free tool that would work on Windows 8 x64 and has diagram-based database designer for MSSQL 2008?
EDIT
It seems that Microsoft removed the diagramming for purpose. Which is pretty logical in a business logic - why would somebody buy Server Management Studio if they have basic tool (diagramming) built in Visual Studio?
1) Database Diagram is a feature of SQL Server, not Visual Studio. I am not sure what VS uses to display that folder but you might want to verify with your DBA or check the configuration of the database to see if someone has not just disabled the ability to use diagrams. Have you tried refreshing your connection to the database server as well?
2) How is adding tables to a database manually not an option? If you get yourself dependent on doing things one way and only that one way you are setting yourself up for disaster in future projects, as you are in your current one. There are other ways from within VS to create a table, it just may not be a graphical picture that diagrams offers.
3) Have you looked at the database through SSMS to see if the diagrams folder shows up there?
Hello this has been my solution that worked for me and enabled me to use database diagram ide in visual studio 2012!!
First i installed SQL Server Management Studio. I then noticed that i still did not have SQLEXPRESS Service or SQL Agent Browser in my computer services either.. This was why i assume i couldn't login to any of the SSMS which was annoying. I then downloaded SQL Server Express R2 which then ran me though another setup which was fine. I did also choose to put a sql server password for SQL Server Express.
Once installed I double checked to make sure the services where running by right clicking MY COMPUTER / MANAGE / SERVICES -- scroll down till you see "SQL Server (SQLEXPRESS)" and make sure that the service has started and also "SQL Server Agent (SQLEXPRESS)" (this one was turned off when i checked) .. i was then able to login to SSMS without a problem.
I then created a new database, right clicked diagram like we always do in VS and created a diagram with two tables, created their relationships blah blah..
i then created a new website in vs 2012, i clicked "Connect To Database" in the SERVER EXPLORER"
I choose my server name, used windows authenication and selected the database i just created in SSMS.
Then to my suprise i now have database diagram designing in Visual Studio 2012.. Finally!
Thankyou microsoft for removing such a cool feature which now gives us developers a few things to do.
Hope this helps.

Resources