存档

文章标签 ‘SQLServer’

控制SharePoint 2010虚机内存的占用

2009年10月28日 没有评论

我们使用SharePoint 2010的虚机,总是觉得内存不够。其实这里面主要消耗内存的还是SQL Server 2008。

我在SQL Server 2008里面限制了内存最大使用为128MB,之后任务管理器里面显示内存使用量急剧下降。如下图。之前显示内存占用2.39GB,现在显示1.71GB。我们可以根据自己的情况适当调整SQL Server 2008的内存使用量,可以达到事半功倍的效果。

image_5

Error : KERBEVT_KRB_AP_ERR_MODIFIED

2009年1月8日 没有评论

在为客户部署RMS的时候,RMS服务器连不上SQL Server的服务器,显示SSPI错误。检查系统的Event Viewer,可以看到如下的错误:

The kerberos client received a KRB_AP_ERR_MODIFIED error from the server %1. The target name used was %3. This indicates that the password used to encrypt the kerberos service ticket is different than that on the target server. Commonly, this is due to identically named machine accounts in the target realm (%2), and the client realm. Please contact your system administrator.

根据错误信息的提示,我们把SQL Server服务器退出域,删掉SQL Server服务器账号,然后重新将SQL Server服务器加入域,问题就解决了。

分类: RMS, SQL Server 标签: ,

Reporting Service灾难恢复可能用到的KB

2009年1月5日 没有评论

How to move a Reporting Services database from a computer that is running Reporting Services to another computer

http://support.microsoft.com/kb/842425/en-us

Troubleshooting a Side-by-Side Installation of Reporting Services and Windows SharePoint Services

2006年11月30日 没有评论

这篇文章来自ReportingService For SQL Server 2000的安装说明文件。

On Windows Server 2003, if you install Reporting Services with Windows SharePoint Services, you need to follow some basic steps in order for your system to function properly. To enable a side-by-side installation of Reporting Services and Windows SharePoint Services, perform the following steps.

  1. While installing Reporting Services, you may experience activation failures. Ignore any activation errors that occur.
  2. Add the Reporting Services virtual directories to the Windows SharePoint Services list of exclusions. If you installed Reporting Services using the default virtual directories, run the following at the command prompt:
    STSADM.EXE -o addpath -url http://localhost/ReportServer -type exclusion
    and
    STSADM.EXE -o addpath -url http://localhost/Reports -type exclusion
  3. Next, increase the trust level to full trust in the Report Server and Report Manager Web.config files. By default, the Report Server Web.config file is located at C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer. The Report Manager Web.config file is located at C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportManager. You can increase the trust level by modifying the trust level element of the system.web configuration element from <trust level="RosettaSRV" originURL=""/> and <trust level="RosettaMGR" originURL=""/> to the following:
    <trust level="Full" originUrl="" />
    You must make the trust level entry in both Web.config files. Modify only the trust level element of system.web. Do not modify the similarly named trustlevel element of the security policy configuration element.
  4. Add the following under the HttpModules configuration element of the SharePoint Web.config file if it does not already exist. By default, the SharePoint Web.config file is located at C:\Inetpub\wwwroot.
    <HttpModules>
       <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
    In addition to adding the session state module, you must also enable session state for the pages element by changing the enableSessionState attribute from false to true. The entry in the configuration files should look like the following:
    <pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" />
  5. From the Internet Information Services (IIS) Manager, ensure that the report server is in an application pool that is separate from the SharePoint server. The report server management user interface, Report Manager, can remain in the same application pool to which it was originally installed. To assign the report server to a separate application pool, you must first create a new application pool. After you have created a new application pool, expand Web Sites, expand Default Web Site, right-click the report server virtual root that you created during setup (the default is ReportServer), and then click Properties. From the Application pool drop down, select the newly-created application pool. For more information about application pools, see your Internet Information Services documentation.
  6. Finally, use the rsactivate utility to activate the local instance of Reporting Services. You need to install Administrative Tools and Utilities as part of Reporting Services setup in order to use the rsactivate utility. By default, rsactivate is located at C:\Program Files\Microsoft SQL Server\80\Tools\Binn. If you installed your report server to the default location, run the following at the command prompt:
    rsactivate -c "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\RSReportServer.config"

