Monday, October 25, 2010

SQLUA says "Upgrade Advisor detected one or more custom data processing extensions on the report server." though I have never added data processing extention to my SSRS.

PROBLEM
I’m upgrading from SQL Server 2008 to SQL Server 2008 R2. I installed and launched Upgrade Advisor and analyze Reporting Services. Then it gives me the following warning:
Upgrade Advisor detected one or more custom data processing extensions on the report server. Upgrade can continue, but you must move the data processing extension assemblies to the new installation folder.
I didn’t add any “custom data processing extensions”. What’s wrong?
 
ANSWER/RESOLUTION
Newly added TERADATA Data Processing Extension was detected as unknown extension. You can safely ignore the warning if you didn’t add any Custom Data Processing Extensions.
Or you can eliminate the warning by removing the entry of TERADATA Data Processing Extension from rsreportserver.config (if you don’t use it) as follows:
 

<Configuration>
…
  <Extensions>
…
    <Data>
      <Extension Name="SQL"
 
       Type="Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper,
       Microsoft.ReportingServices.DataExtensions"/>
      <Extension Name="OLEDB"
       Type="Microsoft.ReportingServices.DataExtensions.OleDbConnectionWrapper,
       Microsoft.ReportingServices.DataExtensions"/>
      <Extension Name="OLEDB-MD"
       Type="Microsoft.ReportingServices.DataExtensions.AdoMdConnection,
       Microsoft.ReportingServices.DataExtensions"/>

      <Extension Name="ORACLE"
       Type="Microsoft.ReportingServices.DataExtensions.OracleClientConnectionWrapper,
       Microsoft.ReportingServices.DataExtensions"/>

      <Extension Name="ODBC"
       Type="Microsoft.ReportingServices.DataExtensions.OdbcConnectionWrapper,
       Microsoft.ReportingServices.DataExtensions"/>

      <Extension Name="XML"
       Type="Microsoft.ReportingServices.DataExtensions.XmlDPConnection,
       Microsoft.ReportingServices.DataExtensions"/>

      <Extension Name="SAPBW"
       Type="Microsoft.ReportingServices.DataExtensions.SapBw.SapBwConnection,
       Microsoft.ReportingServices.DataExtensions.SapBw"/>

      <Extension Name="ESSBASE"
       Type="Microsoft.ReportingServices.DataExtensions.Essbase.EssbaseConnection,
       Microsoft.ReportingServices.DataExtensions.Essbase"/>

      <!—           comment out the following TERADATA extension                -->
 <!-- <Extension Name="TERADATA"
       Type="Microsoft.ReportingServices.DataExtensions.TeradataConnectionWrapper,
       Microsoft.ReportingServices.DataExtensions"/> –>

<!-- <Extension Name="SSIS"
       Type="Microsoft.SqlServer.Dts.DtsClient.DtsConnection,
       Microsoft.SqlServer.Dts.DtsClient, Version=9.0.242.0, Culture=neutral,
       PublicKeyToken=89845dcd8080cc91"/> –>

    </Data>


NOTES
If you’re not familiar with Data Processing Extension, see the following BOL article(s).
Implementing a Data Processing Extension

Saturday, August 14, 2010

How To Set Shared DataSource reference to Shared DataSet on SQL Server Reporting Services 2008 R2

Save the following code as MyRSScript.rss and run like this from the command prompt.
> rs -i MyRSScript.rss -s http://localhost/reportserver -e Mgmt2010
===== MyRSScript.rss =====
Public Sub Main()
    Dim name As String = "DataSet1"                                             ' DataSet name     Dim parent As String = "/Data Sets"                                         ' DataSet's parent path     Dim dataSourceUrl As String = "/Data Sources/AdventureWorks"    ' full path of Data Source
    Dim fullpath As String = parent + "/" + name
    RS.Credentials = System.Net.CredentialCache.DefaultCredentials

    Try
        'Set DataSet DataSource references
        Dim referenceData() As ItemReferenceData = RS.GetItemReferences(fullpath, "DataSet")
        Dim references(0) As ItemReference
        Dim reference As New ItemReference()

        reference.Name = referenceData(0).Name                         ' This should be "DataSetDataSource"         Console.Writeline("Reference.Name: " & reference.Name)
        Console.Writeline("Reference.Reference change from: " & referenceData(0).Reference & " to :" & dataSourceUrl)
        reference.Reference = dataSourceUrl
        references(0) = reference

        RS.SetItemReferences(fullpath, references)
        Console.Writeline("DataSet DataSource set successfully")
    Catch e As SoapException
        Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText + " (" + e.Detail.Item("Message").InnerText + ")")
    End Try
