scripts restaurar
This commit is contained in:
parent
849b7e1cac
commit
7dc5f1b13a
11
RestaurarPersonalizado.sql
Normal file
11
RestaurarPersonalizado.sql
Normal file
@ -0,0 +1,11 @@
|
||||
RESTORE DATABASE telus_20240112
|
||||
FROM DISK = 'C:\BaseMantaGIS\TELUS\telus.bak'
|
||||
WITH
|
||||
MOVE 'telus' TO 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\telus_20240112.mdf',
|
||||
MOVE 'telus_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\telus_20240112.ldf',
|
||||
REPLACE,
|
||||
STATS = 10
|
||||
/*
|
||||
RESTORE FILELISTONLY
|
||||
FROM DISK = 'C:\Telus_Respaldos\telus.bak';
|
||||
*/
|
||||
47
Script Restaurar.sql
Normal file
47
Script Restaurar.sql
Normal file
@ -0,0 +1,47 @@
|
||||
USE[Master]
|
||||
-- select spid from master..SysProcesses WHERE DB_NAME(DBId)='telus'
|
||||
GO
|
||||
DECLARE @KillCommandSQL VARCHAR(max)
|
||||
SELECT @KillCommandSQL = COALESCE(@KillCommandSQL,'') + ' KILL '+convert(VARCHAR(10),spid)+ ';'
|
||||
FROM
|
||||
master..SysProcesses
|
||||
WHERE DB_NAME(DBId)='telus' or DB_NAME(DBId)='telus_procesos' or DB_NAME(DBId)='bancos' or DB_NAME(DBId)='telus_auditoria' or DB_NAME(DBId)='db_olympo_web'
|
||||
|
||||
PRINT @KillCommandSQL
|
||||
EXEC (@KillCommandSQL)
|
||||
|
||||
print 'Fecha Hora Inicio'
|
||||
print getdate()
|
||||
|
||||
|
||||
RESTORE DATABASE [db_olympo_web] FROM DISK = N'C:\BaseMantaGIS\db_olympo_web.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
|
||||
GO
|
||||
/*
|
||||
RESTORE DATABASE [telus_procesos] FROM DISK = N'C:\BaseMantaGIS\telus_procesos.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
|
||||
GO
|
||||
|
||||
RESTORE DATABASE [bancos] FROM DISK = N'C:\BaseMantaGIS\bancos.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
|
||||
GO
|
||||
RESTORE DATABASE [telus_auditoria] FROM DISK = N'C:\BaseMantaGIS\telus_auditoria.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
|
||||
GO
|
||||
*/
|
||||
RESTORE DATABASE [telus] FROM DISK = N'C:\BaseMantaGIS\telus.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
|
||||
GO
|
||||
|
||||
--RESTORE DATABASE [registros_ciudadanos] FROM DISK = N'C:\BaseMantaGIS\registros_ciudadanos.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
|
||||
--GO
|
||||
|
||||
print 'Fecha Hora Fin'
|
||||
print getdate()
|
||||
|
||||
|
||||
/*
|
||||
|
||||
USE tempdb;
|
||||
EXEC sp_spaceused;
|
||||
|
||||
DBCC OPENTRAN('tempdb');
|
||||
|
||||
USE tempdb;
|
||||
DBCC SHRINKFILE(templog, 1);
|
||||
*/
|
||||
19
procesos.sql
Normal file
19
procesos.sql
Normal file
@ -0,0 +1,19 @@
|
||||
use telus;
|
||||
select * from agcm_transferenciaspas where lote_id = 52504;
|
||||
|
||||
|
||||
exec [dbo].[agcm_portal_kardexpredial] '3123109000', 'kardex'
|
||||
|
||||
exec telus_reporte_avaluo_kardex 58167
|
||||
|
||||
/*
|
||||
clave no sale valores en /consulta (portal)
|
||||
/api/Operaciones/ColsultaClaveDatosFull/3123109000/2025
|
||||
*/
|
||||
select * from agcm_transferenciaspas xx where xx.lote_id=58167 --and xx.ano_id=c.ano_id
|
||||
--delete agcm_transferenciaspas where id= 2684;
|
||||
|
||||
/*
|
||||
clave con exoneración remisión
|
||||
modificar agcm_procesos_mantagis_interes_predios_exonerar linea 36 agregar lote id
|
||||
*/
|
||||
Loading…
x
Reference in New Issue
Block a user