Problems deploying a SSAS cube in Azure - azure

I am having problems deploying a ssas cube in Azure. I have designed a cube in SSDT.
The structure of the cube is correct and I can access to the database placed in azure machine
from my local laptop.My SSDT project is created in my local laptop. I have tried ti deploy to azure machine and
get the following error;
"The project could not be deployed to the 'mbitsql.westeurope.cloudapp.azure.com' server because of the following connectivity problems :
A connection cannot be made. Ensure that the server is running.To
verify or update the name of the target server, right-click on the
project in Solution Explorer, select Project Properties, click on the
Deployment tab, and then enter the name of the server."
These are my tests or checks:
The cube is correct generated, the error is in deployment
I can access to Azure sql server database succesfuly, the problem is with the analysis services.
I have checked the server name in the implementation propierties, I have tested with DNS name
and with IP.
I have checked to access Analysis services from the ssms of Azure and I can access. I have
checked that analysis services and sql browser services are running (both local account)
I have created security input rules ion azure to allow access to 2382 port
I don't know where is the problem.... I use SQL Server 2016 y SSDT 2015
There is something, that I don't understand, I have given an user/pass in the datasource to access
to sql server azure database, but in the project there isn't a place to put the user/pass for SSAS.
I don't understand this, because if you log from SSMS you always put a user/pass for both (sql server database and ssas)

Did you open 2382 or 2383? 2383 is correct unless you customized the SSAS port.
Is the Azure VM domain joined? If you are logged into your laptop as MYDOMAIN\juan do you use that same user to Remote Desktop to the VM? If not close and open SSDT with:
runas /netonly /user:mbitsql\vmUserName "c:\pathTo\devenv.exe" so that SSDT can authenticate with the VM when you deploy.

Related

Azure Data Studio - way to change default connection type for Azure SQL Databases?

I just recently started to use Azure Data Studio to replace SSMS and VS Code. So far it is working great. I do have one "issue" I was wondering if anyone else encounters. I run the application with my Azure AD Admin. Under Connections I see all of my subscriptions and the underlying databases:
When I try to expand a server, I get an error that it is trying to connect with a SQL account:
It then brings up the connection details where it is set to use SQL Authentication:
If I change the Authentication type to Azure Active Directory - Universal with MFA support, and click connect it does without issue.
My question is, is there a way to change what the server connection uses as a default so I don't have to try to expand, fail, change auth type, and then connect? It is nice not having to manually create all of the connections to all of our subscriptions and sql servers and just have them load there and open them.
I searched all the settings of Azure data studio, but did not find the option to change the default authentication type of login Azure SQL.
User and workspace setttings of Azure data studio, you can refrence this document.
You can click the power plug icon in the right and then choose Authentication type to login to the server.

How can I deploy my database from SQL Server 2008 Express to Azure SQL Database

I am using Visual Studio Community 2013, SQL Server 2008 R2 Express Edition for an MVC web application using entity framework code first migrations for my database.
I am trying to get my local application hosted on the Microsoft Azure platform.
I have registered for a trial account which expires in 30 days, and deployed my MVC5 app out which has been successful.
However, this app requires a database which I am struggling to deploy.
What is the easiest way to get my database deployed out to Azure as I do not seem to have the :
"Tasks" -> "Deploy Database to Microsoft Azure SQL Database" option available to me in SSMS.
I have extracted a Data-tier Application of my local database and have it stored on my C drive, however if I connect to my Azure Account in a second window, and right click the server then select Deploy Data-tier Application, it fails on "Creating schema object in database" with the following error:
TITLE: Microsoft SQL Server Management Studio
An exception occurred while executing a Transact-SQL statement or
batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------ ADDITIONAL INFORMATION:
Users cannot be mapped to certificates, asymmetric keys, or Windows
logins in this version of SQL Server. (Microsoft SQL Server, Error:
40528)
I'm assuming its tried to create my local account plus the IIS APPPOOL account I had to set up to host the website on my local network, however I do not see a way of removing them from the .dacpac export.
When I refresh the Databases node, there is still no database, I'm fairly lost now as to how I might get my db deployed to this server?
If you can extract a compatible Data-tier application and then Deploy it to your target server using your current version of Management studio, then this approach should work, see this link for more reading on ensuring your database is compatible.
Failing this, as was in my case. I downloaded Management Studio 2015, which gave me the option to deploy database to Azure by simply right clicking the required database.
Again, this threw up the error regarding my database level IISAPPOOL user, but not my server account user. As a way around this, I took a backup/restore of the database and removed this user then deployed the copy database obviously minus the problem account.
Now all that was left to do was add a transform to my Release web.config with the Azure connection string as provided on the Azure dashboard, and re-deploy the website.
Problem solved.