End Sub
===== Reference =====
ReportingService2010.SetItemReferences Method
http://technet.microsoft.com/en-us/library/reportservice2010.reportingservice2010.setitemreferences.aspx
Quote: Sets the catalog items associated with an item. This method applies to the Report and Dataset item types.
ReportingService2010.SetItemDataSources Method
http://technet.microsoft.com/en-us/library/reportservice2010.reportingservice2010.setitemdatasources.aspx
Quote: Sets the data sources for an item in a report server database or SharePoint library. This method applies to the Report and Model item types.
keyword: SSRS SSRS2008R2 RS2008R2 rs.exe SQL Server 2008 R2 SQL2008R2

Friday, April 2, 2010

How to manage Hyper-V server from Windows 7?

You need to install Remote Server Administration Tools for Windows 7 to install Hyper-V manager into Windows 7.

After installation, you also have to turn on the feature under [Remote Server Administration Tools] through [Turn Windows features on or off] as follows.

Turn Windows features on or off

You can also install consoles for the following roles/services with it.

  • Active Directory Certificate Services
  • Active Directory Domain Services (AD DS) and Active Directory Lightweight Directory Services (AD LDS)
  • DHCP Server
  • DNS Server
  • File Services
  • Hyper-V
  • Remote Desktop Services
  • Server Manager
  • BitLocker Active Directory Recovery Password Viewer
  • Failover Clustering
  • Group Policy Management
  • Network Load Balancing
  • SMTP Server
  • Storage Explorer
  • Storage Manager for SANs
  • Windows System Resource Manager

Keyword: Hyper-V manager, Hyper-V management Console, Management Pack, x64, x86

How to allow MPC to use DirectVobSub

Latest versions of Media Player Classic has internal subtitle feature and don’t load DirectVobSub subtitles if internal feature can load subtitles.

To disable internal subtitle feature,

MPC Menu: [View] –> [Options…], [Playback] then uncheck [Auto-load subtitles] in [Open settings] category.

Notes: You have to disable Internal Transform Filters (DXVA) to enable DirecVobSub as well. For example, if you are playing H.264/AVC movies, you have to navigate [View] –> [Options…], [Internal Filters] then uncheck H264/AVC(DXVA).

Notes: This is described in Subtile FAQ at codecguide.com.
Notes: The problem which MPC’s subtitle feature is that it can’t adjust Subtitle Timing.
Notes: I have to adjust Subtitle Timing as follows: Jay Leno = –7500/–14000 ms, Corbert Report = –9000 ms

Friday, February 19, 2010

My Acer Aspire 1420P (PDC Edition) restarted due to STOP 0xC2 error

My new laptop caused BSOD and I figured out I might have to update Wi-Fi driver (but not yet).

I opened the kernel dump generated with Windows Debugger.

Loading Dump File [C:\Temp\MEMORY.DMP]
Kernel Summary Dump File: Only kernel address space is available
Windows 7 Kernel Version 7600 MP (2 procs) Free x64

1: kd> !analyze -v
BAD_POOL_CALLER (c2)
The current thread is making a bad pool request. Typically this is at a bad IRQL level or double freeing the same allocation, etc.
Arguments:
Arg1: 0000000000000007, Attempt to free pool which was already freed
Arg2: 0000000000001097, (reserved)
Arg3: 00000000000c0018, Memory contents of the pool block
Arg4: fffffa800951f450, Address of the block of pool being deallocated
// so what happened is that someone freed pool twice.

Debugging Details:
------------------
POOL_ADDRESS: fffffa800951f450 Nonpaged pool
FREED_POOL_TAG: W3Rx
BUGCHECK_STR: 0xc2_7_W3Rx
DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT
PROCESS_NAME: wlmail.exe
CURRENT_IRQL: 0
LAST_CONTROL_TRANSFER: from fffff80002bc260e to fffff80002a90f00

