jueves, 13 de febrero de 2014

Cómo levantar el Proxy de Aplicación de servicio de recolección de datos de mantenimiento (WSS_UsageApplication)

Vía Management Shell para SharePoint 2013 podemos realizar el siguiente procedimiento

1) Ejecute el Management Shell para SharePoint 2013 como Administrador

image

2) Ejecute la línea de comando Get-SPServiceApplicationProxy

image

3) Copie el Id del Proxy en este caso es WSS_UsageApplication y el ID es  19f516f5-caf1-4112-a0e2-6afec2fbd8cf

4) Declare una variable en memoria con la instancia del Proxy en cuestión:

 

PS C:\> $proxy = Get-SPServiceApplicationProxy  19f516f5-caf1-4112-a0e2-6afec2fbd8cf

5) Provisione de nuevo el Proxy de la siguiente manera:

$proxy.Provision()

 

Si revisamos ahora el Proxy debería indicar que esta iniciado

image

En esta publicación vimos como iniciar de nuevo el Proxy de recolección de datos de mantenimiento o Usage and Health Data collection de SharePoint 2013. 

Hasta la próxima,

Juan Manuel Herrera Ocheita

miércoles, 5 de febrero de 2014

Depurando base de datos de contenido para migrar a SharePoint

Esto es aplicable a casi todas las versiones de SharePoint (2007,2010,2013) utilizando el método de migración “Attached Content Database”.  Es importante mencionar que no migrar con las herramientas y procesos definidos por Microsoft de 2007 a 2013, es necesario pasar de 2007 a 2010 y luego de 2010 a 2013, por lo que si es su caso es necesario que tome en cuenta que debe de provisionar un servidor intermedio donde instale la granja de 2010 que incluye SQL Server y SharePoint 2010 en la edición de SharePoint del origen.  Es decir si esta migrando la Edición Standard la granja intermedia debe de ser Standard, la destino (SP 2013) puede ser igual o mayor es decir Standard o Enterprise pero no menor.

Normalmente pensamos que migrar el contenido es simplemente el ejecutar algunos comandos y asistentes y no debemos de preocuparnos por lo que estamos migrando y este pensamiento esta lejos de ser la realidad cuando nos enfrentamos a migrar contenido.

Uno de los problemas que encontramos con el contenido es que esta atado a personalizaciones o customization  (plantillas, elementos web, ensamblados, paginas)que ya no están disponibles en las versiones siguientes de SharePoint.

Una de las decisiones que tenemos que tomar con las personalizaciones que no pueden ser actualizadas es si vamos a continuar con ellas o bien vamos a depurarlas.  Especialmente cuando solo se crearon para pruebas de concepto o es un contenido que no estamos utilizando.

Si la decisión es depurar el contenido asociado debemos de tomar las siguientes consideraciones:

1) Cómo saber qué contenido esta asociado a estas personalizaciones?

Para ello es necesario realizar el siguiente procedimiento:

1) Realizar una copia de respaldo en SQL server de la base de datos de contenido (wss_content_???)

2) Restaurar la copia de respaldo en el servidor o instancia de SQL Server del SharePoint a migrar

3) En el front-end del SharePoint a migrar (ej SP 2013) ejecutar el PowerShell para SharePoint el siguiente comando:

test-SPContentDatabase –Name [nombre de base de datos de contenido] –WebApplication [url de la aplicación Web a migrar]

Supuestos Claves para ejecutar este comando:

1) Disponer de la instalación de la granja de SharePoint de la versión a migrar.  Por ejemplo si deseamos migrar de SharePoint 2010 a 2013, necesitamos tener lista la granja de SharePoint 2013.

2) En la granja SharePoint 2013 crear una Aplicación Web donde la base de datos de contenido se migrara.  Para ello ejecutar la siguiente línea de comando:

New-SPWebApplication -Name "Nombre de la aplicación Web" -Port 80 -URL https://hostname -ApplicationPool "Nombre del grupo de aplicaciones o Application Pool" -ApplicationPoolAccount (Get-SPManagedAccount "DOMAIN\accountname")

NOTA: Esta forma de crear la aplicación web sin indicar el proveedor de autenticación nos permitirá crear de modo de autenticación clásica que es el encontrado en la mayoría de instalaciones de SharePoint en versiones anteriores.

El reporte que muestra el comando Test-SPContentDatabase es similar al siguiente:

 

Category        : MissingSetupFile
Error           : True
UpgradeBlocking : False
Message         : File [SiteTemplates\PWA\dwp\OWCViewPart.webpart] is reference
                  d [1] times in the database [wss_content], but is not install
                  ed on the current farm. Please install any feature/solution w
                  hich contains this file.
Remedy          : One or more setup files are referenced in the database [wss_c
                  ontent], but are not installed on the current farm. Please in
                  stall any feature or solution which contains these files.

Category        : MissingSetupFile
Error           : True
UpgradeBlocking : False
Message         : File [SiteTemplates\PWA\OWCView.aspx] is referenced [1] times
                   in the database [wss_content], but is not installed on the c
                  urrent farm. Please install any feature/solution which contai
                  ns this file.
