How to create Tabular Project for Analysis Services using REMOTE workspace server - ssas

I am trying to create a Visual Studio SSAS Tabular project connecting to a remote workspace server without success. I have no problem creating and deploying using localhost.
However I need the remote server to deploy to production or shared development server. I get error: "Cannot deploy model to the deployment database server 'xxxx.cloudapp.net'. Reason: You are not an Administrator on the deployment database server 'xxxx.cloudapp.net'."
I know I am reaching the server as otherwise the error is about not connecting to the server. I am already running Visual Studio as mydomain\adminuser and added it to the Analysis Server to make it administrator. However I am still getting that error. I can also connect remotely to the Analysis Server in Management Studio using that same user.
All the examples I've seen use localhost but have not found any using a shared/remote server even though some say it is possible without showing how. By the way, I understand using a local instance is better for development but I still need to deploy to a remote server. Hope that makes sense. Please help.

I ran into the same issue when trying to deploy a SSAS Tabular model remotely. The corresponding MSFT docs further even discourages to deploy to production via Visual Studio.
But, a viable alternative is to deploy via XMLA:
Create your SSAS Tabular Model in Visual Studio and use your local SSAS instance for your workspace database
Launch SSMS connecting to your local SSAS instance
Right-click on your workspace database, and select Script > Script Database As > CREATE to > File
Open the generated XMLA file, and a) replace the temporary workspace database name with the database name on the deployment server, and b) search for the database connection string and re-add the password (see the note here)
Launch SSMS connecting to your deployment SSAS instance
Open the XMLA file, and Execute it (by pressing F5)
Refresh the list of databases, right-click on the new one, and select Process Database
In case you already have a deployed database, then you need to select the ALTER to option instead of CREATE to in step 3 above.

Related

SSDT failing to publish: "Unable to connect to master or target server"

I'm attempting to use SSDT to publish to a SQL Server database in Azure. When I do so, I am seeing the following error:
Unable to connect to master or target server 'DATABASE_NAME'. You must have a user with the same password in master or target server 'DATABASE_NAME'.
Ignoring the fact that it's listing a database name as the server name in the error, I'm not sure how to resolve it. When I specify the target database, I can successfully Test Connection. I can also connect using the same creds to the database through SSMS.
After researching the error, it seems like it is often that the firewall for the database in Azure does not include the IP address of the machine you're publishing from. It not only contains my IP, but I added another firewall rule to allow every IP (0.0.0.0-255.255.255.255) to eliminate the firewall as a potential cause of the problem.
Any ideas?
This is a known issue. This happens due to the new compatibility level 140 for newly created SQL Azure databases. The issue has been documented here and updating SSDT from here to the latest version may solve the issue.
Alternatively, you can change the compatibility level of your database to 130.
ALTER DATABASE database_name
SET COMPATIBILITY_LEVEL = 130;
Hope this helps.
Initializing deployment (Start)
Initializing deployment (Failed)
*** Could not deploy package.
Unable to connect to master or target server 'DbName'. You must have a user with the same password in master or target server 'DbName'.
Issue occurred while deploying build through VisualStudio-2015 and it support to publish database on the database servers whose version up to only 2016.
Solution: For SQL server 2017 we need to Publish Database with Visual Studia 2017 only. Need to upgrade SSDT.
Faced same issue when trying to deploy a DB from local SQL Server to Azure SQL DB via SSMS.
Tried to alter source DB's compatibility level to 130, still got same error.
Tried to add same user logins to master DB, no help.
Eventually, started looking for other approaches. Succeeded by using Data Migration Assistant, as instructed in https://learn.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate.
My situation was slightly different in that I had exported an Azure database (with compat level 140) from SQL Azure and then tried to import it into a local SQL Server 2017 installation - using the latest SSMS 2017 that I just installed yesterday - and still got this message.
Turned out that although I did have latest SSMS installed, I was actually opening SSMS 2016 by mistake! So be sure to select and pin the correct version to avoid it happening again. Just typing 'SSMS' into the Windows Start menu may not show both.
So if you use SSMS to import you only need the latest version, and no separate tools.
Footnote: Even after opening the correct SSMS version I got another error - something about contained databases.
An Azure database is a 'contained' database (or at least mine was) - meaning that its user logins are embedded in the database. This isn't enabled by default apparently in standard SQL Server 2017.
After running this in the local SQL in master I was able to import it successfully.
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO
When this happened to me it was due to the version of tools I was using. I thought it strange that the most recent SqlPackage.exe I found in C:\Program Files (x86)\Microsoft SQL Server didn't work and publishing from visual studio did, so I found the most recent
under the visual studio directories:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150\SqlPackage.exe
* to publish to a SQL Server database in Azure*, you can use "Data Migration Assistant" (DMA).
I just tried it and it works smoothly without any issues (firewall and compatibility level)
please refer to this link SQL Server database migration to Azure SQL Database
for step by step: 10. How to migrate the SQL database to Azure with the Azure Database Migration Service
I got the same error while trying to update a local SQL Server database from Visual Studio database project (i.e. not i Azure). Turns out the problem was I was running SSDT for Visual Studio 2017 while using Visual Studio 2015. Visual Studio discovered an updated version of SSDT (just happened to see it in notifications!), pointing to the right Visual Studio version. Now it works!
My setup: BizTalk Server 2016 forces me to use Visual Studio 2015. My local database is on SQL Server 2017. Using SSDT for Visual Studio 2015 works for updating databases in SQL Server 2017. Just so you know. ;)
Most of the sources recommend to set COMPATIBILITY_LEVEL = 130; and, usually, it solves the issue. Unfortunately, this did not help me.
In my case, I had to downgrade SQL Server 2017 on my machine to SQL Server 2016 Developer Edition.
I ended up having to install DacFramework.msi on the SQL server that my azure runner agent was installed to get past this error. My server is a VM running in our network. not running in azure...
the description on the msi says:
'This installer database contains the logic and data required to install Microsoft SQL Server Data-Tier Application Framework (x64).'
Try to connect to the SQL Azure database using Sql Server Management Studio and the ip getting listed in the management studio is the right ip address. Try to add to the SQL Azure firewall rules. The ip address listed in the firewall page of Sql Azure portal is not accurate.

