Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Saturday, November 27, 2010

“The name 'Dts' does not exist in the current context” with CodePlex sample packages

I downloaded SSIS sample packages from http://www.codeplex.com/ but couldn’t run them with the following error.
The name 'Dts' does not exist in the current context
It took me for a while to figure out what’s wrong. I’d like to share and notes my experience.
Script Task indicates red ‘x’. So I launched Script Task Editor then clicked “Edit Script” button.
Expand References in Project Explorer then I found a reference to Microsoft.SqlServer.ScriptTask is missing. The reference refers to GAC.
I looked through C:\Windows\assembly and didn’t find Microsoft.SqlServer.ScriptTask.

Solutions:
We have two options.

a) Change the reference to "C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.ScriptTask.dll" or "C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.ScriptTask.dll"

b)
Register the Microsoft.SqlServer.ScriptTask.dll (x64 or x86) into GAC using gacutil.exe.

Notes:
I’m not sure if SQL Server 2008 R2 should register the assembly into GAC or not.
If you add Script Task then edit script, the script refers to the assembly in the “C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\”, not to GAC by default. So it doesn’t matter whether it is in GAC or not by default.

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, 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'

Tuesday, April 10, 2007

SQL Cluster: ノード追加後 SP4 インストール時にエラー

問題
MSCS SQL Server 2000 フェールオーバー クラスタにノードを追加して SP をインストールしようとすると、次のエラーで実行アカウントが指定できない。
エラー メッセージ
SQL Server サービス ログオン アカウントに対してサービスとしてログオンする権限を確認または許可できません : 5000 (0x1388)
解決方法
SP4 インストール ダイアログを終了する。
905286 の Hotfix を入手する。exe を実行すると sqlsui.dll が展開される(インストーラではない)。
このファイルを、展開した SQL2KSP4 の \x86\binn\sqlsui.dll に上書きして、再度 setup.bat を実行する。
詳細情報
この件については次の KB に記載されています。
FIX: You receive an error message when you run SQL Server Setup to install SQL Server 2000 Service Pack 4 in binary-only mode on a failover cluster
http://support.microsoft.com/kb/905286/en-us

Monday, February 26, 2007

SQL Server Disaster Recovery - バックアップと復旧

MSDN Home
> SQL Server デベロッパーセンター
> 連載コラム
> システム管理
第 3 回 「復元について」 ~ システム管理 ~
http://www.microsoft.com/japan/msdn/sqlserver/columns/recovery/recovery3.aspx

Wednesday, February 21, 2007

InfoPath と SQL Server

InfoPath は社内アンケートや案件管理などに対して、アプリを組むよりずっと作りやすく使いやすい。今後のために試しておきたい。
InfoPath-SQL Server連携で構築するC/Sシステムhttp://www.atmarkit.co.jp/fwin2k/operation/infopath01/infopath01_01.html

Tuesday, February 6, 2007

SQL Server 2005 を Windows Server 2003 クラスタにインストールする

エラーが出てインストールできないので、次の方法でセットアップログを見てみた。

SQL Server 2005 セットアップ ログ ファイルを表示する方法
http://msdn2.microsoft.com/ja-jp/library/ms143702.aspx

しかし、いまいち有効な情報が記録されていない。
そこで、%windir%\tasks から詳細設定→ログを表示、を行なってみると次のエラーが出ていた。

"SQL Server Remote Setup .job" (setup.exe)
開始 2007/02/06 18:24:40
"SQL Server Remote Setup .job" (setup.exe)
完了 2007/02/06 18:24:44
結果: タスクは次の終了コードで完了しました: (643).

調べてみると次の KB に関係あるらしい。

SQL Server 2005 のインストール時にエラー メッセージ "セットアップ ウィザードの実行中に予期しないエラーが発生しました" が表示される
http://support.microsoft.com/kb/916760/ja

この内容は正確ではない。CD1 の内容を Servers, CD2 の内容を Tools にコピーするとインストールできた。
CD ではなく DVD の SQL Server 2005 だと、はじめから Servers と Tools にフォルダが分かれているため、難なくインストールできた。