也说报表服务遇见了Sybase

2006年4月15日 没有评论

ccBoy遇见的问题,在我客户这里也有,但是客户似乎没有把这当作一个问题。我在客户这里部署的ReportingService还是SQLServer2000里面的,不过情景应该类似。客户也是将Sybase里面行以千万计的数据导出到SQLServer2000当中,原因一方面是怕报表的查询影响业务数据库中实时数据的插入,一方面是因为在ReportingService对Sybase数据库使用参数的时候报错。联想到在ASP.NET当中使用Sybase数据库的时候,Sybase的ODBC驱动不支持SQL当中使用参数,窃估计是ODBC驱动的硬伤…曾经想找一个Sybase的.NET的连接器,但是总没有找到。

客户导数据的耐心还是值得称道的,在SQLServer2000中的数据转换服务中,DTS包达到了7个,最大的一个DTS包中导了二十多个表,导数据的流程达到了四十多步!每天大概从4个不同的系统中倒入大概4千万行左右的数据,同时还要将数据关联汇总。那个SQLServer2000的数据库基本上过了晚上12点就开始忙,大概要忙8个小时左右…

ccBoy的问题我不知什么自动的方法来解决,对SQLServer2005还不熟。但是他提到SSIS的问题应该是在SQLServer2000当中就存在了…

在报表服务当中使用定制程序集

2006年4月9日 没有评论

报表服务允许在报表当中内嵌代码,也允许报表引用定制的程序集。内嵌代码要求是VB.NET编写的代码,而引用的定制程序集没有限制,在codeproject上面甚至看到有人调用包装了COM的定制程序集。

本文的注意力不在内嵌代码上,因为内嵌代码相对引用定制程序集简单,功能也要弱一些。我们的注意力着重在报表如何引用定制程序集,以及这样的报表如何部署。

在报表中如何引用定制程序集

RSAddition1

在报表的数据或者布局视图点击“报表”菜单->“报表属性”项会出现如下的窗口:

RSAddition2

在点击“…”按键选择要应用的程序集。如果使用对象的静态成员,可以应用以后直接使用。如果对象需要实例化以后才能使用,则需要在窗口下半部分的添加类名和准备使用的实例名。静态成员可以直接以“myNameSpace.myClass.myFunction()”的方式来执行,如果不是静态成员,则要以“Code.myObject.myFunction()”方式来执行。其中myClass是类名,myObject是实例化以后的实例名。

部署引用的定制程序集

部署应用的定制程序集有三个步骤:

  1. 将引用的dll添加到报表设计器和报表服务器的bin目录,具体来讲就是报表设计器的C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer和报表服务器的C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin。
  2. 编辑C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer目录下的rspreviewpolicy.config文件和C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer目录下的rssrvpolicy.config文件。在“<CodeGroup>”节点下添加相应的“<CodeGroup>”节点:
    <CodeGroup class="UnionCodeGroup"
         version="1"
         PermissionSetName="FullTrust"
         Name="MyCodeGroup"
         Description="Code group for my data processing extension">
         <IMembershipCondition class="UrlMembershipCondition"
              version="1"
              Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\RSAddition.dll"
         />
  3. 编辑C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer下的web.config文件。修改<system.web>节点内的<trust>节点为<trust level="Full" originUrl="" />。

此方法适用于SQL Server 2000 Reporting Service SP2和SQL Server 2005 Reporting Service。但是不适用于没有安装过ServicePack的SQL Server 2000 Reporting Service。

在报表当中使用引用的定制程序集

在数据视图中使用

数据视图当中的对象主要是DataSet。要如何在DataSet当中使用应用的定制程序集呢?首先我们可以在DataSet当中使用参数,这个参数不是报表参数而是DataSet参数,之后我们在DataSet属性的参数页当中设置参数调用应用的定制程序集。

RSAddition3

在设计视图中使用

在设计视图中使用相对比较简单,我们只需要在相应的表达始终按照“在报表中如何引用定制程序集”一节中说明的使用方法就可以了。