VB.NET Creating a local database in VS2013 or in SQL Server Management Studio

I am about to begin a personal project to build my skills in the .net environment. I am familiar with SQL Server Management Studio and how to create a database in it but I discovered how to make a local database in Visual Studio as well. My program is only going to require local database access as it will be used for individual inventory systems rather than connected ones. Am I ok to use the onboard tools in visual studio and create a local databasse or should I be using the SQL Server Management Studio?
When you use the Local Database item template in VS, it creates a SQL Server CE data file (SDF) and adds it to your project. When you use the Service-based Database item templete, it creates a SQL Server (Express) data file (MDF) and adds it to your project.
The advantage of using the VS tools is that the data file becomes part of your project and can therefore be easily deployed with the compiled application. As such, the database is basically part of the application.
If you choose SQL Server CE then you don't need a server installed on the user's local machine. They can install SQL Server CE or you can install it with your app if you want, but you also have the option of simply deploying a DLL with your app and it will work.
If you choose SQL Server Express then the user actually needs a SQL Server instance installed on their machine. To be honest, I'm not 100% sure whether that instance must be SQL Server Express or it can be a full SQL Server instance too. It would usually be SQL Server Express though, which you can install and even download automatically when you install your app, depending on the deployment method you choose.
If you use the VS tools to create an MDF data file then your connection string will contain the Data Source and AttachDbFilename attributes. The Data Source will generally be ".\SQLExpress", i.e. an instance named "SQLExpress" on the local machine. That instance name is not required, although it is the default for SQL Server Express, but it must be on the local machine. The MDF file gets attached at run time and detached again when you're app is done with it. It will also usually be attached to a user instance, which means that other users can't see it, even when it's attached. Note that, in later versions, the LocalDB feature of SQL Server may also be utilised.
If you create your database in Management Studio then it's not actually part of your app. It will be permanently attached to the SQL Server instance so, everyone will be able to see it and open it, assuming permissions allow. Creating the database during deployment will be an extra step in that case. You might create a backup and restore that during deployment or generate SQL scripts that get run. In this case, your connection string will contain the Initial Catalog attribute to specify the name of database to connect to, as well as the Data Source attribute. This option is required if you want multiple clients to be able to connect to the database.
In short, if you are only going to be accessing a database from the local instance of the one application then creating a database in VS is OK and probably a good idea. Whether you choose SQL Server CE or SQL Server Express may well depend on what level of functionality you need.

SQL Server Data Tools on Azure VM

