A connection cannot be made. Ensure that the server is running - olap-cube

When I am trying to process dimensions after creating a data source view I get the error:
The project could not be deployed to the 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.
I have checked in task manager & SQLBrowser is running. Why am I getting this error?

I was able to get the SQL Server instances on my computer this way:
Start Menu
Microsoft SQL Server 2008 or your version
Server Installation Center
Admin login
Select "Tools" from left menu
Select "Installed SQL Server features discovery report"
You then get a nice HTML web page. You want to look for Database Services. You should see an instance name. Mine is called "SQLEXPRESS." So the combination of server name and instance would be MYCOMPUTER\SQLEXPRESS given that my computer name is MYCOMPUTER.
BTW, the default instance name is MSSQLSERVER.
Alternatively, you can get it from your registry. Just run regedit and look for this key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL

Check that the SQL Server service itself (or MSSQLSERVER) is running. Also check the connection string.
If you want to deploy the project to a named instance of Analysis Services on the local computer, or to an instance on a remote server, change the Server property to the appropriate instance name, such as <InstanceName>.
https://learn.microsoft.com/en-us/analysis-services/multidimensional-tutorial/lesson-2-5-deploying-an-analysis-services-project?view=asallproducts-allversions
You need the server name and the instance name.

Open port 2382,2383 to server solve this issue for me.

Related

Deploying ASP.NET Core Web API to Azure - with Azure Key Vault and SQL Database dependency

I was able to deploy my Web API to Azure. I had to configure for 'Azure Key Vault', 'Azure SQL DB' and 'Microsoft Identity platform' before deployment as they were dependencies.
I configured Azure Key Vault and while configuring for SQL database, I selected the option to save connection string value in 'Azure Key Vault' instead of 'Azure app settings' (please see screenshot below).
When i press configure for 'Microsoft identify platform', the page shows loading symbol but never finshes and doesnt show any tenant id or details for configuration. Please see screenshot below.
So I had to ignore configuring Microsoft Identity Platform for now.
I was able to deploy the app to Azure, but when I try accessing the Azure endpoint, I get an error
HTTP ERROR 500 (Trouble retrieving data from database).
Log file message below while accessing the Azure endpoint:
An error occurred using the connection to database 'databasename' on server 'servername'.
An exception occurred while iterating over the results of a query for context type 'ItemApp.Infrastructure.Repository.ItemDBContext'.
Microsoft.Data.SqlClient.SqlException (0x80131904):
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...
Can anyone point where I am going wrong? Thanks in advance.
Check to see if your database engine can handle remote connections:
Start > All Programs > SQL Server 2005 > Configuration Tools > SQL
Server Surface Area Configuration
Click on Surface Area Configuration for Services and Connections
Select the instance that is having a problem > Database Engine >
Remote Connections
Enable local and remote connections
Restart instance
Check if your SQL server services is up and running properly:
Go to All Programs > Microsoft SQL Server 2008 > Configuration Tools > SQL
Server Configuration Manager > SQL Server Services
Check to make sure SQL Server service status is Running.
In addition, ensure that your remote server is in the same network.
Run sqlcmd -L to ascertain if your server is included in your network list.
You may need to create an exception on the firewall for the SQL Server instance and port you are using:
Start > Run > Firewall.cpl
Click on exceptions tab
Add sqlservr.exe (typically located in C:\Program Files
(x86)\Microsoft SQL Server\MSSQL.x\MSSQL\Bin, check your installs for
the actual folder path) and port (default is 1433)
Check your connection string as well
Please check the MSFT Document to troubleshoot the error: Here.

How do I connect to a SQL Server which is usually a machine I remote desktop into

