OLAP cube / Analysis Services = error on transport layer - sql-server

Problem:
When connecting to an OLAP cube via Excel by using Windows authentication we receive this error: "An error was encountered in the transport layer"
When connecting to Analysis Services via SQL Server Management Studio 2008 R2 by using Windows authentication we receive this error: "Cannot connect to Lake. A connection cannot be made. Ensure that the server is running."
The thing is that a connection with a proxy user via an automated SQL Server job in which the cube is deployed and processed worked. Using the credentials of that user when trying to connect to Analysis Services via SQL Server Management Studio however, does not work.
The server, on which the cube is deployed, is named Lake and is definitely running. Also, the connection to the database engine on Lake is possible.
What could cause this issue? Why is it possible that a proxy user can update the cube in a SQL Server Job but the very same credentials cannot be used to manually log in to the Analysis Services server?

It is possible that the SQL Job uses credentials of a Service Account - most likely SQL Server Agent (NT Service\SQLServerAgent) or Analysis Services (NT Service\MSSQLServerOlapService) to connect to the SSAS database and this account has access to the cube but the end-user running this job doesn't have an explicit access, hence the error.

Probably, you try to connect from another domain, than MS SSAS service works. You may check it by connecting with login from domain of MS SSAS server.

Related

Connect to Internal SQL database from Azure Web Application

I'm trying to build a webservice that talks to a SQL database hosted on a server in our internal network. The service is hosted by Azure as a Web App. Is there a good way of doing this? Do I have to use Azure Sql databases, and if I do, is there a way to have the Azure database act as a proxy for our internal database?
There are already rules permitting connections to the ports on our database server, so I don't think that's the problem. I see a lot of questions regarding connecting to Azure hosted sql databases, but nothing about connecting Azure web apps to other kinds of databases.
The error occurs when I try to call a stored procedure (via generated entity framework code) and is as follows:
Error occurred: System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: 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.
Our database is configured to allow remote connections, so what I'm guessing the Web App is having difficulty connecting to our vpn.
Please let me know if you need any additional information.
Thanks,
Josh
You can leverage Azure Hybrid Connections which is a feature of App service. Within App Service, Hybrid Connections can be used to access application resources in other networks. It provides access from your app to an application endpoint and uses Azure Relay service to connect to on-premise.
Check out the below link for more details :
https://learn.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections
First option is to look on azure app service hybrid connection but for you to do that you should have Windows server 2012 or above.
Azure App Service Hybrid
Azure App Service hybrid connection is good if you are pulling small amount of data.
If you are pulling large amount of data or your SQL server version is below server 2012 you have two options:
Azure Site to Site VPN
Azure SQL Data Sync
Azure SQL DB Sync is a feature that available on Azure SQL database. You can create a Azure SQL database on azure and sync your on-premise SQL database or SQL database table to Azure SQL database and you can connect your application to Azure SQL database instead of connecting to on-premise database server. This will increase your performance of your application.
We ended up adding the application to an Azure Virtual network that allowed connections to our on-prem servers. The remaining difficulties were due the wrong port numbers being open.
What was very helpful in debugging this was the Kudu console in Azure, under Advanced tools -> console. There you can run commands from the machine hosting your application like ping, or the below:
sqlcmd -S tcp:servername,1433 -U Username -d databasename -P password -q "SELECT * FROM tablename"

Connect Power BI to SQL Azure

I have a database in the SQL Azure Service (not in a VM). I can connect to the database using SQL Server Management Studio but I'm not able to connect using Power BI Desktop edition. The error is very generic
"Unable to connect". I have tried to connect using both an AD and a SQL user. Is there a way to debug or troubleshoot a Power BI connection ? I do think Power BI is finding the server because if I put in a nonexistent server I get a message that the server can't be found. I'm wondering if this has something to do with the account I log into Power BI with although I have tried logging in to Power BI with the Azure admin account and I get the same failure message as in the screen capture image.
step 1
clean the stored credentials in the power bi
-file>option and setting> data source setting> find your azure server and delete/clear permission
and then try to login using database login method in powerbi and provide the azure server name and optional database
note: azure sql server name should be like this : xxx.database.windows.net
make sure, if you are able to log in on the server using ssms then use powerbi on the same machine
For detailed steps
http://www.powerbipanda.com/2017/04/error-connecting-power-bi-to-azure-sql.html

Microsoft SQL Data Sync Agent: Server and Database

