SSRS default location for ReportServer.mdf - reporting-services

I am trying to configure ssrs on a server and when I try to create the ReportServer and ReportServerTempDB I get the following error:
System.Data.SqlClient.SqlException: Directory lookup for the file "D:\microsoft sql server\data\ReportServer.mdf" failed with the operating system error 3(The system cannot find the path specified.).
I have tried changing the default data directory by right-clicking on the server in Object explorer then Properties>Database Settings then setting the paths here but I still get the error.

It looks like you don't have permissions to write to the folder you are specifying.
You need to make sure that the service account SQL Server is running under has write permissions on the folder path you are trying to write to.
Edit:
Use the following steps:
//SqlExpress
1.Click the Windows Start button, and then click Run. The Run dialog box appears.
2.Type Services.msc into the Open field, and then click OK. The Services
panel appears:
3.Right-click the SQL Server (SqlEx[ress) service, and then click Properties from the shortcut menu. The SQL Server (SqlExpress) Properties (Local Computer) dialog box appears:
4.On the Log On tab, select Local System account for the Log on as option.
5.Press Apply and then press OK on the dialog box that appears.
6.Click on the General tab and then press Stop the stop the service, and Start to restart the SqlExpress service.
7.Press OK and close the services Console.
8.Launch SqlExpress and attempt to now restore the database.

Related

Connect to MySQl In App Database In Azure Webjob

I have a MySQL In-App Database in azure, I can connect fine in PHP on a normal webpage, my issue is I am trying to create a webjob, but when ever I try the web job file can't connect to the database and the connection string is empty.
I have tried to connect using the following:
getenv('MYSQLCONNSTR_bridgesConnection');
$_SERVER['MYSQLCONNSTR_localdb'];
Nither of these are bring back a connection string that I am able to use.
I have the code to break down the strings ect, it just that I can't get the database connection string, or find anywhere on how to get it into the webjob.
After my test, the current feasible way is to send http request in webjob to get the connection string you want.
Test step:
Create a new application appsetting,mytest, and create a new webjob to read it.
Find webjob logs.
Because both Application settings and Connection strings are derived from App Config, I think they cannot be read by ConfigurationManager.AppSettings, so the rest api method is used to get the parameters.
Then I create a Connection strings,
Get connection strings by rest api.
You can try it by yourself.
Connect to MySQL:
In Azure App services access the specific App Services you created
Then click on MySQL In App
In the MySQL In App pane, click on Manage to access phpAdmin
It’ll pop open a new window with the phpMyAdmin tool. Notice at the top of the window it’ll display the IP and port number your database is running on
Get your port number from the phpMyAdmin tool,
Access MySQL username and password:
To get your username and password. This information is in the MYSQLCONNSTR_localdb.ini file in d:\home\data\mysql as displayed in the MySQL In App pane earlier.
To get this file, the best way is to go to Advanced Tools on the blade for your App Service.
You will find Advanced Tools under Development Tools
Under Development Tools, Click on Advanced Tools
In the Advanced Tools pane, click on Go in the Pane.
This will open Kudu Services in a new tab
In Kudu Services, click on Debug console at the top and choose CMD.
This will take you to the path and you’re GUI file list will load above with the console window below.
Clicking on data folder in the GUI file list, will display aspnet and mysql folder.
Click on mysql to access location for MYSQLCONNSTR_localdb.ini
Here you can download the file, open it with Notepad and get your username and password from the connection string stored inside.
You can also click on Edit in the GUI to view your password and username details, the content on edit looks like this
Database=databasename;Data Source=127.0.0.1;User Id=username;Password=password

rsProcessingAborted & rsErrorOpeningConnection [duplicate]

I'm working on integrating a report into a browser, and I get this error:
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'dsFederatedSample_SurveyLevel_STG'. (rsErrorOpeningConnection)
For more information about this error navigate to the report server on the local server machine, or enable remote errors
Does this have to do with SQL vs Windows authentication?
First thing I would try is to get a bit more information on the error - that's a pretty generic message.
You could enable remote errors as per the error message and replicate the error for more information.
Or check the Report Server error logs to see what error was logged.
%programfiles%\Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles\
The next step would be to connect as the Data Source user to the database, run any code/stored procedures that the report is using with the same parameters you're using when running the report, and see if any errors occur. Make sure the account you are using has permission and that you have entered the name and password correctly in the Data Source.
In SQL Server 2008 in addition to the above two options you have a third option to make this setting through SQL Server Management Studio.
1.Start Management Studio and connect to Report Server Instance (make sure you select 'Reporting Services' server type).
2.Right click on the ReportServer and Select Properties
3.Click Advanced
4.In EnableRemoteErrors, select True.
5.Click OK.
I had the same issue "Cannot create a connection to data source...Login failed for user.." on Windows 8.1, SQL Server 2014 Developer Edition and Visual Studio 2013 Pro. All solutions offered above by other Stackoverflow Community members did not work for me.
So, I did the next steps (running all Windows applications as Administrator):
VS2013 SSRS: I converted my Data Source to Shared Data Source (.rds) with Windows Authentication (Integrated Security) on the Right Pane "Solution Explorer".
Original (non-shared) Data Source (on the Left Pane "Report Data") got "Don't Use Credentials".
On the Project Properties, I set for "Deployment" "Overwrite DataSources" to "True" and redeployed the Project.
After that, I could run my report without further requirements to enter Credentials. All Shared DataSources were deployed in a separate Directory "DataSources".
In my case, this was due to using Integrated Windows Authentication in my data sources while developing reports locally, however once they made it to the report manager, the authentication was broke because the site wasn't properly passing along my credentials.
The simple fix is to hardcode a username/password into your datasource.
The harder fix is to properly impersonate/delegate your windows credentials through the report manager, to the underlying datasource.
The issue is because your data source is not setup properly, to do that please verify your data source connection, in order to do that first navigate to Report Service Configuration Manager through
clicking on the start -> Start All -> Microsoft SQL Server ->Configuration Tool -> “Report Service Configuration Manager”
The open Report Manager URL and then navigate to the Data Source folder, see in the picture below
Then Create a Data Source or configure the one that is already there by right click on your database source and select "Manage" as is shown below
Now on the properties tab, on your left menu, fill out the data source with your connection string and username and password, after that click on test connection, and if the connection was successful, then click "Apply"
Navigate to the folder that contains your report in this case "SurveyLevelReport"
And Finally set your Report to the Data Source that you set up previously, and click Apply
if you use null values in your stored procedure, you will need to set the parameters to accept null values. That worked for me.
In my case I had in one report many different datasets to DB and Analysis Services Cube. Looks like that datasets blocked each other and generated such error.
For me helped option "Use single transaction when processing the queries" in the CUBE datasource properties
I had a similar problem, and being the newbie that I am it took me a while to figure out but I learned the user must have a login in SSMS. I created the logins with the following parameters:
Under Server Roles - check sysadmin
Under User Mapping - I selected the database and the report server. For each I checked datareader and datawriter
Under Securables - I checked anything that would allow the user to connect to the database and view anything
I also found that one of the existing logins had denydatareader and denydatawriter checked. Once I removed these it worked.
I'm not saying this is the best way to do it, just what worked for me. Hope this helps
More information will be useful.
When I was faced with the same error message all I had to do was to correctly configure the credentials page of the DataSource(I am using Report Builder 3). if you chose the default, the report would work fine in Report Builder but would fail on the Report Server.
You may review more details of this fix here:
https://hodentekmsss.blogspot.com/2017/05/fix-for-rserroropeningconnection-in.html
I had the exact same issue.
The cause could be different but in my case, after trying several different things like changing the connection string on the Data Source setup, I found that this was the infamous 'double hop' issue (more info here).
To solve the problem, the following two options are available (as per one of the responses from the hyperlink):
Change the Report Server service to run under a domain user account, and register a SPN for the account.
Map Built-in accounts HTTP SPN to a Host SPN.
Using option 1, you need to select 'Windows' credentials instead of database credentials to overcome the double hop that happens while authentication.

SQL Server service doesn't start anymore automatically if I make a Windows restart

I have Windows 10 build 1511, where I have installed SQL Server 2014.
After installation everything is OK.
I've made several times shutdown on Windows 10, and after if I turn on my PC everything is OK.
But if I restart the system, after the restart, the SQL Server service remains stopped (startup type is Automatic). I try another restart and shutdown, but the service doesn't start automatically anymore.
I've started the service manually, and after the service is started and everything works ok. If I shut down everything, it is ok afterwards. But if I just restart, the problem that I've described above appears again.
What can I do ?
Thank you !
Update
It seems that the problem is already reported to Microsoft :
https://connect.microsoft.com/SQLServer/feedback/details/1873617/sql-server-not-coming-online-after-os-upgrade-to-windows-10-even-when-startup-type-is-automatic
If you starts services.msc and serach for the SqlServer service, in properties, set the startup as automatic delay instead of automatic.
I'm dealing with the same issue on Win 2012. and it looks like the same issue described here:
Add your windows level user in following path:
Click on Start - Run - Secpol.msc Go to Local Policies - User right assignments
Act as a part of the Operating system
bypass Traverse checking
Lock pages in memory
Log on as a service
Log on a batch job
Replace process level token
If not, please add them and try restarting your system. Your SQL Server should be starting as a service. All the best.
I had this issue on Windows 10 and SQL Server 2014 Express.
The delayed start option didn't work for me, but here's what did work - granting higher DCOM permissions to the Network Service and Local Service accounts.
Click Start, type Component and then click the Component Services
app
In Component Services, double-click Component Services, and then double- click Computers. Right-click My Computer, and then click Properties.
Click the COM Security tab.
In the Launch and Activation Permissions area, click Edit Default.
Click Add, type Network Service, and then click OK. While Network Service is selected, click to select the Allow check boxes for the following items:
Local Launch
Remote Launch
Local Activation
Remote Activation
Repeat step 4 for the Local Service account.
Reboot and SQL Server should not start automatically.
In my case, this is a development environment so I'm less concerned about the security implications of this change and more concerned about getting it to work. So be advised to check out potential security ramifications if that's important in your situation.
pay Attention in suffix too
example: if in your user Secedit.msc is as contoso\usersql, in the windows service needs to be the same, I was putting usersql#contoso.com and was having problems to start the service automatic, after change to contoso\usersql, working fine
follow the way,
SQL SERVER INSTALLATION CENTER (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft SQL Server 2019\Configuration Tools) > Maintenance > Edition Upgrade
and restart service
Another solution worked for me:
Open SQL Server Configuration Manager
Select SQL Server Services
Select any service (double click or right click and properties)
Go to "Log On" tab (My Log On settings was "This Account")
Choose "Built-in account" and "Local Service" under it.
Then I did this steps for every other services and it worked. I have no more problem while I am connecting to SQL Server Databases.
SQL Server Services Log On Settings
I faced this issue today , as my server is dependent on SQL server connection , that was also not booting up. It was simple in my case. I saw in services screen its status is STOP. So I started there ans it started working.
windows+R--> services.msc--> right click on the service and start it.

MySQL server not starting because of MySQL56 service

I am unable to start MySQL56 service once i stopped it. Previously my MySQL 6.0 workbench was working all fine but once i stopped this service(MySQL56) from services in task manager, I am not able to start my MySQL server as it says
"Status check of service 'MySQL56' returned stopped"
and I am not able to find any way to start it again. When I click enable the service for MySQL56 in task manager it says
"The service can not be started either because it is disabled or because it has no enabled devices associated with it".
Any help will be really appreciated.
Type "services" in the Start search bar in windows.
Hit Enter.
Now in the services list scroll down for "MySQL56".
Right click on it & choose Start. (This will start it.)
To make this automatic:
Again Right click on "MySQL56".
Choose Properties
Now opt for "Automatic".
If the above service is not running, then it also creates problem in Workbench. ("Cannot Connect to Database Server" error)
In windows 10, press Ctrl+Shift+Esc. That will open the Task Manager.
Then go to the Services tab.
At the left column, you can see the names of the services.
Search for the service you need (for me it is MYSQL57) and right click on it and choose start.

Cannot create a connection to data source Error (rsErrorOpeningConnection) in SSRS

I'm working on integrating a report into a browser, and I get this error:
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'dsFederatedSample_SurveyLevel_STG'. (rsErrorOpeningConnection)
For more information about this error navigate to the report server on the local server machine, or enable remote errors
Does this have to do with SQL vs Windows authentication?
First thing I would try is to get a bit more information on the error - that's a pretty generic message.
You could enable remote errors as per the error message and replicate the error for more information.
Or check the Report Server error logs to see what error was logged.
%programfiles%\Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles\
The next step would be to connect as the Data Source user to the database, run any code/stored procedures that the report is using with the same parameters you're using when running the report, and see if any errors occur. Make sure the account you are using has permission and that you have entered the name and password correctly in the Data Source.
In SQL Server 2008 in addition to the above two options you have a third option to make this setting through SQL Server Management Studio.
1.Start Management Studio and connect to Report Server Instance (make sure you select 'Reporting Services' server type).
2.Right click on the ReportServer and Select Properties
3.Click Advanced
4.In EnableRemoteErrors, select True.
5.Click OK.
I had the same issue "Cannot create a connection to data source...Login failed for user.." on Windows 8.1, SQL Server 2014 Developer Edition and Visual Studio 2013 Pro. All solutions offered above by other Stackoverflow Community members did not work for me.
So, I did the next steps (running all Windows applications as Administrator):
VS2013 SSRS: I converted my Data Source to Shared Data Source (.rds) with Windows Authentication (Integrated Security) on the Right Pane "Solution Explorer".
Original (non-shared) Data Source (on the Left Pane "Report Data") got "Don't Use Credentials".
On the Project Properties, I set for "Deployment" "Overwrite DataSources" to "True" and redeployed the Project.
After that, I could run my report without further requirements to enter Credentials. All Shared DataSources were deployed in a separate Directory "DataSources".
In my case, this was due to using Integrated Windows Authentication in my data sources while developing reports locally, however once they made it to the report manager, the authentication was broke because the site wasn't properly passing along my credentials.
The simple fix is to hardcode a username/password into your datasource.
The harder fix is to properly impersonate/delegate your windows credentials through the report manager, to the underlying datasource.
The issue is because your data source is not setup properly, to do that please verify your data source connection, in order to do that first navigate to Report Service Configuration Manager through
clicking on the start -> Start All -> Microsoft SQL Server ->Configuration Tool -> “Report Service Configuration Manager”
The open Report Manager URL and then navigate to the Data Source folder, see in the picture below
Then Create a Data Source or configure the one that is already there by right click on your database source and select "Manage" as is shown below
Now on the properties tab, on your left menu, fill out the data source with your connection string and username and password, after that click on test connection, and if the connection was successful, then click "Apply"
Navigate to the folder that contains your report in this case "SurveyLevelReport"
And Finally set your Report to the Data Source that you set up previously, and click Apply
if you use null values in your stored procedure, you will need to set the parameters to accept null values. That worked for me.
In my case I had in one report many different datasets to DB and Analysis Services Cube. Looks like that datasets blocked each other and generated such error.
For me helped option "Use single transaction when processing the queries" in the CUBE datasource properties
I had a similar problem, and being the newbie that I am it took me a while to figure out but I learned the user must have a login in SSMS. I created the logins with the following parameters:
Under Server Roles - check sysadmin
Under User Mapping - I selected the database and the report server. For each I checked datareader and datawriter
Under Securables - I checked anything that would allow the user to connect to the database and view anything
I also found that one of the existing logins had denydatareader and denydatawriter checked. Once I removed these it worked.
I'm not saying this is the best way to do it, just what worked for me. Hope this helps
More information will be useful.
When I was faced with the same error message all I had to do was to correctly configure the credentials page of the DataSource(I am using Report Builder 3). if you chose the default, the report would work fine in Report Builder but would fail on the Report Server.
You may review more details of this fix here:
https://hodentekmsss.blogspot.com/2017/05/fix-for-rserroropeningconnection-in.html
I had the exact same issue.
The cause could be different but in my case, after trying several different things like changing the connection string on the Data Source setup, I found that this was the infamous 'double hop' issue (more info here).
To solve the problem, the following two options are available (as per one of the responses from the hyperlink):
Change the Report Server service to run under a domain user account, and register a SPN for the account.
Map Built-in accounts HTTP SPN to a Host SPN.
Using option 1, you need to select 'Windows' credentials instead of database credentials to overcome the double hop that happens while authentication.