Typically I remote into a machine with IP Address 00.00.00.00 and then I have an account in a domain, let's call it myspecialaccount\firstname.lastname.
Then I use Windows auth to connect to SQL Server instance for example:
ABCLACSQLC123\DEV04A
So my question is HOW can I connect from my laptop through SSMS directly to the machine (pending ports are open etc..)
In order to use Windows Authentication, you'd have to add the credentials you use to login to the laptop as a "Login" to the SQL Server. That can only be done if
You login to your laptop with a domain user and
The user is in the same domain in which your SQL Server instance resides
Otherwise, you have no choice but to use SQL Server Authentication.
In this case, you login to your laptop with a user in "Corp" domain, but SQL Server instance is in "Services" domain. So it won't work. Unless I think both domains are part of the same Forest.
Look at this answer : https://stackoverflow.com/a/1615431/3317709. There is no trick to login, unless you get rid of the "Network related..." error. If you are getting this error, SSMS is not even able to find your server let alone logging into it. Once you get "Login failed..." error, from that point, we can tinker and try to get thru using your windows auth.
Try creating a shortcut to runas.exe, pointing to SSMS.
C:\Windows\System32\runas.exe /netonly /user:myspecialaccount\firstname.lastname "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"
(The path to your SSMS exe may vary.)
When you double-click the shortcut, this will open up SSMS. You should then be able to connect to your instance (ABCLACSQLC123\DEV04A) as if it were on your local machine.
See here for more info on the runas command: https://technet.microsoft.com/en-us/library/cc771525.aspx
Install SQL Server Management Studio Express on your laptop. Microsoft has made the download link obscenely hard to find on their own site, but I did manage to find it here. Download the one for your system, probably x64.
Installation isn't much easier. Once everything is extracted, run the program, and switch to the installation tab, and choose "Standalone installation or add new features". Continue along the installation, and just install the management tools.
Once installed and running, use the Connect to Server dialog (it should open when you start the program, but if it doesn't, it's the first option under the File tab), and target wherever you want to connect (IP or server name should both work). If your laptop also authenticates to the same server that handles Windows authentication for your database, you can use Windows authentication, otherwise, you'll have to create a SQL Server account to use for login.

SQL Studio Management - How to run queries across multiple servers

My 2 server both use SQL Server 2008 R2
I have my local SQL server and also an Amazon machine running an instance of SQL-Server there.
I'm able to connect from my local machine to that Amazon SQL using the standard 10.10.10.10, 1433 connection from my local Management Studio.
What i need to do now is to run a query that says ..tells me what records I have locally that are not on the Amazon server right now.
Something like:
SELECT *
FROM [LOCAL].dbo.Table1
WHERE Field1 NOT IN
(SELECT Field1 FROM [AMAZON].Database1.dbo.Table1)
================================
Question:
I don't know how to write the "AMAZON" location on the Query window itself, since it's running on a different server.
Any help is truly appreciated !!!
You have to configure AMAZON Server as LINKED Server on your local machine. If you name it "AMAZON" - you query will work exactly as you wrote.
In SSMS, \Server Objects\Linked Servers. Right click, 'new linked server'. Name your server, and choose 'SQL server' radio button. Because I was authorized user on both machines with windows credentials, I selected 'Be made using the login's current security context' radio button under the security tab, and did not even have to fool with the local/remote user mappings.
In order to be able to run queries across multiples servers, a link (linked Server) must be established between the 2 Servers. To create a linked server,
Navigate to the Linked Server Sub-folder under the Server Object folders
Right Click on the Linked Server Folder
Click on New Linked Server
Supply the Connection Strings for the Server
Name your Linked Server.
You can now use the full object qualification (LinkedServer.Database.tableOwner.Table) to access the objects.
Good Luck !
You should open your registered server window and create a group for your servers. then you right click the group name and select new query (Or select several servers in that group). if you execute the query it will rung against the servers selected.

Visual Studio cannot process a dimension

I'm trying to create a cube using SQL Server 2008 R2. When I tried to process a dimension, this error occurred:
The project could not be deployed to the 'wasim-PC/Joker' 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.
I searched about a solution but I failed.
When you process a cube or dimension, its definition is first deployed to a server running SQL Server Analysis Services.
The error tells you that the deployment fails because it cannot find the service on 'wasim-PC/Joker'. I'm guessing this is your workstation. Make sure they analysis services service is installed and running on your local system. If you want to deploy to a different server, follow the steps specified in the error message.
I changed UAC Setting to "Never notify me" and every thing work well now! ( Windows 7 )