I created a VM using the gallery image, and got SQL server 2014 Standard template and got reporting services working correctly. My questions here are all about the Azure VM image, which I'm sure the community is using as well (no SSRS in Azure other than using a VM)
ReportBuilder however will not start from a remote client (401 unauthorized), and I'm sure I have to open another port or something to get it working but I can't seem to find the right article....
I'm also told that SQL Server Data Tools (SSDT) is installed on the server, in order to create reports via Visual Studio. However, I can't seem to find the right link on the server (damn this new Server 2014 interface! hard to loose the muscle memory of the previous os) What is the start up procedure for SSDT on the VM?
I've also tried using the Browser directly on the VM, but without JavaScript enabled, that wont' work as well. How do I drop (temp) all the constraints it's under?
In essence, how do you create a report on the Azure VM?
If you can access the report server from a browser in a remote client, for example, yourazurevm.cloudapp.net/reportserver, then you have already configured firewall correctly. Otherwise, refer to this article (http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-provision-sql-server/#SSMS) to configure Azure SQL VM.
To create reports using ReportBuilder, install the standalone version of the ReportBuilder 3.0 from http://www.microsoft.com/en-us/download/details.aspx?id=6116. After you launch the ReportBuilder, you can configure it to connect to your Azure SQL report server in the lower left corner.
To create reports using Visual Studio and SQL Server Data Tools (SSDT), install SSDT-BI (not just SSDT) in the client where Visual Studio is installed. Then create a Report Server Project by going to File->New->Project->Installed->Templates->Business Intelligence->Reporting Services. Open the properties of the project, and set the Target Server URL to your Azure SQL report server.

copying reports from a reporting database to antoher

I am a total newbie in SQL/SQL server stuff, and I am using SSRS to make a new reporting server/service and upload some .rdl files to it
I have a reporting server on a machine, which has a lot of reports and data sources uploaded to it's database.
I created a new reporting server with a fresh database on another machine, and what I want to do is to copy the old database content to the fresh one (the reports and the datasources..etc)
I have no copy of the individual reports to upload them to the new server using localhost/reports
is there's a fast solution to what i am having? please do it in detail because I never worked with SQL before.
Different ways to do this:
Report Server Databases
Use the detach/attach or backup/restore instructions here. Both of these methods require a backup of encryption keys on the existing instance, which are then restored to the new report server instance. Instructions on backup/restore of encryption keys here. Migrating the ReportServer and ReportServerTempdb databases is the easiest way to ensure all content is available on the new server.
Report Object Scripting
Reporting Services Scripter is an older (but still working with SSRS 2008R2, not sure about 2012) tool that can be used to transfer objects (folders, shared data sources, shared data sets, reports, etc) between report servers. Good choice if you want to pick and choose what is migrated.
If you are receiving an error regarding unsupported scale-out deployment, this means you are running Standard edition and need to remove the old report server entry from the database in the new location. It can be done using Reporting Services Configuration Manager, or by using rskeymgmt at command line.
Reporting Services Configuration Manager
Open Reporting Services Configuration Manager and connect to the new report server instance.
Click on Scale-out Deployment to view registered report servers.
Select the old report server instance and click the Remove Server button.
Command line and rskeymgmt
Browse to the Tools\Binn folder of your SQL Server client installation.
Run the following to list registered report servers
rskeymgmt -l -i
Using the installation ID (GUID) of the old report server, remove it
rskeymgmt -r -i
More info on scale-out deployments and rskeymgmt here.
To migrate Reporting Services, use migration manual from MSDN (https://msdn.microsoft.com/en-us/library/ms143724(v=sql.120).aspx). If you encounter "the feature: scale-out deployment is not supported in this edition of reporting services. (rsoperation notsupported)" error, go to ReportServer database and remove the old encryption key from table dbo.Keys.

OLAP Cube deployment issues

I'm really new to this, so I am probably making a simple mistake.
I need to make an OLAP cube using a remote database.
After I set up the dimensions and measures and create the cube, I can not get the cube to launch to the local server.
I keep getting the error,
"The project could not be deployed to the 'localhost' 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."
However, the local SQL server is running(from as far as I can tell), and I have no idea on how to go about fixing this. I've tried replacing "localhost" with "." and the IP, but that hasn't worked either.
Here's the guide I was following:
http://www.mssqltips.com/sqlservertip/1532/build-a-cube-from-an-existing-data-source-using-sql-server-analysis-services/
Maybe the SQL Server isn't really running? How can I check?
Or am I skipping over something important when I try to process the cube?
you need to deploy the cube to a SSAS instance. See here I have the SQL Server instance and the SSAS instance (check the icon to see the difference):
you can check if you have it running on the services:
if you dont have it, yo ucan install from the sql server installation CD
You need to change the target Server name as the remote sql server name or ip.
In BIDS right click on your project solution and select properties window. There you can give the server name as given below figure.
Hope it helps...
OLAP cubes will not deploy to a SQL server instance. They must be deployed to an Analysis Services instance. It will be listed as 'SQL Server Analysis Services' in your service list.
This is what solved it for me:
Copy the connection from the MSSQL Server Management Studio:
Project > Properties > Deployment > Paste:
"localhost" refers to the machine you are running the Business Intelligence Studio from.
You say you want to deploy to a remote server, so replace localhost with the server name or the ip address (e.g. "74.125.237.146")
to deploy a cube AS you need an SQL instance as source, and an SSAS instance as destination.
regards,
I got the same error while following that tutorial. I solved it by:
Double Clicking the Project Data Source
In the Impersonation Information Tab, I entered the credentials for the Windows user instead of using the service account.
Make sure you have the proper Server\Instance name instead of local host in the project deployment server.
One more reason can be Express version of SQL Server. Only standard version has Analysis Service.
In Microsoft SQL server go to registered servers and click on:
Analysis services icon -> open local server groups
Click right on your username for the server and
service control -> start
It will work ;)