How to create a sql server connection in mobile report publisher - sql-server

I did a fresh install of SQL 2016 RC1. Report Builder works (for paginated reports). But I can't get the Mobile Report Publisher to create a connection to from my laptop to the sql instance. When I try to connect to the server I get a "Server Error" Unable to connect to remote server. I'm running the latest preview 3 of mobile publisher. I've tried server/reportserver & server/reports for a server address, no luck. I get a different error if I uncheck the option to use a secure connection.
Any ideas?

Ok, so, the reports_preview is gone. And after lots of trial and error, the url needs to include the port:
sqlrpt16-1:80/Reports/
I had to uncheck the Use secure connection option, which probably uses https, which i didn't configure during setup.

please try connecting to the new portal url : /reports_preview.
Hope that helps!

Related

ASP.NET Core Web Api publishing to IIS producing an Sql Server connection error

I've created a simple web api in asp.net core 2.0 which uses localdb as the backing datastore. It works completely as expected in debug - I'm able to send requests from postman (or browser) and step through my code. Here is my connection string:
"Server=(localdb)\\MSSQLLocalDB;Database=UniversityDatabase;Trusted_Connection=True;MultipleActiveResultSets=true"
I now want this to be running constantly so that I can consume it from a Xamarin.Forms project so I have tried publishing the web app using the Visual studio wizard.
1.
2.
UniversityApi then appears in IIS under Default Web Site but not as an application. I choose to 'Convert to Application' which shows me this dialog:
3.
The NetCoreApps Application Pool uses No Managed Code.
Error:
{
"error": [
"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. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.\r\n)"
]}
The error seems to describe a problem with connecting to my Sql Server instance which is strange because it works perfectly while debugging in VS. Any ideas?
After searching for a while I stumbled onto this question:
SQL won't connect after deploying
One of the answers did the trick for me, credit to Robotron.
IIS Manager
Application Pools
Find the pool your app belongs to (for me it was .NET v4.5)
Right click -> Advanced Settings
Scroll down to Identity
Change from whatever (for me it was ApplicationPoolIdentity, same as you have) into LocalSystem.
Add the "LOCAL SERVICE"(Windows account) to SQL Server.
Change from "ApplicationPoolIdentity" to "LocalService" in (IIS Application Pools Advanced Settings)
NOTE. ADD "LOCAL SERVICE"(Windows account) need Permission into SQL Server.
Thanks a lot for the answers. I have similar problem. My .net core web api is hosted in AWS. It was working before when I was just accessing the api via ip address (sample https://xx.xx.xxxx/swagger) but when I integrated it to domain (https://xx.sampledomain.com/swagger) I ran into the same problem. These two steps solved the error.
1st I used the LocalService account for IIS Application Pool, then added the NT Authority/Local Service account in the MS SQL Server 2016.
enter image description here
On the Publish screen > Database > DefaultConnection, I ticked on the 'Use this connection string at runtime' checkbox.
enter image description here

Can't connect Analysis service in Excel

I'm trying to connect to Analysis service by Clicking on DATA > From Other Sources > From Analysis Service but then error shows up. It's telling me that I have typed wrong server name. But connect to Database engine is fine, how do I do it ? Please help, this will be very helpful.
PS. I'm using SQL Server 2012 with tools. I use the same server name with database engine.
If the server is installed locally you can try using "localhost" or just a simple dot ".". Make sure to connect to SSAS using SSMS and check in Properties > Security what are the users allowed to connect.
If you have multiple instances installed on the same machine then make sure you use the correct name with domain included: Domain\InstanceName
Another option is to check using the SQL Server Configuration Manager what are the network protocols activated.

SQL Server 2012 SSDT "The project could not be deployed to .... A connection cannot be made ...."

I'm a newbie to SQL Server 2012. Here is my condition.
I have a running SQL Server 2012 Business Intelligence SP1. The problem is I cannot deploy a project to my SSAS from another computer.
The error is:
The project could not be deployed to the 'DATABASE-SERVER\MSSQLSERVER' server because of the following connectivity problems : A connection cannot be made to redirector. Ensure that 'SQL Browser' service 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.
The following is the things that I've tried:
Check the target name on Project > Properties > Deployment > Target server.
Check the server service --> all SQL Server services are running.
The project can be deployed from server.
The connection to server is clear
I can connect to the Database Engine and Analysis Service from another computer from SQL Server Management Studio.
Please help me to fix this problem, I've been search for many days for this problem.
Thank you, sorry for my bad english.
Best regards, Stella.
I had the same problem, for me the solution was to explicitly specify login information on the Impersonation Information tab on the Data Source.
I know this is an old thread, but I had the same issue and I reckon more will run into this buzz saw.
My problem was that the remote installation of SSAS did not have an Inbound firewall rule for SSAS application; msmdsrv.exe.
Resolution:
Log on to the server running SSAS as Administrator
Launch Windows Firewall and advanced Security
Add Inbound Rule, give it a meaningful name like SQL Server - SSAS
Action: Allow the connection
On Program and Services Tab: For 'This Program' use Browse and identify msmdsrv.exe
For SQL Server 2014, it is by default here:
%ProgramFiles%\Microsoft SQL Server\MSAS12.SQLSVR14\OLAP\bin\msmdsrv.exe
(Very similar for 2012 and 2016, the numbers are different)
Click OK; You should see a green dot with check mark
Try your project again; It should connect, did for me.
NOTE: If this also work for you, consider going back to the Inbound Rule and consider adding connection restrictions for security reasons.
I solved mine by right clicking my data source (under Data Sources in Solution Explorer) → Edit in the General tab → In Connection Manager, do two things:
Change Server name from localhost to your computer name
Use SQL Server Authentication as Authentication, as opposed to Windows Authentication, and proceed to enter your user name and password (the "sa" password you use for SSMS).

Unable to connect to SQL Server instance remotely

I’m trying to access the SQL Server instance on my VPS from SQL Server Management Studio on my local machine. It’s not working (the error I’m getting is:
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.
I think this is because I need to configure the database engine to allow remote connections (correct me if I’m wrong!). So I’ve found this step-by-step guide to help me do that: http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/ I’ve got to point 10 in the guide and I am now stuck! I don’t have SQL Server Management Studio installed on my VPS. Anyway, this has left me with two options:
Install SSMS
Find another way to do point 10 onwards in the guide without having SSMS installed
I tried installing SSMS on my VPS using the Web Platform Installer but it keeps failing. I don’t know why it’s failing because it doesn’t seem to give a reason why. Does anyone know how I could allow remote connections a different way?
The version of SQL Server installed on my VPS is SQL Server 2008 R2 Express.
Update:
I have tried to disable the firewall on both my laptop and VPS to see if it is a firewall issue. This made no difference to the error message.
Another Update:
Having now been able to install SSMS (I installed directly from the website rather than using the WPI), I have been able to check that the server is configured to allow remote connections (I went to SSMS, connected to the SQL Server instance, right-clicked on the connection, clicked Properties, went to the Connections tab. "Allow remote connections to this server" is already ticked).
SOLUTION
Thanks to everyone for helping me get to this solution! I've finally managed to get it to work! I followed Filip De Vos's advice and opened the ports in the Firewall on my VPS and then I received a different error message. This led me to investigate further and I found that I was using the wrong credentials to login! So I've set a password for the sa user and I've managed to login using that! Thanks again!
To enable mixed authentication you can change the following registry key:
HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\LoginMode
Update the value to 2 and restart the Sql Server service to allow mixed authentication. Note that MSSQL.1 might need to be updated to reflect the number of the SQL Server Instance you are attempting to change.
A reason for connection errors can be a virus scanner installed on the server which blocks sqlserver.exe.
Another reason can be that the SQL Server Browser service is not running. When this service is not running you cannot connect on named instances (when they are using dynamic ports).
It is also possible that Sql Server is not setup to listen to TCP connections and only allows named pipes.
In the Start Menu, open Programs > Microsoft SQL Server 2008 >
Configuration Tools > SQL Server Surface Area Configuration
In the Surface Area Configuration utility, click the link "SQL Server
Configuration Manager"
Expand "SQL Server Network Configuration" and
select Protocols.
Enable TCP/IP. If you need Named Pipes, then you can
enable them here as well.
Last but not least, the Windows firewall needs to allow connections to SQL Server
Add an exception for sqlserver.exe when you use the "Dynamic Port" system.
Otherwise you can put exceptions for the SQL Server ports (default port 1433)
Also add an exception for the SQL Server Browser. (udp port 1434)
More information:
How to: Configure a Windows Firewall for Database Engine Access
Server Connectivity How-to Topics (Database Engine)
As a last note, SqlLocalDB only supports named pipes, so you can not connect to it over the network.
In addition to configuring the SQL Server Browser service in Services.msc to Automatic, and starting the service, I had to enable TCP/IP in: SQL Server Configuration Manager | SQL Server Network Configuration | Protocols for [INSTANCE NAME] | TCP/IP
Launch SQL Server Configuration Manager on your VPS.
Take a look at the SQL Server Network Configuration. Make sure that TCP/IP is enabled.
Next look at SQL Server Services. Make sure that SQL Server Browser is running.
Restart the service for your instance of SQL Server.
Open the SQL Server Configuration Manager....
2.Check wheather TCP and UDP are running or not....
3.If not running , Please enable them and also check the SQL Server Browser is running or not.If not running turn it on.....
Next you have to check which ports TCP and UDP is using. You have to open those ports from your windows firewall.....
5.Click here to see the steps to open a specific port in windows firewall....
Now SQL Server is ready to access over LAN.......
If you wan to access it remotely (over internet) , you have to do another job that is 'Port Forwarding'. You have open the ports TCP and UDP is using in SQL Server on your router. Now the configuration of routers are different. If you give me the details of your router (i. e name of the company and version ) , I can show you the steps how to forward a specific port.
I had the same issue where my firewall was configured properly, TCP/IP was enabled in SQL Server Configuration Manager but I still could not access my SQL database from outside the computer hosting it. I found the solution was SQL Server Browser was disabled by default in Services (and no option was available to enable it in SQL Server Configuration Manager).
I enabled it by Control Panel > Administrative Tools > Services then double click on SQL Server Browser. In the General tab set the startup type to Automatic using the drop down list. Then go back into SQL Server Configuration Manager and check that the SQL Server Browser is enabled. Hope this helps.
Disable the firewall and try to connect.
If that works, then enable the firewall and
Windows Defender Firewall -> Advanced Settings -> Inbound Rules(Right Click) -> New Rules -> Port -> Allow Port 1433 (Public and Private) -> Add
Do the same for Outbound Rules.
Then Try again.
I recently upgraded from SQL 2008 R2 to SQL 2012 and had a similar issue. The problem was the firewall, but more specifically the firewall rule for SQL SERVER. The custom rule was pointed to the prior version of SQL Server. Try this, open Windows Firewall>Advanced setting. Find the SQL Server Rule (it may have a custom name). Right-Click and go to properties, then Programs and Services Tab. If Programs-This program is selected, you should browse for the proper version of sqlserver.exe.
If you have more than one Instances... Then make sure the PORT Numbers of all Instances are Unique and no one's PORT Number is 1433 except Default One...
Open SQL Server Configuration Manager.
Click SQL Server Services, on the right side choose the server you've created during installation (by default its state is stopped), click once on it and a play button should appear on the toolbar. Click on this play button, wait til its state turns to "Running". Now you're good.
Open SQL Server Management Studio; switch the "Server Type" to "Database Engine" and "Authentication" to "SQL Server Authentication". The default login is "sa", and the password is the password that you chose on creating the server. Now you're good to work.
In my case the problem was caused by the inconsistency between computer names. In system settings my computer was named with some long name, but apparently the name used for some certain communications was trimmed.
I changed the name in the settings to a shorter one and it worked.
I had built both a console app and a UWP app and my console connected fine, but not my UWP. After hours of banging my head against the desk - if it's a intranet server hosting the SQL database you must enable "Private Networks (Client & Server)". It's under Package.appxmanifest and the Capabilities tab.Screenshot
Before download the last version and update your sql server to fix errors of TLS 1.2 on Sql Server 2012. For more information, check here.

Connection to report server could not be made from BI VS 2005 but the report server is browseable

I have IIS6 configured such that browsing to http://localhost:8082/Reports gets me the reporting services default home page, which is all as expected. However, when I try to publish a report via Microsoft Business Intelligence Visual Studio 2005 I get the following error: A connection could not be made to the report server http://localhost:8082/Reports The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
I have windows authentication turned on for report server. Does that have anything to do with not being able to publish projects?
Have you tried to publish you report to:
http://localhost:8082/ReportsServer
"/ReportsServer" is the webservice for Reporting Services. "/Reports" is the front end.
I cannot upvote, but guy is correct. Go into Project->Properties and change TargetServerURL to "http://localhost:8082/ReportsServer". This should alleviate your problems.
If you need to deploy to a named instance remember that your URL will be "http://servername/ReportServer$instancename".
Step 1 : Just log in to the corresponding server
step 2 : Do the settings in internet explorer[IE] browser, Tools => Internet Options => Select connections tab => Click on LAN settings => Just check the check box use a proxy server
Step 3 : Issue will get fixed

Resources