Error: SQL Server 2008 Installation Error: “Invoke or Begin Invoke cannot be called on a control until the window handle has been created”

Error: SQL Server 2008 Installation Error: “Invoke or Begin Invoke cannot be called on a control until the window handle has been created”

While installing SQL Server 2008 I received above error and the same error could be encountered if you install SQL Server 2008 on Windows 7. Later I came to know that this issue is happening because of a behavior change in .NET that is exposing an issue with SQL Setup User Interface (UI).

Resolution:

1.In the Installation Disc you will find a folder, x86 and x64

2.Select as per your OS and go inside the folder

3.Click on the LandingPage.exe

LandingPage.exe

4. Click on the second Option on the left hand menu “Installation”

 PandingPage2

5. Start Standalone installation from the menu at the right side

 6. .It will ask for the location files on the disc

 7. Show the location, e.g. /SQL Server Enterprise 2008/x86 or x64 depending on OS

 It will complete the installation successfully

 Work Around:-

 You can also try to install SQL Server Slipstream setup with SP1 CPU4 as MS confirmed this is a problem and is corrected in Cumulative Update 4 for SQL Server 2008 Service Pack 1.

Please refer below link for more detail

http://support.microsoft.com/kb/975055

Advertisements

SSRS Error: Exceeding Maximum Requests for One User

You intentionally want to restrict or increase maximum request for one user for report server

MaxUserSSRS

There could be some scenario when one specific login has created too much connection on report server via some application, and creates an issue when the number of connection reaches a maximum limit which is called MaxActiveReqForOneUser. This parameter is defined in Rsreportserver.config file and the file is available a example D:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer.

Open this file in any text editor and set the value to your choice and save the file.

<Add Key=”MaxActiveReqForOneUser” Value=”20″/>

In this way you can increase or restrict the number of request from one user.

Slow response on opening first report and after a certain timeout period or after SSRS restart

The first call to reporting services is very slow if you access report after some long interval or your reporting services have been restarted. This is as per design as when reporting services have been idle for a time, the next hit on it can be extremely slow and this is with every report not any individual and related to IIS. The problem is that when the IIS is not getting any traffic, it “goes to sleep”, to clear up memory for other applications. This is totally understandable and a side-effect of Reporting Services’ architecture. Consider that RS is a managed code application that’s persisted on disk as an executable but in intermediate language which must be compiled to machine-code before it can be run. This compile phase is only repeated when the service has not been used in a while. If left idle, the system will mark the assembly as “discarded” and permit it to be overlaid by other operations. 

There are some solutions to it, depending of your version of IIS and SQL server.

Reporting services 2005 with IIS 6 and above

  • Open IIS manager
  • Under application pools right click DefaultAppPool and select properties.

AppPoolNew

  • Under the performance tag, you can change the value for the idle timeout. Default is 20 minutes.

AppPool1

There are two ways to disable the idle timeout:

  • Uncheck the checkbox in front of the setting or set it to 0.

 AppPool_fixed

 After this change I found that earlier first report took 2-4 minutes to generate, but now it is ready in a few seconds.

Reporting Services 2008\2008R2
In SSRS 2008 and above version there is a XML configuration file with a setting for “Recycle Time”. The recycle time is a scheduled timer in minutes based on when the last time SSRS has been manually restarted by a user. When a recycle occurs idle resources within SSRS are freed. This value can be changed to allow SSRS to keep resources for a longer period to prevent slowdowns due to re-initializing SSRS resources. SSRS is configured to recycle itself every 720 minutes, or 12 hours.
This setting can be changed in report server configuration file rsreportserver.config. This file is located in your SSRS installation directory, for example D:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer
As the suitable time for SSRS recycle depends on the usage and you can adjust It as per your need in the configuration file as shown below
‹RecycleTime›1440‹/RecycleTime›

