SQL error 17058 is generally triggered as a result of different factors such as insufficient privileges, corrupted log files, an issue with network policies, and permission issues.
As part of our Server Management Services here at Ibmi Media, we regularly help our Customers to solve SQL related issues.
In this context, we shall look into hoe to resolve this issue and methods of resolving it.
What triggers SQL error 17058 and ways to tackle this error?
Below are the different reasons which triggers this issue and their respective solutions.
1. Cause: Insufficient privilege of SQL Server Service Account in the Log directory
i. Begin by starting the SQL Server Configuration Manager.
ii. Then, From the left menu options, click to select "SQL Server Services".
iii. Next, from the right panel, right-click on "SQL Server (MSSQLSERVER)" and click "Properties". Here, choose the correct service.
iv. Click on the "Startup Parameters" tab and note the location after -e parameter.
v. Now, Browse for the Log location.
vi. Then, right-click on the "Log" folder and click Properties and then access the "Security" tab.
v. Now, verify the SQL Server service account permission of this folder and give proper access to this folder.
vi. Finally, restart the SQL Server service.
vii. In case, if this error persists, then try to change highly privileged service account like "Local System".
2. Cause: Corrupted log file
In order to fix the corrupted log file, rename the existing log file. Renaming will generate a new log file.
3. Cause: Issue with network policies which restrict access to the server
Add a correct network policy. Here are the steps for doing the same:
Start by opening the NPS console, and double-click on Policies.
Right-click Network Policies, and click New in the console tree. Now a new Network Policy wizard opens.
You can now use the New Network Policy wizard to create a policy.
4. Cause: Permission problem for the logon account
In order to fix this error, we need to fix the permission issue. Here are the steps to change the permissions.
Access Admin "Tools >> Services".
Now click on each SQL Service and change the Log On as credentials. change them to Local System Account and Allow service to interact with Desktop.