How to stop asking for the credentials while deploying reports in ssrs 2008

While deploying reports I am getting login prompt asking for the User Name and password. I have tried providing all possible id and passwords but no use. I can access both the Report manager url and ReportServer url but if I start deploying reports through SQL Server Business Intelligence development studio I am getting the above mentioned prompt. Please let me know how to avoid this.
Make sure that the server on which you are trying to deploy the Reports, you must be under the group which has the following Role assigned.
Browser, ContentManager and Publisher.
goto Start menu ->Microsoft SQL Server 2008->Configuration tools ->select Reporting services configuration manager ->Connect Report server ->Select Database from the left side options -> Current Report server Database -> Click Change Database ->Choose Existing server Database ->Test the connection ->Next -> Select Report Server as Report server Database.
And goto Select Database from the left side options -> "Current Report server Database Credentials" ->select Authentication type as integrated security and Test connection -> select Authentication type as Service credentials.
I hope it will resolve the problems
Best verification is to make sure you are deploying the new reports to your report server link. And not to the link which corresponds to the report manager. I was running across the process of deploying reports after ages, and I observed this problem when the report server target link is not correct.
I use VM for SSRS development.. and it's not a member of the domain where the SSRS Service lives.
I was able to easily eliminate prompts when deploying reports.. by setting up a LOCAL user account on the SSRS server that used the same username / password as what I was using in my VM.
I had the same issue, but this worked for me: When deploying from SQL Server Business Intelligence Development Studio, you must be running it as Administrator. ie. Right-Click and select 'Run as Administrator'.
This is possibly because if you are not running it with elevated privileges, then it can't do the Impersonation to login to the server.
Using web services URL in TargetServerURL instead of Report Manager URL.
Goto Reporting services configuration manager, connect SSRS server then go to "Web service URL" in right hand side you will find a link like as http://server//reportingServer. Copy the url.
Now open Business Intelligence Development Studio. open SSRS project.
Goto Project menu and click on properties, in property page Paste copied URL in TargetServerURL. Now Rebuild the project and Deploy. Credential will not appear and Deploy succeeded.
When moving (deploying or copying) an RDL file from one location (development) to another (production) the report may loose track of it's shared data source, at which point the data set will replace the original node with a new node that instructs SSRS to demand credentials.
In the report that is persistently demanding credentials if you right-click in solution explorer and select 'view code' the .rdl will open in an xml reader window. If your mark up contains a reference that looks like:
<DataSources>
<DataSource Name="YourDataSourceName">
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>Data Source=<i>your-server</i>;Initial Catalog=<i>your-db-name</i> </ConnectString>
<Prompt><b>Enter a user name and password to access the data source:</b></Prompt>
</ConnectionProperties>
<rd:SecurityType>DataBase</rd:SecurityType>
<rd:DataSourceID>e2f9f97c-GUID-GOES-HERE-395c383c1da2</rd:DataSourceID>
</DataSource>
</DataSources>
If this is what you find in the xml/rdl this is likely your problem.
Make sure you have a Shared Data Source that works as expected, you may have to build a new report based off of this that does not prompt for credentials.
In a report that does NOT ask for credentials, open the RDL using 'view code' option.
Select the relevant xml node (under ) and copy the node, it should look something like:
<DataSource Name="YourDataSourceName">
<DataSourceReference>YourDataSourceName</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>19f0a78a-<b>GUID-GOES-HERE</b>-0e277b3b153f</rd:DataSourceID>
</DataSource>
In your target report replace the node with the one you copied.
(worth noting that when you change the 'rd:SecurityType' from 'Database' to 'None' you are NOT removing security, you are merely passing responsiblity for authentication from the report's dataset on to the shared datasource. (Security is born by the connection rather than the query)
I had the same problem, it was due to the wrong spelling of the TargetServerUrl in report project properties, make sure that it meet the same name in the Report Server Configuration Manager: