I cannot connect to my basic SQL server from Visual Studio Ultimate 2013? Error 40 - Cannot establish connection

I just started learning ASP.NET through a book, and it asks to connect to "your" SQL server and explore a .mdf file. I've been trying to install SQL, but I only just now got a working installation, and even then it won't let me install the Management
Software. Whenever I try to connect, I get this error: http://puu.sh/7F2JY.png
This is exactly what I do to connect:
1) Open project
2) Navigate to the Server Explorer
3) Click on connect to database
4) In this menu, I can see me Machine name on the top part, which I think means that it's picking up my server runningh
5) On the bottom, it wants me to enter a database name. I think this may be my problem, as I have no idea what to do here.
Also, when I double click on the database file, I get this errpr (52): http://puu.sh/7F2Yw.png
I really don't know what to do here, so post any tips down below

Hi,
Did you choose the correct Server name? It should be the machine name where you installed SQL Server on.
Is it empty when you open select or enter database name drop box in the Add connect dialog box in the Visual Studio 2013?
“Update: I re-installed, and then used both installers. Now I have the Server Management tools, but I still cannot connect.”
The screenshots indicates that the SQL Server is not accessible.
Do you mean that you are not able to connect SQL Server by using SQL Server Management Studio?
If so, make sure that SQL Server Services is started.
Please check out the following articles for details:
How to: Start an Instance of SQL Server (SQL Server Configuration Manager)
http://technet.microsoft.com/en-us/library/ms190699(v=sql.105).aspx
Connect to Any SQL Server Component from SQL Server Management Studio
http://technet.microsoft.com/en-us/library/ms173871.aspx
Thanks.
Tracy Cai
TechNet Community Support

