Cannot connect to database master at SQL server at SERVERNAME RRS feed

  • Question

  • I have installed SQL 2008 R2 in a fresh win 2008 R2. I’m running the sharepoint configuration Wizard using the database server name with the correct domain credentials but I get the following error message. “Cannot connect to database master at SQL server at SERVERNAME. The database might not exist, or the current user does not have permission to connect”

    I‘m able to login to the new SQL server using the “SQL server management studio” with no problems. I used the sa account and a domain account.

    The sharepoint server is also a new installation. And both servers have the firewall disabled.

    Thanks in advance for your help.

    Tuesday, October 25, 2011 12:15 AM


  • I start up the sharepoint server using the SQL admin account and executed the SP wizard using the SQL admin credentials and it started working. thanks for your answers.

    • Marked as answer by ITPrezz Thursday, October 27, 2011 6:51 PM
    Thursday, October 27, 2011 6:51 PM

All replies

  • Hi,


    What is your SharePoint server’s version?


    Please make sure you use the farm admin account to launch SharePoint configuration wizard. If not, please log in with this account, then check the effect.


    In addition, check if you create a named instance, such as, servername\sharepoint, however, you only specify the servername in the configuration wizard. If this is the case, change to servername\sharepoint, then check the effect.



    Rock Wang

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Regards, Rock Wang Microsoft Online Community Support
    Tuesday, October 25, 2011 2:10 AM
  • IT Prezz,


    I had the same problem a few days ago. The solution is not "so" simple.

    First thing, when you installed SP2010 and SQL2008R2, you have to you the same DOMAINADMIN, then log on SQL2008R and give the DOMAINADMIN rights as SYSADMIN. This accountright means FULL CONTROL of the database.

    Secondy, when he ask's the name, you have to write the instance name to.. so DOMAIN\INSTANCE, check whats you're name on the SQL BROWSER ( an example on image )



    On the last side, SEE if al you're services a running on the application server as sql server, beacause if SQL BROWSER is not running you can't access you're database



    If you found this post helpful, please "Vote as Helpful". If it answered your question, remember to "Mark as Answer". - Gokan Ozcifci - SharePoint Infrastructure Consultant
    • Proposed as answer by That.Guy Thursday, August 21, 2014 8:52 AM
    Tuesday, October 25, 2011 7:16 AM
  • I just discover that I cannot access the server via the SQL management studio remotly. accessing the server locally is not a problem.

    the firewall is off in the SQL server


    Tuesday, October 25, 2011 8:22 PM
  • i have fixed the remote connection issue. i had to enable the tcp\ip but i still cannot created the database using the sharepoint wizard. thanks
    Thursday, October 27, 2011 3:30 PM
  • I start up the sharepoint server using the SQL admin account and executed the SP wizard using the SQL admin credentials and it started working. thanks for your answers.

    • Marked as answer by ITPrezz Thursday, October 27, 2011 6:51 PM
    Thursday, October 27, 2011 6:51 PM
  • Here's what I've had to do to fix this:

    • If you receive the following error when configuring SharePoint:
    • Start SQL Server Configuration Manager and enable TCP/IP under SQL Server Network ConfigurationèProtocols for MSSQLSERVER:
    • Restart SQL Serverand SQL Server Agent services.

    • Edited by F1GP Wednesday, March 14, 2012 6:13 PM
    • Proposed as answer by Rustam Fakhrutdinov Saturday, August 22, 2015 10:47 AM
    Wednesday, March 14, 2012 6:07 PM
  • To add to F1Gp post...

    Took me a day and a half to figure this out through multiple threads/blogs/etc... and I am by no means a SharePoint or SQL expert, but Ifinally resolved this by doing the following:

    In Microsoft SQL Server Management Studio:
    1. Check to make sure your domain id that you are using to install/config SharePoint has the dbcreator, sysadmin and security admin.
    2. In the Management/SQL Server Logs folder, open up the Current Log and do a filter search on "server is listening on" to see which port the SQL server is listening on.... default is 1433-1434, but it doesn't mean it was actually set to 1433-1434.
    In the result you will see something like: 
    Server is listening on ['any' <ipv4> 1433].
    Server is listening on ['any' <ipv6> 1433].

    In the SQL Server Configuration Manager: (found in the Configuration Tools folder - look for it in your Start menu)
    1. Go to SQL Server Network Configuration.
    2. Double click on  "Protocols for <sql server name>"
    3. Check to make sure TCP/IP is 'Enabled'
    4. Double click on TCP/IP and go to the 'IP Addresses' tab.
    5. Make sure IP1, IP2, IP3, IP4, IP5, IP6, IPAll have TCP Port set to 1433, and that TCP Dynamic Port is blank (not '0')
    6. Once set, go to SQL Server Services.
    7. Restart the SQL Server.

    In the Control Panel:
    1. go to and check your "Windows Firewall with Advanced Security" setting (I'm running Windows Server 2008 R2)
    2. Create a new InBound Rules.
    3. Select 'Port', click 'Next', Select 'TCP', Select 'Specific local ports', enter '1433-1434', click 'Next', Select 'Allow the connection', click 'Next', only have 'Domain' checked (the rest is to be unchecked), click 'Next', enter a Name (I called mine 'SQL 1433-1434'), click 'Finish'.

    Now after doing all of this, on another computer, try to see if you can ping the SQL server and the port 1433 (I used a program called 'paping', which is called in the DOS command)... if successful, then you are good to continue with the SharePoint 2010 server install.

    My problem was that for some reason, our SQL Express install did NOT use 1433.

    I really hope this helps someone!

    • Proposed as answer by spy590 Thursday, May 23, 2013 7:23 PM
    Wednesday, June 20, 2012 1:44 PM
  • The dynamic port was my issue as well. As soon as I changed that, it worked perfectly.


    Wednesday, September 4, 2013 5:39 PM
  • I encountered the same issue in my Development Environment. I added an Exception to the windows Firewall which resolved the issue.

    Ravichandra Challa

    • Proposed as answer by Bugmandan Tuesday, May 24, 2016 1:25 AM
    Saturday, November 2, 2013 5:50 AM
  • The dynamic TCP/IP SQL ports was my issue as well. Thankyou.
    Friday, February 7, 2014 3:03 AM
  • Thanks for this. This solution actually worked. I was a fool and did not recognize it that TCP/IP was disabled.

    Friday, April 18, 2014 2:00 AM
  • You have to grant the SharePoint User that configures the SharePoint an appropriate permissions which are:

    1- dbcreator.

    2- sysadmin.

    To do that open SSMS(SQL Management Studio) -> Expand Security then Logins ->  and Add your SharePoint User -> go to Server Roles ->  finally Check dbcreator and sysadmin.



    Monday, September 15, 2014 9:50 AM