Another Workaround
There is one more possible workaround solution to this issue which rests on the scheduler and execution of a PowerShell script, which stops and starts the SSRS service and after the restart it makes a request to the report manager URL which forces the reporting services to load all the configurations. Then all the subsequent request to SSRS are immediate.
Hence every morning you can schedule below script to restart SSRS and load all configuration before the business operations starts.

Stop-Service “SQL Server Reporting Services (MSSQLSERVER)”
Start-Service “SQL Server Reporting Services (MSSQLSERVER)”
$wc = New-Object system.net.webClient
$cred = [System.Net.CredentialCache]::DefaultNetworkCredentials
$wc.Credentials = $cred
$src = $wc.DownloadString(“http://localhost_SQL2008_Prod/Reports/Pages/Folder.aspx“)

 

How to read and parse rsreportserver.config file for Report Server in SSRS



 

DECLARE @ExecCmd VARCHAR(255)

     
DECLARE @y INT

     
DECLARE @x INT

     
DECLARE @FileContents
VARCHAR(MAX)

     
DECLARE @xmlHandle
INT

     
DECLARE @FILENAME
NVARCHAR(1000)

           
CREATE TABLE #configXML

                 
(

                   
PK INT NOT NULL

                              
IDENTITY(1, 1) ,

                   
[XMLValue] VARCHAR(MAX)

                 
)

SET @FileName = 'C:\Program Files\Microsoft SQL Server\MSRS11.SQL01\Reporting
Services\ReportServer\rsreportserver.config'

                
SET @ExecCmd = 'type ' + '"' + @FileName + '"'

                 
SET @FileContents
= ''

                       
INSERT  INTO
#configXML

                                         
EXEC MASTER.dbo.xp_cmdshell @ExecCmd

                                   
SELECT  @y
= COUNT(*)

                                  
FROM    #configXML

                 
SET @x = 0

                 
WHILE @x <> @y - 1

                                              
BEGIN

                       
                              SET @x = @x + 1

                                                     
SELECT  @FileContents
= @FileContents
+ [XMLValue]

                                                     
FROM    #configXML

                                                     
WHERE   PK
= @x

                                               
END

     
-- Display the file contents

           
SELECT  @FileContents
AS FileContents

           
DROP TABLE #configXML

    
-- Parsing the config file XML

     
EXEC sp_xml_preparedocument @xmlHandle OUTPUT, @FileContents

    
SELECT  *

    
FROM    OPENXML
(@xmlHandle, '//Service', 2) WITH

     (

     
IsSchedulingService VARCHAR(255) 'IsSchedulingService',

     
IsNotificationService VARCHAR(255) 'IsNotificationService',

     
PollingInterval VARCHAR(255) 'PollingInterval',

     
WindowsServiceUseFileShareStorage VARCHAR(255) 'WindowsServiceUseFileShareStorage',

      
  RECYCLETIME      
VARCHAR(255)      'RecycleTime'

      
  )

--This will provide you the value of your 2 parameters for
ReportServer URL and Report Manager URL

--The first value would be Report Server output and the 2nd value
is Remport Manager.

     
SELECT  *

     
FROM    OPENXML
(@xmlHandle, '//URL', 5) WITH

      (

     
UrlString VARCHAR(255) 'UrlString',

     
AccountName VARCHAR(255) 'AccountName'

    
)

      
 --This will give you important information
about authenticaion, MaxActiveReqForOneUser, and database timeout

 

      
       Select *

      
      From  OpenXML (@xmlHandle, '//Configuration',0)

             
        Where
ID in (854 ,855,856,857,74,75)

       --This will
provide extension informaiton

 

              SELECT
localname,text

              FROM
OPENXML(@xmlHandle, '//ModelGeneration',0)

              where
localname='#text'

 

EXEC sp_xml_removedocument @xmlHandle

 

 

How to get most frequent used top 10 reports on report server

SELECT TOP 10 COUNT(Name) AS ExecutionCount, Name,
SUM(TimeDataRetrieval) AS TimeDataRetrievalSum,
SUM(TimeProcessing) AS TimeProcessingSum,
SUM(TimeRendering) AS TimeRenderingSum,
SUM(ByteCount) AS ByteCountSum,
SUM([RowCount]) AS RowCountSum
FROM (SELECT TimeStart, Catalog.Type,Catalog.Name,TimeDataRetrieval, TimeProcessing,TimeRendering,ByteCount,[RowCount]
FROM
Catalog
INNER JOIN ExecutionLog ON Catalog.ItemID=ExecutionLog.ReportID
WHERE
ExecutionLog.TimeStart BETWEEN ‘2012-02-01 00:00:00.000’ AND ‘2013-03-28 23:59:00.000’
) AS RE
GROUP BY
Name
ORDER BY
COUNT(Name) DESC,
Name

How to get detailed execution history of reports on Report Server

SELECT  EL.TimeStart , EL.TimeEnd,DATEDIFF(s,EL.TimeStart , EL.TimeEnd) ‘Duration’ ,COALESCE(C.Path, ‘Unknown’) AS ItemPath, EL.UserName,EL.ExecutionId, CASE(EL.RequestType)
  WHEN 0 THEN ‘Interactive’  WHEN 1 THEN ‘Subscription’  WHEN 2 THEN ‘Refresh Cache’  ELSE ‘Unknown’END
   AS RequestType, — SubscriptionId
    EL.Format, Parameters, CASE(EL.ReportAction)   WHEN 1 THEN ‘Render’
    WHEN 2 THEN ‘BookmarkNavigation’  WHEN 3 THEN ‘DocumentMapNavigation’
     WHEN 4 THEN ‘DrillThrough’  WHEN 5 THEN ‘FindString’  WHEN 6 THEN ‘GetDocumentMap’  WHEN 7 THEN ‘Toggle’
      WHEN 8 THEN ‘Sort’  WHEN 9 THEN ‘Execute’  ELSE ‘Unknown’END AS ItemAction,EL.TimeStart, YEAR(EL.TimeStart)
       AS Start_Year,MONTH(EL.TimeStart) AS Start_Month,DATENAME(MONTH,EL.TimeStart) AS Start_Month_Name,
       DATENAME(DW,EL.TimeStart) AS Start_Day_Of_Week,DATEPART(WEEKDAY,EL.TimeStart)
       AS Start_Day_Number_of_Week,EL.TimeEnd, EL.TimeDataRetrieval, EL.TimeProcessing, EL.TimeRendering,
       CASE(EL.Source)  WHEN 1 THEN ‘Live’  WHEN 2 THEN ‘Cache’  WHEN 3 THEN ‘Snapshot’   WHEN 4 THEN ‘History’
        WHEN 5 THEN ‘AdHoc’  WHEN 6 THEN ‘Session’  WHEN 7 THEN ‘Rdce’  ELSE ‘Unknown’END AS Source,EL.Status,
        EL.ByteCount,EL.[RowCount],EL.AdditionalInfo,C.Name,C.CreatedByID,C.ModifiedByID,C.Description,
        C.CreationDate,C.ModifiedDate,CASE   WHEN C.TYPE=1 THEN ‘Folder’  WHEN C.TYPE=2 THEN ‘Report’
        WHEN C.TYPE=3 THEN ‘XML’   WHEN C.TYPE=4 THEN ‘Linked Report’  WHEN C.TYPE=5 THEN ‘Data Source’
         WHEN C.TYPE=6 THEN ‘Model’  WHEN C.TYPE=8 THEN ‘Shared Dataset’  WHEN C.TYPE=9 THEN ‘Report Part’END
         AS Type_Description
          FROM   ExecutionLogStorage AS EL  LEFT OUTER JOIN Catalog AS C ON
          (EL.ReportID = C.ItemID)
          WHERE
          C.Path like ‘%QuickTrend%’
                    AND
          EL.TimeStart BETWEEN ‘2012-02-01 00:00:00.000’ AND ‘2013-02-28 23:59:00.000’
          ORDER By 1