Remedy          : One or more setup files are referenced in the database [wss_c
                  ontent], but are not installed on the current farm. Please in
                  stall any feature or solution which contains these files.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [2a95bc7f-1b64-5b9c-a95e-7cefb40e285f] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [b255b401-608d-1234-e356-5094dd5939d9] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [94b5bae7-436c-dcc2-5869-d491181c283b] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [f03d4046-dd6f-42af-0763-6b694862139e] is refer
                  enced [2] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [df924004-d5d2-093e-9169-631764a71371] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [c518b765-02fe-771b-f4a9-eecb5931a900] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [02c190cb-f53b-1e26-83bc-70e3ffcb82ee] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [1edd0724-1ed3-ea30-be9b-783273bf3865] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [af35b6c5-265f-0ace-4a83-a70d245d68c8] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [a700a8e9-1c1d-79a4-6d09-65eb3e18eb9c] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [5958946a-4253-2961-26db-bb792c2d6d39] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [2bcf2517-38c7-3d4a-2c51-80d3a874e9b9] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [3fd0eb94-f155-f577-5443-98e094b69713] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [7a96438e-3332-7df0-0799-21f23a241ed0] is refer
                  enced [2] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [4ab44f9a-fa88-e31b-f9c6-bddaf0dda8bc] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingWebPart
Error           : True
UpgradeBlocking : False
Message         : WebPart class [5ed5ec80-694e-cbd9-826d-bc4c9fbbd297] is refer
                  enced [1] times in the database [wss_content], but is not ins
                  talled on the current farm. Please install any feature/soluti
                  on which contains this web part.
Remedy          : One or more web parts are referenced in the database [wss_con
                  tent], but are not installed on the current farm. Please inst
                  all any feature or solution which contains these web parts.

Category        : MissingAssembly
Error           : True
UpgradeBlocking : False
Message         : Assembly [Microsoft.Office.Project.Server.PWA,Version=12.0.0.
                  0,Culture=neutral,PublicKeyToken=71e9bce111e9429c] is referen
                  ced in the database [wss_content], but is not installed on th
                  e current farm. Please install any feature/solution which con
                  tains this assembly.
Remedy          : One or more assemblies are referenced in the database [wss_co
                  ntent], but are not installed on the current farm. Please ins
                  tall any feature or solution which contains these assemblies.

 

Una forma de visualizar esto mejor es utilizando el siguiente comando:

Test-SpContentDatabase -name [SiteName] –webapplication [SiteURL] -serverinstance [SQLServer] | ConvertTo-Html | Out-file

Y algo mejor una aplicación para SP 2010 para revisar el archivo y conocer la url de estas dependencias:

http://blogs.msdn.com/b/chandru/archive/2012/03/11/making-use-of-test-spcontentdatabase-generated-output.aspx

o bien a través de SharePoint Feature Administration and Clean Up Tool:

http://featureadmin.codeplex.com/

Pero si es para 2013, pueda que necesitemos aplicar Queries de SQL Server para obtener estas URL:

--Missing features

--Database [wss_content] has reference(s) to a missing

--feature: Id = [75a0fea7-cbdd-4360-90cb-12aed8c69f43]

SELECT features.SolutionId,sites.PortalName, sites.PortalURL, sites.RootWebId, fullurl = case when Webs.FullUrl = '' then webs2.fullurl else webs.FullUrl end, webs.Title, webs.WebTemplate

FROM Features

left outer join Sites

on sites.Id = Features.SiteId

left outer join Webs

on webs.Id = features.WebId

left outer join Webs as webs2

on sites.RootWebId = webs2.Id

where featureid = '75a0fea7-cbdd-4360-90cb-12aed8c69f43'

--MISSING SETUP FILES

select * from AllDocs where SetupPath like '%Features\AssetTrackingModules\default.aspx%'

-- MISSING ASSEMBLY

--Assembly [KnowledgeBaseEventHandler, Version=14.0.0.0,

-- Culture=neutral, PublicKeyToken=71e9bce111e9429c] is

-- referenced in the database [wss_content]

SELECT s.fullurl, webs.fullurl, assembly, hostType

from EventReceivers e

join webs on (e.webid = webs.id)

join sites s on (s.id = e.siteid)

where Assembly LIKE '%KnowledgeBaseEventHandler%'

-- no results

Si se decide eliminar los sitios que nos se migraran por contener plantillas no soportadas en versiones posteriores no se olvide de limpiar la papelera de reciclaje de SharePoint del usuario y de la colección de sitios porque de lo contrario seguirá marcando el error.

Si no es posible desactivar y eliminar las características a través de línea de comando o bien con la herramienta FeatureAdmin2010.exe como ultimo recurso es posible eliminar vía t-sql la feature de la tabla de features de la base de datos de contenido WSS_Content???.  Esto aunque no es soportado por Microsoft (Usted corre por su propia cuenta al ejecutarlo) pero SharePoint no contiene llaves foráneas y al parecer la declaración de las features están únicamente en dicha tabla. Por ejemplo:

begin tran

delete from Features where featureid = '75a0fea7-d31d-491a-9177-f0e461a81e3f'

--commit tran

4) Cuando ya no hay errores podemos ejecutar el comando:

Mount-SPContentDatabase –Name WSS_Content??? –WebApplication http://hostname

image

Si desea ver el avance o el reporte de la migración podemos revisarlo desde el Central Administration en la pagina /_admin/UpgradeStatus.aspx

 

5) Convertir la Web Application de modo clásico a modo de reclamos o claims.

Convert-SPWebApplication -Identity "https://<webappurl>" -To Claims –RetainPermissions [-Force]
Bueno en este artículo vimos como depurar los errores que muestra al ejecutar el comando test-SPContentDatabase.  Es un proceso largo y el cual en ocasiones tendrá que decidirse si migrar o eliminar “contenido” que ya no es soportado o  bien ya no se utiliza.
 
SharePoint4Fun!,
Juan Manuel Herrera Ocheita