STACK_TEXT:
fffff880`08404fb8 fffff800`02bc260e : 00000000`000000c2 00000000`00000007 00000000`00001097 00000000`000c0018 : nt!KeBugCheckEx
fffff880`08404fc0 fffff880`01642ad2 : fffffa80`0927c4a0 00000000`00000000 00000000`00000000 fffffa80`0951f470 : nt!ExFreePool+0xccb
fffff880`08405070 fffff880`04c0c523 : fffff780`00000014 fffffa80`05e7da80 fffffa80`09504fe0 fffff880`04a51e09 : ndis!NdisFreeNetBufferList+0x112
fffff880`084050a0 fffff880`04a4fadc : fffffa80`09504ff8 fffffa80`05e7da80 00000000`00000000 fffff880`04a51e09 : NETw1v64+0x1cb523 // suspicious driver which freed pool twice.
fffff880`084050d0 fffff880`04bfcde5 : fffffa80`09504fb0 fffffa80`09504fb0 00000000`00000018 00000000`00000000 : NETw1v64+0xeadc
fffff880`08405120 fffff880`04a44585 : 00000000`00000000 fffffa80`092df050 fffffa80`07310010 00000000`00000000 : NETw1v64+0x1bbde5
fffff880`08405180 fffff880`02d665bb : fffffa80`00000000 00000000`00000012 fffffa80`07310010 fffffa80`085cc180 : NETw1v64+0x3585
fffff880`084051b0 fffff880`02d68643 : fffffa80`092b96a0 fffffa80`092b96a0 fffffa80`092df050 00000000`00000000 : nwifi!WPP_SF_dll+0x3ab
fffff880`084051f0 fffff880`03bd5ed9 : 00000000`00000000 00000000`00000000 fffffa80`092b96a0 ffffffff`ffffffff : nwifi!MP6ReturnNBL+0x4b
fffff880`08405220 fffff880`016c9484 : fffffa80`05a8b1a0 00000000`00000000 00000000`00000000 00000000`00000000 : vpcnfltr!FilterReturnNetBufferLists+0x201
fffff880`08405270 fffff880`016ff17b : fffffa80`0784abb0 fffffa80`05a8b1a0 00000000`00000000 fffffa80`07ecc8a0 : ndis!ndisReturnNetBufferListsInternal+0x94
fffff880`084052b0 fffff880`01871ff5 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ndis!NdisReturnNetBufferLists+0x3b
fffff880`084052f0 fffff880`01735173 : 00000000`ffffffff 00000000`00000001 00000000`00000001 fffff800`02aa064a : tcpip!FlpReturnNetBufferListChain+0x95
fffff880`08405340 fffff880`0186bd41 : fffffa80`092b96a0 fffffa80`08db7500 fffff880`084053e0 00000000`00000000 : NETIO!NetioDereferenceNetBufferListChain+0xf3
fffff880`084053c0 fffff880`03ad760d : 00000000`ffffffff fffffa80`092b96a0 fffff880`08405c60 fffffa80`0914de50 : tcpip!TcpReleaseIndicationList+0x81
fffff880`084053f0 fffff880`03b18995 : fffff880`08405930 fffffa80`0914de50 00000000`ffffffff 00000000`00000000 : afd!AfdTLReleaseIndications+0x2d
fffff880`08405440 fffff880`03b01051 : fffffa80`04a5d010 fffff880`08405870 7969a55b`00000001 f1367ba8`57c99d30 : afd!AfdFastConnectionReceive+0xb65
fffff880`08405660 fffff800`02da9113 : 00000000`00002000 fffffa80`090e4c80 00000000`070bf9d8 fffffa80`08e4c501 : afd!AfdFastIoDeviceControl+0x1041
fffff880`084059d0 fffff800`02da9c06 : fffff880`08405b98 00000000`00000a9c 00000000`00000001 00000000`00000000 : nt!IopXxxControlFile+0x373
fffff880`08405b00 fffff800`02a90153 : 00000000`00000000 fffffa80`00000000 00000000`00000000 fffffa80`07be2160 : nt!NtDeviceIoControlFile+0x56
fffff880`08405b70 00000000`741a2dd9 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiSystemServiceCopyEnd+0x13
00000000`071eee18 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : 0x741a2dd9

STACK_COMMAND: kb
FOLLOWUP_IP:
NETw1v64+1cb523
fffff880`04c0c523 83c8ff or eax,0FFFFFFFFh
SYMBOL_STACK_INDEX: 3
SYMBOL_NAME: NETw1v64+1cb523
FOLLOWUP_NAME: wintriag
MODULE_NAME: NETw1v64
IMAGE_NAME: NETw1v64.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 4a64f0bf
FAILURE_BUCKET_ID: X64_0xc2_7_W3Rx_NETw1v64+1cb523
BUCKET_ID: X64_0xc2_7_W3Rx_NETw1v64+1cb523

Followup: wintriag
---------