Unable to connect to azure sql server

I created a new Azure Mobile App and set up my Sql Server database with it. I use an email address as the username, and then assigned a password.
Once the Mobile App and the Sql Server db setup completed, I was able to get my iOS app to target it and use the Azure authentication services without any issue. I then inserted some data in to a table in the iOS app, without any errors.
Now, I want to open the database and verify the data. Anytime I try to connect to the server using SSMS or Visual Studio 2015, I am told that the login failed.
I use an email address like Johnathon#MyCompany.com. When the sign-in fails, it says:
Login failed for user 'Johnathon'.
Is it the email address for a login causing issues? My ISP blocks port 1433, so I thought that maybe that was the issue initially. So instead of using VS or SSMS, I moved to the web-designer on the Azure portal. When I sign in there, I receive the same error. This has occured across three different App Services setups. I tried using the older Mobile Services, and had this issue. I then moved to the newly released Mobile App Service but have the same issue. Each time I deleted the database and recreated it and the server.
I have also added my client IP to the azure sql server firewall.
I'm at a loss at this point.
Update
I have managed to sign in to the server within the Azure portal designer by omitting the database name. However, when I select the Design option, and then click the Design button on the database, I receive a Failed to create context error. I assume this is related to why I can't connect to the server when I specify a database name in the Azure portal.
As a note, having the # symbol in the SQL Azure login tends to cause a number of headaches and it is not recommended to have it in there. What you will notice is that SSMS and other applications try to use it as part of the server name which then causes context and other failures.
The easiest fix for this is to roll up another SQL Azure server with a login name that doesn't use the # symbol, you will have a better experience overall.

Creating a Base VM Image with SQL on Azure

We would like to utilize Azure VM's to do some testing on one of our applications. The application runs on Windows Server and uses a SQL DB. We would like to get everything setup on a base VM image and then have the ability to use this base image to create multiple VM's that could be used for various testing.
The part that I'm struggling with is in regards to SQL. If I start up a Windows 2008R2 VM with SQL 2012 SP1 Web and get everything setup on that VM and then run sysprep, when I fire up a VM based on that base image I have issues with SQL (logging in with Window auth for example). Do I need to be using a SQL Server login instead of using Windows Auth?
Is there a step I'm missing when sysprepping the base image for getting SQL setup/configured to be a base image?
Thanks for the help.
The issue is that When SQL is installed, Azure gives the user who is provisoning the VM admin access to SQL
When a VM is created from an Image, SQL is already installed with Image admin and still has the same.
As a workaround start the sql server in single user mode, login and then add the required logins to the sql server.

EF 4.1 CF + Azure: CREATE DATABASE permission denied in database 'master'

I have an ASP.NET WebForms application which uses EF 4.1 Codefirst.
Running my application the first time creates a new database, tables etc.
Everything has been working fine so far.
But after adding my application as a WebRole to an Azure Project I got an error message when I first hit the database (CREATE DATABASE permission denied in database 'master').
Obviously it makes a difference if I start my application inside the VS Development Webserver or inside the Azure Emulator.
Here is some additional information which I believe could be relevant:
The database does NOT exist when I run the application
Visual Studio 2010 run as Administrator
Trust level of my web role: Full trust
SQL Server service (MS SQL 2008 R2 Express) is up and running
The connection string in my web.config looks like this:
<add name="dbContext" connectionString="server=(local)\SQLEXPRESS;database=myDB;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
I also tried using a real user instead of "integrated security". And that user had all possible database roles assigned, including sysadmin, serveradmin etc.
How I can I grant the necessary permissions to my application in order to allow creating a database while running inside the Azure emulator?
Thanks so much for your help!
Azure emulator runs with the credentials of "Network Service" account. You need to add credentials for "Network Service" account on master database.

Resources