I am having an issue on viewing the SQL Error logs on SSMS. I'm aware that I'm also able to view the error logs by going to the folder where the error logs are stored. I have tried verifying if my service account has permission to access the error log location (read/write). Also my service account is granted sysadmin in SSMS. Still I'm unable to view the SQL Error Logs in SSMS.
In SQL Server Management Studio, select Object Explorer. ...
In Object Explorer, connect to an instance of SQL Server, and then expand that instance.
Find and expand the Management section (assuming you have permissions to see it).
Right-click SQL Server Logs, select View, and then choose SQL Server Log
https://learn.microsoft.com/en-us/sql/relational-databases/performance/view-the-sql-server-error-log-sql-server-management-studio?view=sql-server-ver15
Related
I tried to deploy SSRS report . i created a report on visual studio .. and also i configured report server configuration manager
when i try to deploy report and open this URL
http://localhost/ReportServer
this shows an error
ERROR
"Reporting Services Error
The report server cannot open a connection to the report server database. The log on failed. (rsReportServerDatabaseLogonFailed) Get Online Help
The user name or password is incorrect. (Exception from HRESULT: 0x8007052E)
SQL Server Reporting Services"
whereas when i click reporting services from sql and connect then connected succesfuuly but after when i left click on server name then same error shows as above on sql
This error occurs when Reporting Services (the report server) cannot connect to the "ReportServer" mssql database, It is not a problem in your report but in the server configuration.
To solve it, run the tool "Reporting Services Configuration Manager" in the PC where MSSQL and SSRS are installed, and review everything is ok.
Specially in the Database tab.
The error "The report server cannot open a connection to the report server database. The log on failed" means that:
The database engine that the report server catalog database host is unaccessable.
The Reporting Services service account has insufficient permissions to the access the report server catalog database.
So, to fix the issue, please follow these steps:
Make sure we are able to connect to the database engine from the report server machine.
a) Ping the database engine server.
b) Try to connect to the database engine using SQL Server Mananger Studio(SSMS)(If we have.). Or, create a .UDL file, try to connect the server from this UDL.
Use the Reporting Services Configuration Manager(RSCM) to check the service account. If the report server is on the different server with the database engine, please use a domain account instead of the local account(Built-in account). Make sure the service account has permissions in the database engine.
Final, please check if the report server is configured correctly. We can easily check that by checking if we can open the Report Manager(http:///reports).
Besides, I would suggest you to go through each steps in the RSCM to make sure the configuration is all fine.
For more information, please see:
Configuring a Report Server Installation (Reporting Services in Native Mode): http://msdn.microsoft.com/en-us/library/ms159624.aspx
I have a weird problem with SSDT(Visual Studio 2017 server explorer) when I try to view the tables in my Database
In SSMS (SQL Server Management Studio 2017) I created a database with a new user called admin. This user has public and sysadmin permissions and can execute CRUD queries and see the tables in the Object Explorer.
So everything is working fine... However, when I try to connect to the database from VS2017 with SSDT I succeed to connect to the server, but I cant view the tables inside the Server Explorer and it throws me the "Login Failed for user..." error. However when I try the same with the SQL Server Object Explorer it works fine:
Why do i get this error? The credentials are correct otherwise it wouldn't have worked in SSMS and object explorer. My permissions are correct otherwise I wouldn't have been able to create the table and insert data into it. Why do I get the Login failed error in the Server Explorer?
Okay so I managed to fix the "problem",
I was entering the correct credentials, but it was still giving me this error.
So what i tried this time is to eneabled the Save my password checkbox.... and it worked...
I deleted the connection and created a new connection (without checking the Save my password) and again the same error. So i enabled the checkbox again and it worked...
I think when trying to reach for the tables it re-authenticates at the SQL server, and since the checkbox Save my password was not enabled, it didnt have a password to authenticate with.
check your credentials in the properties of the connection
So I have installed SQL Server 2008 R2 on windows 7 machine.I was able to login using my windows authentication.Now when I try to create a new database it gives me this error saying "CREATE DATABASE permission denied in database ‘master'".I have tried so many links related to this issue but still it is failing.These are the options that I tried:
1) Went to SQL Server Configuration Manager and then changed the parameters in the advanced tab by adding -m.It still did not help me.When I add this parameter and try to login again using windows authentication it gives me a message saying "Only one administrator can login as it is in single user mode".
2) While Installation I am sure that I added the current user under sysadmin role. I also made sure that the "Mixed mode authentication" is selected and then gave a password for the user "sa".Now when I try to use that password it says "Failed login for user sa".
3) When I login with windows authentication and then check the login mode by following this:
right click on main instance name-->Properties-->Security,it shows that only windows authentication mode is selected.But I am very much sure that I selected the "Mixed mode authentication".Not sure why it is showing it in this way.
4) I also tried to modify the password for sa but the current user has no permissions.I am not able to perform any operation with this user.
I know there are different links for this issue.But I tried all the options that were mentioned in those links but still it is giving me a problem.I have been trying to resolve this issue from a very long time.Could anyone suggest what I am missing here.
Solved! I had the same problem. I figured it out based on info from the article and the comments from the first commentor in this link.
I'll copy the author's steps with the necessary modifications in bold:
Open the Configuration Manager tool from the "SQL Server 2005| Configuration" menu
Stop the SQL Server Instance you need to recover (both SQL Server AND SQL Server Agent. Once in single user mode, if not stoped, the agent will tie up the connection, preventing you from using it with sqlcmd.exe).
In SQL Configuration Manager, click on SQL Server Services on the left, then right click on SQL Server on the right, navigate to the “Advanced” tab (or "Startup Parameters for more recent versions of SQL), and in the Properties text box add “–m” to the end of the list in the “Startup parameters” option.
Click the “OK” button and restart the SQL Server Instance (just SQL Server. Do not restart the SQL Server Agent just yet.) NOTE: make sure there is no space between “;” and “-m”, the registry
parameter parser is sensitive to such typos. You should see an entry
in the SQL Server ERRORLOG file that says “SQL Server started in
single-user mode.”
After the SQL Server Instance starts in single-user mode, the Windows Administrator account is able to connect to SQL Server using
the sqlcmd utility (it is probably here, or someplace very similar: C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SQLCMD.EXE) using Windows authentication. You can use
Transact-SQL commands such as "sp_addsrvrolemember" to add an existing
login (or a newly created one) to the sysadmin server role. The
following example adds the account "Buck" in the "CONTOSO" domain to
the SQL Server "sysadmin" role: EXEC sp_addsrvrolemember
'CONTOSO\Buck', 'sysadmin'; GO
Restart/Start SQL Server Agent, back in the SQL Server Configuration Manager.
this is a new staging server with SQL 2008. I'm not famliary with SSIS that much so trying to deploy a couple packages. So I do the following in BIDS..which is probably typical:
Right-click my solution, go to properties, then go to the deployment utility tab
Change CreateDeploymentUtility to true
Go and find the .SSISDeploymentManifest file locally on my machine
Run it and try to perform a SQL Server deployment to the customer's remote server (we're running vpn to get to it)
I put in the fully qualified remote server's name, my windows auth or SQL account (I tried both ways)
Try to click now the Package Path and get this:
TITLE: Package Installation Wizard
An OLE DB error 0x80040E09 (The EXECUTE permission was denied on the object 'sp_ssis_listpackages', database 'msdb', schema 'dbo'.) occurred while enumerating packages. A SQL statement was issued and failed.
ADDITIONAL INFORMATION:
An OLE DB error 0x80040E09 (The EXECUTE permission was denied on the object 'sp_ssis_listpackages', database 'msdb', schema 'dbo'.) occurred while enumerating packages. A SQL statement was issued and failed.
BUTTONS:
OK
So what do I do? How do I essentially run this as an administrator to get past this stupid elevated rights security error?
You should add your windows / sql account to sysadmin role.
In SQL Server Management Studio, go to Security -> Server Roles and double click sysadmin. Add your login and it should work when you try again.
I have publish my website in IIS7. It is running in DefaultAppPool. The Identity of this app-pool is set to LocalSystem. The IIS is running and I can run the application from IIS without any problem.
Now I want to attach the database placed in inetpub's application folder:
C:\inetpub\wwwroot\EMSApplication\App_Data\ASPNETDB.mdf
I have added new logins in the SSMS which are: NT AUTHORITY\NETWORK SERVICE and IIS APPPOOL\DefaultAppPool.
But when I am trying to attach that database in the SSMS I am getting follwoing error:
TITLE: Microsoft SQL Server Management Studio
Failed to retrieve data for this request.
(Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------ ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or
batch. (Microsoft.SqlServer.ConnectionInfo)
CREATE FILE encountered operating system error 5(Access is denied.)
while attempting to open or create the physical file
'C:\inetpub\wwwroot\EMSApplication\App_Data\ASPNETDB.MDF'. (Microsoft
SQL Server, Error: 5123)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.5500&EvtSrc=MSSQLServer&EvtID=5123&LinkId=20476
------------------------------ BUTTONS:
OK
By default Microsoft SQL Server Management Studio works against a Parent Instance of SQL Express, not your User Instance. A user instance is a separate instance of the SQL Server Express Database Engine that is generated by a parent instance. User instances allow users who are not administrators on their local computers to attach and connect to SQL Server Express databases. Each instance runs under the security context of the individual user, on a one-instance-per-user basis. Here is a manual from msdn How to connect to a User Instance.
I was able to do that running Management Studio As Administrator.
I had same problem.your .mdf and .ldf files don't have necessary permission.
you should add your windows account in both .mdf and .ldf files and give it full control permission.
Now you can attach your database successfully.