1: kd> lmvm NETw1v64
start end module name
fffff880`04a41000 fffff880`05108000 NETw1v64 (no symbols)
Loaded symbol image file: NETw1v64.sys
Image path: \SystemRoot\system32\DRIVERS\NETw1v64.sys
Image name: NETw1v64.sys
Timestamp: Mon Jul 20 15:33:35 2009 (4A64F0BF)
CheckSum: 006BDF1C
ImageSize: 006C7000
Translations: 0000.04b0 0000.04e4 0409.04b0 0409.04e4

Then I checked the properties of NETw1v64.sys driver. It was Intel Wireless WiFi Link Driver for Intel(R) Wifi Link 1000. Version was 12.5.0.59.

zrtn_001p3a07a5de_tn
(Click for larger image)

zrtn_002n3f589a3b_tn(Click for larger image)

I checked Acer's support page but the driver was not updated. So I went to Intel's support page. Intel already released WiFi Link 1000 driver version 13.0.0.107 for Windows 7 64 bit on 1/7/2010. I'll update when Acer lists it on their website. Or if same error occurs frequently.

Reference: How to Debug "Stop 0xC2" or "Stop 0x000000C2" Error Messages

(This entry was posted powered by Windows Live Writer)

Thursday, February 18, 2010

Unable to load .DLLs due to "Unable To Locate Component" with semi-colon path

I recently worked on a nasty problem which I couldn’t find anyone solved. I hope this helps someone who hits the same problem.

PROBLEM DESCRIPTION

PROBLEM
A process fails to load .DLL file due to the error c0000135 (STATUS_DLL_NOT_FOUND) if the .DLL file path contains semi colon(;).
This problem occurs if you meet all of the following conditions:
  1. The execution file (.EXE) and .DLL file are placed in the same path
  2. The file path of the .DLL contains semi colon (;).
  3. .EXE loads the DLL
  4. The .EXE file is executed from the different execution path than the file path of the .EXE file.
ERROR MESSAGE
Unable To Locate Component: This application has failed to start because xxx.dll was not found. Re-installing the application may fix the problem.
Notes: A dialog shows up even if you execute the process as a console application.
REPRO
Download DllLoadFailureTest.zip from the link, extract it and run Repro.bat if you want.
RESOLUTION
Do NOT use “;” as a file path.

INVESTIGATION

I attached a debugger when an error message dialog showed up before closing it.
0:000> du 10000
00010000  "=C:=C:\WINDOWS\system32"   // execution path = %WINDIR%\SYSTEM32

0:000> lmvm DllLoadFailureTest
    Image path: C:\DllLoadFailure;Test\DllLoadFailureTest.exe   // execution file

0:000> kbn4
# ChildEBP RetAddr  Args to Child             
00 0012f740 7c827779 7c84b905 c0000135 00000002 ntdll!KiFastSystemCallRet
01 0012f744 7c84b905 c0000135 00000002 00000003 ntdll!ZwRaiseHardError+0xc  // STATUS_DLL_NOT_FOUND
02 0012f838 7c83304f 00020498 0012f884 7ffdfc00 ntdll!LdrpMapDll+0x1c4      // DLL path, DLL name
03 0012fa9c 7c832fa5 00020498 00402354 0012fac0 ntdll!LdrpLoadImportModule+0x17c

0:000> du poi(00020498)
00020498  "C:\DllLoadFailure;Test;C:\WINDOW"    // DLL paths are separated with “;”
000204d8  "S\system32;C:\WINDOWS\system;C:\"
00020518  "WINDOWS;.;C:\WINDOWS\system32;C:"    // Current directory (execution path).
00020558  "\WINDOWS;C:\WINDOWS\System32\Wbe"

0:000> du poi(7ffdfc00)
7ffdfc00  "MyDll.dll"   // DLL being loaded. The full path is C:\DllLoadFailure;Test\MyDLL.dll
The DLL path has a problem. C:\DllLoadFailure;Test got to be separated into  C:\DllLoadFailure and Test because paths must be separated with “;”. Therefore Windows doesn’t understand the path ” C:\DllLoadFailure;Test”. When you execute a process from the path where .EXE is located, in other words, the execution path and .EXE file path is the same, Windows loads the DLL from current directory (.) using relative path.
You better not (actually shouldn’t) make a path which contains “;” even though Windows allows.

Friday, October 26, 2007

csv ファイルにリンクサーバーを張って SQL Server から使う

C:\temp\csv\ChequeRecord.csv をテーブルとして使いたいとき、次の T-SQL スクリプトを実行する。
USE master
EXEC sp_addlinkedserver txtsrv, 'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'C:\temp\csv',
NULL,
'Text'
GO
SELECT *
  FROM [txtsrv]...[ChequeRecord#csv]
EXEC sp_dropserver 'txtsrv', 'droplogins'