This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
USE [msdb] | |
GO | |
/****** Object: Operator [DL_Peru_Operations] Script Date: 01/25/2013 08:26:18 ******/ | |
EXEC msdb.dbo.sp_add_operator @name=N'DL_Peru_Operations', | |
@enabled=1, | |
@weekday_pager_start_time=90000, | |
@weekday_pager_end_time=180000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create index ix1_spe_summaryheader on dbo.spe_summaryheader (bl_estadoRegistro) INCLUDE (tipoDocumentoEmisor, numeroDocumentoEmisor, resumenId, bl_origen, bl_reintento); | |
create index ix1_spe_einvoiceheader on dbo.SPE_EINVOICEHEADER (bl_estadoRegistro) INCLUDE (tipoDocumentoEmisor,numeroDocumentoEmisor, tipoDocumento, serieNumero, bl_origen, bl_reintento); | |
create index ix1_spe_service_response on dbo.spe_service_response (process_state desc, running, next_try, reintento ) | |
include (tipoDocumentoEmisor, numeroDocumentoEmisor, tipoDocumento, serieNumero, origen, bl_hashFirma, bl_firma, bl_estadoRegistro, bl_estadoProceso, bl_ubl,ubl_state, bl_xml, xml_state) | |
-- create index ix1_spe_service_response on dbo.spe_service_response (process_state desc, running, next_try, reintento ) ; | |
create index ix1_spe_summary_response on dbo.spe_summary_response (process_state desc, running, next_try, reintento) | |
include (tipoDocumentoEmisor, numeroDocumentoEmisor, resumenId, origen, bl_hashFirma, bl_firma, bl_estadoRegist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXEC sp_configure 'show advanced options', 1; | |
GO | |
RECONFIGURE | |
GO | |
EXEC sp_configure 'Agent XPs', 1; | |
GO | |
RECONFIGURE | |
GO | |
DECLARE @daysleft int | |
DECLARE @instancename sysname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Declaro algunas variables | |
$NuevoDS = '/NuevaCarpeta/Data Sources/Default' | |
$rsuri = 'http://MiServidorSSRS/ReportServer' | |
$NuevaCarpetaSSRS = '/NuevaCarpeta' | |
# Obtengo los reportes de la Nueva carpeta SSRS | |
$reports = Get-RsFolderContent -ReportServerUri $rsuri -RsFolder $NuevaCarpetaSSRS | Where-Object TypeName -EQ 'Report' | |
# Cambio el Datasource que tiene por el nuevo DS | |
$reports | ForEach-Object { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Declaro algunas variables | |
$rsuri = 'http://MiServidorSSRS/ReportServer' | |
$CarpetaLocal = 'F:\Tmp\SSRS' | |
$CarpetaDestinoSSRS = '/NuevaCarpeta' | |
# Cargo los reportes | |
Write-RsFolderContent -ReportServerUri $rsuri -Path $CarpetaLocal -Destination $CarpetaDestinoSSRS -Verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Definir algunas variables | |
$rsuri = 'http://MiServidorSSRS/ReportServer' | |
# Guardar los reportes de la carpeta original en una variable | |
$reports = Get-RsFolderContent -ReportServerUri $rsuri -RsFolder '/CarpetaOriginal' | | |
Where-Object TypeName -EQ 'Report' | |
# Descargar los reportes en una carpeta local | |
$reports | ForEach-Object { Out-RsCatalogItem -ReportServerUri $rsuri -RsItem $_.Path -Destination 'F:\Tmp\SSRS' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install-module ReportingServicesTools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- creamos las variables tipo tabla | |
DECLARE @tmp1 TABLE (object_id int, name sysname) | |
DECLARE @tmp2 TABLE (object_id int, column_id int, name sysname) | |
-- insertamos la informacion en las variables tipo tabla | |
insert into @tmp1 | |
select object_id, name | |
from sys.all_objects | |
insert into @tmp2 | |
select object_id, column_id, name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- creamos tabla temporal 1 y la llenamos | |
select object_id, name | |
into #tmp1 | |
from sys.all_objects | |
-- creamos tabla temporal 2 y la llenamos | |
select object_id, column_id, name | |
into #tmp2 | |
from sys.all_columns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
DB_NAME(mf.database_id) | |
,sum(fs.num_of_reads) as total_reads | |
from sys.master_files mf | |
cross apply sys.dm_io_virtual_file_stats(mf.database_id,NULL) fs | |
where mf.database_id = 2 | |
and mf.type_desc = 'ROWS' | |
group by mf.database_id | |
GO | |
DECLARE @temp1 TABLE (col1 int) |
NewerOlder