Tuesday, November 15, 2016

Fix for "Cannot Connect to Database Master at SQL Server at Server Name - The Database might not exist, or the current user does not have permission to connect to it" SharePoint Error

Problem:
When trying to create a new SharePoint farm using PowerShell, the SharePoint 2016 management Shell gave an error message:
New-SPConfigurationDatabase : Cannot connect to database master at SQL server at <SQL-Server-Alias>. The database might not exist, or the current user does not have permission to connect to it.
New-SPConfigurationDatabase : Cannot connect to database master at SQL server at SP16_SQL. The database might not exist, or the current user does not have permission to connect to it.
Tried using SharePoint products configuration wizard as well and got the same issue!

Troubleshooting Checklist:
  1. Check the permissions for the Setup account which you are using to run the wizard or PowerShell. Make sure the setup account is granted with "DB_Creator" and "Security_Admin" Server Roles.
  2. In case of Named instance, it should be "Server\InstanceName". If is is SQL Alias, make sure the alias is properly configured and should be accessible from SharePoint Server. Verify if the SQL Server Alias is created for both 32 and 64-bit! How to Create SQL Server Alias for SharePoint
  3. Check if the SQL Server Service is running on your Database Server. Verify "TCP/IP" protocol is enabled under Network Configuration section of SQL Server Configuration Manager. 
  4. Test the connectivity between SharePoint and SQL Server. Try adding a HOST file entry in your SharePoint Server to point the SQL Server's IP!
  5. Check the firewall rules on SQL Server. If firewall is enabled on SQL Server, Create inbound TCP rule with ports: 1433,2383,2382. and inbound UPD rule with port: 1434.
  6. Double check if you have not fat-fingered User Name or Password!


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Tuesday, November 8, 2016

How to Create New Target Application ID in Secure Store Service for BCS in SharePoint 2016

When you want to consume external data in SharePoint, such as data from your other business applications, you can use Business Connectivity Services (BCS) together with Secure Store Service. The external data source that you can connect to is called a Secure Store Target Application. BCS makes it possible for you to set up a connection to the Target Application, and the Secure Store enables you to manage the credentials that are required by the external data source

Before proceeding, You have created and configured Secure store service application and generated the master key from SharePoint 2013/2016 Central Administration site, isn't it? If not, Refer:
Now you are all set to create new Target Applications and use in SharePoint. Here you go!

How to Create New Target Application ID?
Here are the steps to Add new Target Application ID in SharePoint 2016 Secure store Service:
  • Go to SharePoint Central Administration site >> Click on "Manage Service Applications"
  • Locate and pick your Secure store service application
  • In the Ribbon, Under the Edit tab click on New button
  • Enter the Target Application ID (Make sure the ID is unique - and you can't change it later), Display Name, Contact E-Mail. Choose the application type - Group: Maps group of users to a single set of stored credentials Individual: Maps a single user to a single set of stored credentials. Click Next.
    sharepoint secure store application id
  • The next window gives you the ability to Add/Change credential fields associated with the external data source. In my case, I left it with Windows User Name and Windows Password fields as they are sufficient to connect with SQL Server database using windows credentials. Click on Next.
    If you want to use SQL authentication , Select "User Name" and "Password" in Field type dropdown
    sharepoint secure store application id 2013
  • Enter the name(s) of the users that will administer the target application and Group who will use the target application and click OK
    sharepoint 2013 secure store target application type
Now we have successfully created target application.  

Set up Credentials for New Target Application ID:
The next step is to set the credentials for the target application ID.
  • Click on Context menu of newly created Target Application Id and choose Set Credential
    sharepoint 2016 create secure store application id
  • Enter the User Name and Password & Confirm Password which will be used to connect to the target data source on behalf of authorized users and click on OK to complete the creation of secure store target application ID. Make sure this access account (In my case its: Crescent\DBAccess) have proper rights on external database for the operation such as Read/Write.
    sharepoint designer secure store application id
Now All users of the given group can use the Application ID to connect with external data source with the application ID generated! Once the target application is created in Secure store service, you can associate it with any application to interact with the external database or application model, such as from SharePoint Designer, Excel, etc.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


You might also like:

Related Posts Plugin for WordPress, Blogger...