Similar Messages

  • How do I create a view in SQL Server in Visual Studio Express 2013 for Desktop?

    Hi
    I've got a SQL Server database set up using the internal SQL Server in Visual Studio Express 2013 for Desktop. I want to create a view (using tables with one to many relationships) but I don't
    know how to do it.
    Where can I find a good tutorial on creating views in SQL Server in Visual Studio Express 2013 for Desktop? I think Visual Studio Express 2013 for Desktop doesn't have some view designer that
    exists in the non-express version of Visual Studio (if I'm not mistaken). So I think I'd need a tutorial on how to do the actual SQL, unless there is some tool I don't know about.
    Thanks

    Hi ,
    According to your description, if you install SQL Server SQL Server 2014 Express and SQL Server Manager Studio tools (SSMS), if you want to create a view, you can use SSMS. Then if you want to connect to and Diagram your SQL Express Database in Visual Studio
    2013, you can attach the database file by using the .NET Framework Data Provider for SQL Server in Visual Studio, and create a database diagram via expanding the “Database Diagrams” node.
     For more information, there is similar issue about how to connect to and Diagram your SQL Express Database in Visual Studio 2012 , you can review the following article,
    http://blogs.msdn.com/b/bethmassi/archive/2011/10/27/how-to-connect-to-and-diagram-your-sql-express-database-in-visual-studio-lightswitch.aspx.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Hi, I would like to know if is it possible to install windows on mac pro , because I need to have some application like SQL server and visual studio, and they could not be install on mac

    hi, I would like to know if is it possible to install windows on macbook pro , because I need to have some application like SQL server and visual studio, and they could not be install on mac

    Windows on a Mac

  • Connecting BI Web Server with SQL Server Express / Visual Studio Express for Report Development

    Hi,
    My company is using the Report Builder 3.0 to build the BI Reports ( I guess based on SQL Server 2008 R2). Our software vendor has provided us the web URL to access the BI Server. I want to generate the BI Reports with SQL Server Express or  Visual
    Studio Express instead of Report Builder 3.0. Need some guidance in this regard.
    regards, BI.Developer.

    Hi,
    Based on my research, if we want to open the report from report server to Business Intelligence Development Studio, we should download the report from report manager, then add this item in Business Intelligence Development Studio. For more details, please
    see the following steps:
    Type the URL in IE browser to access the repot manager.
    Browse to the RDL file folder or location.
    Hover over the report, and click the drop-down arrow near the RDL file.
    Click on download button, the download window will pop up now. Then save the rdl file.
    Click Manage option in the drop-down list, make a note of its Data Source Connection string.
    Create a Report Server Project in Business Intelligence Development Studio.
    Right-click the Reports folder to open the Add Existing Item dialog box, navigate to the location where you saved the .rdl file for the report, and then click Add.
    Right-click the Data Source to verify the connection string is correct.
    Besides, please make sure that software vendor had assigned ‘View reports’, ’Manage reports’, ‘Manage folder’ and ‘Manage data sources’ tasks for your account, so that you can download the report and view the data source.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Crystal reports integration with sql server and visual studio 2010

    when I am trying to open a crystal report  through code ( visual basic 2010 ) I get the error
    the report has no tables
    I am using SQL SERVER 2008 R2
    HERE IS THE CODE I WROTE 
    Imports System.Data
    Imports System.Data.OleDb
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Windows.Forms
    Imports CrystalDecisions.Shared
    Public Class frmRep
        Dim objConnection As New OleDbConnection("Provider=SQLOLEDB;Data Source=ASHRAF-PC\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=TEST")
        Dim objDataAdapter As New OleDbDataAdapter()
        Dim objDataSet As New DataSet()
        Private Sub CrystalReportViewer1_Load(sender As System.Object, e As System.EventArgs) Handles CrystalReportViewer1.Load
        End Sub
        Private Sub frmRep_Load(sender As Object, e As System.EventArgs) Handles Me.Load
            Dim cr As New ReportDocument
            objDataAdapter.SelectCommand = New OleDbCommand()
            objDataAdapter.SelectCommand.Connection = objConnection
            objDataAdapter.SelectCommand.CommandType = CommandType.Text
            objDataAdapter.SelectCommand.CommandText = "select * from bands"
            objConnection.Open()
            objDataAdapter.Fill(objDataSet, "bands")
            objConnection.Close()
            cr.Load("D:\MY VB 2010 PROJECTS\test2\test2\CrystalReport1.rpt")
            cr.SetDataSource(objDataSet.Tables("bands"))
            CrystalReportViewer1.ReportSource = cr
            CrystalReportViewer1.Refresh()
        End Sub
    End Class

    I suggest you post that question in a Crystal Reports forum.
    Markus

  • Can I use Built-in SQL Server in Visual Studio 2010 ?

    Hi Friends, I am Atif.
    If I will upload my project to my Server Domain and I want to use Built-in Visual Studio 2010 Sql Server Expreess Database then it will work. If yes then Please suggest me How..??
    Actually I don't want to install SQL Server Database Seperately.
    Tell me How can i achieve this.
    Thanks and Regards.
    Atif.

    Hi Atif,
    Besides other post, to use SQL Server Express for development work, you just need to specify the data source (SQL server's name) and authentication details in a connection string. For more information about SQL Server Express connection string, you can review
    the examples in the following articles.
    Database Connectionstrings
    SQL Server Connection Strings for ASP.NET Web Applications
    Also please note that SQL Server Express edition has some limitations, for example: only one CPU can be used by the express edition, the maximum size of a database is 4 GB (10GB in SQL Server 2008 R2 Express and higher versions of SQL Server Express),
    it can only use up to 1GB of RAM.
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Licencing of Windows 8.1, SQL Server and Visual Studio

    1. Windows 8 (OEM Version)
        a. Is it legal to re-install Windows 8 OEM version on a PC (this might
    be required because of formatting of PC hard disk)? Is there any upper limit on how many times a Windows 8 OEM version can be re-installed
    on a PC?
        b. Can I continue to use same Windows 8 OEM version even after upgrading
    a PC (for example change of processor, change of hard disk, change of RAM etc.)
    2. SQL Server (Developer and Express) Version:
       a. Your site mentions that SQL Server Developer edition can be used for
    software development and testing, but a software dealer whom I have approached says its not legal to use SQL Server Developer edition for
    development in a software consultancy. Please clarify.
       b. Is it legal to use SQL Server Express Edition for software development
    purpose in  a software consultancy?
    3. Visual Studio Express Edition
        a. Is it legal to use Visual Studio Express Edition for software development
    purpose in  a software consultancy?
    I had emailed this query to [email protected] yesterday but I have not received any reply.

    This question is a bit broad for a forum post. What have you tried and where does it fail? This code will give a list of files in an app folder. It might get you started: [c# code, but should be easy to translate to VB]
    public async Task<List<string>> GetFileListFromFolder() {
    List<string> fileList = new List<string>();
    StorageFolder storageFolder = await Package.Current.InstalledLocation.GetFolderAsync(@"myFolder\");
    foreach (StorageFile fl in await storageFolder.GetFilesAsync())
    fileList.Add(fl.Name);
    return fileList;
    I'm a self-taught noob amateur. Please take this into account when responding to my posts or when taking advice from me.

  • Visual Studio Ultimate 2013 can't connect to IIS Express 7.5 on Windows 7 Virtual Machine Using Parallels 6.0

    Here is what I am using:
    MacBook Pro - Version 10.7.5 with 128 GB SSD
    Parallels 6.0
    Windows 7 Home Premium
    Visual Studio 2013 Ultimate
    IIS Express 7.5 download that changed it to IIS Express 8.0
    I also have WebMatrix but I am not planning on using it.
    I am a novice when it comes to development and these technologies so I am sure that has some impact on my issues. 
    I have spent a lot of time looking between the various forums to find a solution and they all seem to offer parts but not an entire and workable solution to solve the two errors that I receive when starting a new project and/or web site:
    1-
    Configuring IIS Express Failed with the following error:
    Filename: redirection.config
    Error: Cannot read configuration file
    2-
    Unspecified Error Exception from HRESULT: 0x80004005 (E_FAIL))
    Based on the research I believe it has something to do where the IIS Express files are located on the Mac side of the computer.  I have tried to map them back to the Windows machine but I still get the same errors.
    I understand it should be looking in the documents folder on the C Driver for the user, which is Administrator.  I have tried to redirect, open the port, change the Firewall settings to no avail.  I believe it is something very simple
    but I am not seeing it.  I did turn on the Windows Features for IIS and removed the read only check box for the IIS Folder.
    I have looked at the binding and port settings but cannot figure out how to make changes there.  I think I need to remove local host and replace it with my computer name.  I did try this but it didn't work.  Here are the defaults:
    Please let me know what you think and share a possible solution.  Remember that I am a novice and some things will go over my head so the more detail the better.
    I am happy to not use IIS Express and just use IIS because the volume of development is low.  I am also open to using VS directly onto Azure and bypassing IIS if that is the best solution.  I say this because I saw some posts that state there isn't
    a workaround. 
    Thanks for taking the time to assist.

    Hello jats1910,
    Your problem may more related to IIS setting and configuration. But this forum is about Visual Studio Setup and Installation. If your Visual Studio installed without problem on your OS, then you may need to consult this issue on IIS forum.
    Best regards, 
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Whlile calling a Stored Procedure which is written in the Sql Server  from JSp java throws OutOfmemory error- Server used is Tomcat. Even after increasing the heap size the error has come

    while Using Tomcat it will throw out of memory for 50000 records and the weblogic throws Out of memory error for 2 lakshs records, and the Ibm server throws
    Out of memory error for 1 laksh records

    while Using Tomcat it will throw out of memory for 50000 records and the weblogic throws Out of memory error for 2 lakshs records, and the Ibm server throws
    Out of memory error for 1 laksh records

  • Cannot install Visual Studio Community 2013 - Error message "Visal Studio 2013 Ultimate is installed..."

    Hello,
    I am trying to install Visual Studio Community 2013 in my machine but when I start the setup process I get the followingerror message:
    Setup Blocked
    Visual Studio Ultimate 2013 is currently installed on this machine. Please uninstall Visual Studio Ultimate 2013 and retry.
    The problem is that I used to have VS Ultimate 2013 (Preview Edition, I think) installed on my machine but I've uninstalled it some time ago. It looks like something was left over in process.
    What I've tried to do was to install VS Ultimate 2013 again, perform a repair operation and then uninstall it again. This uninstall process is reported to be successful. However, it did not solve my problem: VS Community 2013 installation still fails.
    Does anyone have an idea how to solve this?
    Thank you,
    João Pedro

    "I used to have VS Ultimate 2013 (Preview Edition, I think) installed "
    Sorry to be the bearer of bad news, but this sort of situation is exactly why potential users of pre-release software are warned NOT to install test software on production systems. While a new software version is in development, one of the LAST things to
    be finalized is the uninstaller. So, uninstalling a test edition often leaves behind unwanted artifacts.
    In your situation, I'd do a clean install of my OS, then install VS.

  • Can't connect Azure Database in SQL Server

    Hi,
    I completed setting up the database and server on Azure, but when i tried to connect it using SQL Server 2012. I got an error.
    TITLE: Connect to Server
    Cannot connect to tcp:*******.database.windows.net,1433.
    ADDITIONAL INFORMATION:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=10061&LinkId=20476
    No connection could be made because the target machine actively refused it
    My IP was already added in Azure.
    I also checked that the TCP/IP was enabled on Configuration Manager.
    Any thoughts?
    Thanks!!

    Hi Aaron,
    If you are trying to manage your database through SSMS - make sure that the TCP/IP protocol is enabled.
    1) SQL server configuration manager
    2) In 'SQL server Network configuration'
    3) Enable TCP/IP
    Also try connecting your database through the web based sql azure management studio.
    http://msdn.microsoft.com/en-us/library/azure/ee336282.aspx
    http://social.technet.microsoft.com/wiki/contents/articles/2151.azure-and-sql-database-tutorials-tutorial-2-using-sql-database.aspx
    Girish Prajwal

  • Connecting to a local SQL server .mdf file

    Hi all,
    In doing some prototyping of my database I started working with a local copy of an SQL Server database since it so conveniently integrated with the Visual Studio .NET tools I use. Now that I have spent far too much time working on a local prototype, I would very much like to migrate it to our in-house database rather than rewrite the whole thing (it is quite large in terms of tables and constraints and none of our in-house tools generate code from ER diagrams).
    Seeing that SQL Developer had a migration utility I pounced at a chance to use it. I installed it as well as the recommended JDBC driver; however, it occurs to me that I have no idea how to connect to a local database file using the host name and port fields given to me. Is there some convenient way to configure SQL Server 2005 to forward this file to some kind of local host? Or is there any other driver for use with a local .mdf file? Help would be greatly appreciated.

    While it does come with a copy of SQL Server with it, visual studio suspiciously just asks for a file name, so I would assume it reads directly from the .mdf
    I have a copy of SQL Server 05 on the machine, but I haven't done anything in the way of server side configuration before, so I can't even guess how to direct it to serve the file.
    All software packages involved are:
    Windows XP
    SQL Server 2005
    Visual Studio .NET 2005
    SQL Developer 1.5.1
    Oracle client 10g connecting to an Oracle 9i release 2 server
    Any pointers to the right direction or alternate migration solutions would be great.
    Edit: I am highly suspicious that Visual Studio was connecting to this file through SQL Server Express and not my standard edition copy, and it is therefore not attached to the database, the solution is not looking entirely easy, so an alternate migration may be a better choice. Thanks in advance for any help.
    Edit: Well my suspicions were confirmed. I attempted several solutions. First of which being the MS SQL Express publishing wizard so that I could publish to SQL and run the script via Toad or SQL Plus; however, it only targets MS SQL Server 2000 or 2005 which would result in a lot of hand editing in terms of migration. Attempting to find a script converter did not help as they all either failed outright or demanded a connection to the datbase via ODBC or JDBC (which doesn't support SQL Express' less than clever attach on connection ideas). This led me to the alternate solution of trying to attach the file to my main database and connect to it; however, the SQL Server command prompt has some sort of permissions issue with my office security setting (though I can edit files fine) and results in failure.
    I think it is about time to throw in the towel and just work it out by hand. This would be greatly expedited by any visual database tools that generate code from ER diagrams if you happen to know of a freeware solution. We lack an internal copy of Oracle Designer and the free license only permits a single prototype. So any suggestions on the front of freebie visual object relational tools and alternate migration ideas would be of great help. Until then I'll be grinding through it with moderate dissatisfaction.
    Thanks again.

  • Connecting to Windows SQL server from Unix Oracle Server

    How can I connect to Windows MS SQL server from Unix Oracle Server? What installation or package will I need?

    Two options:
    1) Do a search on "Oracle Transparent Gateways" and/or "Heterogenous Services". These are products that are designed solely to connect to other databases from Oracle.
    2) Use a type-4 JDBC driver for SQL Server, installed and running in the JVM of your Oracle server. I'm assuming your Oracle database is sufficiently recent to be java-enabled here.
    Justin

  • Open (.sdf) file with SQL server 2005 Management Studio

    In VS2005, I have created a SQL Mobile database, (.sdf).
    Copied that (.sdf) file to Desktop, and when I try to open with SQL Server 2005 management studio, its showing error "make sure the application for the file type (.sdf) is installed."
    How can I open this file with SQL server?
    Regards
    Abinash

    You must install SP2 if using Management Studio Express (http://www.microsoft.com/downloads/details.aspx?familyid=6053C6F8-82C8-479C-B25B-9ACA13141C9E&displaylang=en)Erik Ejlskov Jensen, MCTS: WM App, MCITP: SQL 2008 Dev - http://erikej.blogspot.com
    Please mark as answer, if this was it.

  • Cannot connect to the specified SQL Server instance

    I am trying to install Microsoft System Center 2012 R2 Virtual Machine Management.
    I am getting the following error:
    Setup cannot connect to the specified SQL Server instance.
    Ensure that the server name, isntance name, and, if speceified, port number are correct. If you are installing VMM remotely, ensure that remote connections are set up correctly, and then try Setup again.
    I have installed the 
    Microsoft® SQL Server® 2008 R2 Command Line Utilities
    but have not set up any SQL Server instances. 
    how should i proceed?
    Edit:
    The followign fields are configured:
    Server Name: The name of the machine i am using
    Port: <empty>
    Use the following credentials <NOT ticked>
    Instance name <empty> (the drop down is empty)
    New Database <Ticked> :  VirtualManagerDB

    Is SQL server is properly installed on the system?
    Are you able to connect with SQL server instance?
    As per the given details looks, only client utilities installed and trying to create the database which needs SQL server.
    Make sure you are able to connect with the "ServerName\InstanceName,PortNumber" and hope installing the system as per below article:
    http://technet.microsoft.com/en-us/library/gg610656.aspx
    Hope it help!
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

Maybe you are looking for