Ads

03 August 2021

SSIS- The version number in the package is not valid.

Package migration from version 8 to version 6 failed with error 0xC001700A "The version number in the package is not valid. The version number cannot be greater than current version number.". 

Solution:

1. Go to properties 

2. Change the Version and redeploy the package


3. Copy the DTSX or move it to source server and execute.



27 July 2021

Alter failed for Database 'DBNAME '. (Microsoft.SqlServer.Smo), It is in the middle of a restore. (Microsoft SQL Server, Error: 927)

 First Solution 

This error will appear when we configure DB Mirroring. 

Solution 1:

Please ensure you restored the latest log backup on the mirrored server and then click on start mirroring again on principal.
 
Solution 2:
 
Set the endpoints on both mirror and principal servers by executing the below commands on each server.

On Mirror Server:
 
 ALTER DATABASE DBNAME SET PARTNER = ‘TCP://PrincipalServername.com:5022’

On Principal Server:
 
 ALTER DATABASE DBNAEM SET PARTNER = ‘TCP://MirrorServername.com:5022’

01 April 2021

The publisher of this content does not allow it to be displayed in a frame

This will issue will come when SQL Server has been upgraded to any versions after 2016, SSRS reports that are used to display in iFrame will fail to display.



Solution:

Go to URL and change the URL to reportviwer, if the URL is using reports then it will not dispay in the iframe.

Example:

Change From:

https://Server/Reports/browse

Change To:

https://Server/ReportServer/Pages/ReportViewer.aspx?&rs:embed=true

or

 http://Servername/ReportServer/Pages/ReportViewer.aspx?%kjhkjs%khjkhkjhy%retre+uytts%2popiopoi+iuiuyiuy&rs:Command=Render&Rs:embed=true


Note:  this will be your report name -> %kjhkjs%khjkhkjhy%retre+uytts%2popiopoi+iuiuyiuy


23 December 2020

SSRS Failed to Start - an error occurred when attempting to connect to the report server remote procedure call (RPC) end point.

ERROR: 

report server remote procedure call (RPC) end point. Verify that the Report Server Windows service is running, and then retry the operation.

 ---> System.Runtime.InteropServices.COMException: The RPC server is not listening. (Exception from HRESULT: 0x800706B3)

   --- End of inner exception stack trace ---

   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.ThrowOnError(ManagementBaseObject mo)

   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.GenerateDatabaseScript(String databaseName, Int32 lcid, Boolean isSharePointIntegrated, String& script)

   at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.GenerateDatabaseScript(String databaseName, Int32 lcid, Boolean isSharePointIntegrated, String& script)


Solution:

1. Switch the account to local service/local system

2. Start the reporting services and configure.

3. Now change the service account to domain account.

 

29 November 2020

SQL Server Job - Failing - Error: 4014, Severity: 20, State: 8.

 There are many reasons to fail the SQL Server job with this error code like -

        1. Permission issue for the Job owner
        2. Permissions for the SQL Server Agent account
        3. Permissions on MSDB and User Datbases
        4. Issues with the sp_send_dbmail parameters 
If above are proper please follow the below steps to identify the issue -

Open profiler and choose the below events and then run the job.



In our case this was the culprit.



Now fix the code and run the job, which will succeed. 


29 October 2020

Job Output file location

-- Script to find the JobOutPut Location.

select j.name,js.output_file_name,

  js.step_name,js.database_name "Executing On which DB?",

  last_run_outcome = case when js.last_run_outcome = 0 then 'Failed'

        when js.last_run_outcome = 1 then 'Succeeded'

        when js.last_run_outcome = 2 then 'Retry'

        when js.last_run_outcome = 3 then 'Canceled'

        else 'Unknown'

       end,

  last_run_datetime = msdb.dbo.agent_datetime(

       case when js.last_run_date = 0 then NULL else js.last_run_date end,

       case when js.last_run_time = 0 then NULL else js.last_run_time end)

from msdb.dbo.sysjobs j

  inner join msdb.dbo.sysjobsteps js

   on j.job_id = js.job_id

   WHERE js.output_file_name <> '[NULL]' 

  order by js.output_file_name



Thanks to : https://www.sqlservercentral.com/scripts/query-to-find-the-job-output-file-location-at-each-job-step