I'm struggling with Microsoft SQL Data Sync Agent, which I need to setup the windows Azure platform.
In the ms sql data sync agent preview, the "Ping Sync Service" is successfully executed.
My windows firewall is allowing ingoing via port 1433.
The problem is, when I want to "Register":
First, I'm not sure that I enter the correct "Server" and "Database" names.
Second, I'm not sure whether I should use "SQL" or "Windows" Authentication
Third, how do I ensure that the Client Sync Agent has appropriate rights to the database?
Among alot of other trials, my best guess is:
Server " .\SQLEXPRESS"
Database "SiteSqlServer"
but still I get the following 2 error messages:
1) Unable to connect to the Database. PLease check if service account has connectivity, credentials and permissions to connect. Server: "XXX\SQLEXPRESS". Database: "SiteSqlServer".
2) Connection faild. Please check database credentials along with permissions for Microsoft SQL Data Sync Windows service logon account to connect to database with specified credentials.
Other reasons for failure:
Windows Azure SQL databases have to be added on the SQL Data Sync portal.
SQL Server databases lower than SQL Server 2005 SP2 are not supported on the SQL Data Sync.
I'm using: dotnetnuke CMS system and Microsoft webmatrix.
Any idea on how to proceed from here is warmly welcomed!
Thanks!
It seems you are trying to sync SQL Azure with SQL Express which is not supported and not tested. That's why when you try as described above you get that error. Based on my experiences there are issues using with SQL Express and SQL DataSync and SQL Express is not listed helow:
http://msdn.microsoft.com/en-us/library/windowsazure/hh456371.aspx
There are a few articles on internet where a few folks who went ahead and hacked the system to work with some vers'on of SQL Express so you are your own if you wish to try further. An article I found is here:

Reporting Services: Cannot connect to Oracle using Integrated Security

Context
I have an Oracle 11g database instance and a SQL Server 2012 instance installed on 2 different servers in the same domain. The Oracle database is configured to accept connection with Integrated Security (ie. Active Directory authentication). SQL Server has the Reporting Services feature installed and configured. Reporting Services will connect to Oracle database using the Oracle .NET data provider from Microsoft.
Issue
When creating a data connection to the database in Visual Studio I have no problem to connect to the Oracle database using Integrated Security. I configured the connection with this connection string:
Data Source=INSTANCE_NAME;Integrated Security=True;Unicode=True
But whenever I try to create a data source in Reporting Services from the SSRS website, from Report Builder or from BIDS, I am getting a login error:
ORA-01017: invalid username/password; logon denied
I tried copying the exact same connection string but the result is always the same. It looks like Reporting Services is ignoring the Integrated Security=True option for an unknown reason.
Notes
The same issue occurs with SQL Server 2008 R2.
Oracle .NET data provider from Oracle cannot be used with Reporting Services.
I finally found what was the problem. When you need to pass credentials that needs to be transmitted to another server (Client -> SSRS -> DB), the default authentication system (NTLM) won't be enough because it can't perform double hop authentication. You need to give the rights to the report server to delegate authentication through Kerberos on the DC. So that means that you also have to enable RSWindowsNegotiate as the default authentication system for your report server and that you define SPNs for SSRS and its service account.
More details can be found here: https://serverfault.com/q/378096/85935

Login error to database for Team Foundation Server 2010

I have installed Team Foundation Server 2010 (basic configuration) on a Windows Server 2003 without any problems. But when I go to administer the Team Foundation Server Administration Console, I get the error when in the press "Administer Security" or "Group Membership"
Server was Unable to process request. ---> Team Foundation services are not available from the server. Technical information (for administrator): The request colud note asking Processed Because the application is configured correctly note. No host service is available for the request.
If I try to go to http://localhost:8080/tfs, an I Get Runtime Error
In the Event Viewer I get following errors each time I try to do anything
Failue Aud - MSSQL$SQLEXPRESS - Login failed for user 'SAG-S01\ASPNET'. Reason: Failed to open the explicitly specified database. [CLIENT: ]
Error - TFS Services - Exception Message: TF246017: Team Foundation Server could not connect to the database. Verify that the server that is hosting the database is operational, and that network problems are not blocking communication with the server. (type DatabaseConnectionException)
You could start investigating by starting the SQL Server Management Studio and navigate to the SQLExpress instance on your data tier. See if the Tfs databases are running and whether the ASPNET user has access rights for the database.
Now I found where the problem was. It was set in the IIS server that TFS would run with .NET 1.1 instead of 4.0
It's weird. Can you check that you can access the database via Sql Server Management Studio.
If you can access with local system account or sa user; you have to deep dive form TFS - SQL Server connections. May be your user doesn't grant to connect SQL. Please try first, connect via Management Studio.

Resources