on 11-25-2014 12:12 AM
HOLA BUEN DIA,
QUISIERA IDENTIFICAR QUE USUARIO ES EL QUE ESTA EJECUTANDO REPORTES MUY PESADOS PARA DETECTARLO Y TENER PRUEBAS PARA QUE LOS REALICE EN OTRO HORARIO,
PODRIA REALIZARLO CON EL ACTIVITY MONITOR DE SQL MANAGENEMENT EN PROCESOS PERO QUE COLUMNA O PARAMETRO ME INDICA QUE % DE SOLICITUD DE PROCESADOR Y/O MEM RAM SOLICITA
O OTRA PODRIA SER VIA QUERY PERO CUAL?
AGRADEZCO SUS APORTACIONES
SALUDOS
Estimado Jorge buen día,
quizás esto pueda ser de gran ayuda para lo que necesitas
SQL SERVER PARA TODOS Gustavo Ricardo Herrera : SP_WHO2 - Estudiando Lentitud en Sql Server
"..Hay tres análisis básicos que pueden ayudarnos a la hora de estudiar un degradamiento general de nuestra Base de Datos.
A) Estudiar Posibles Bloqueos
B) Analizar Valores Altos de I/O y CPU
C) Relevar Múltiples Procesos con un mismo SPID, (el spid es el nº que el sql server le da a cada proceso corriendo en el servidor).. "
Saludos,
IFV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
IVAN BUENAS TARDES,
UNA CONSULTA NECESITO BLOQUEAR TODA CREACION DE MOVIMIENTOS COMO ENTRADAS DE MERCANCIAS X STOCK DE UN ALMACEN '500' TENGO EL SIGUIENTE CODIGO PERO NO ME ESTA VALIDANDO. ME PODRIAS AYUDAR?
MIL GRACIAS DE ANTEMANO!!
IF ((@transaction_type IN ('A','U')) AND (@object_type = '59'))
Begin
If exists(
SELECT count(*)
FROM OIGN T0 INNER JOIN IGN1 T1 ON T0.DocEntry = T1.DocEntry
WHERE (T1.[WhsCode] = '500' and t1.Price <> '') and T1.DocEntry = @list_of_cols_val_tab_del
)
Set @error = 1
Set @error_message = 'ERROR: ALMACEN 5000 NO PERMITE MOVIMIENTOS '
End
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HOLA IVAN
REQUIERO DE TU APOYO PARA REPLICAR EL INFORME DE ANALISIS DE VENTAS PARA AGREGARLE UN PAR DE CAMPOS PERO:
TENGO EL SIGUIENTE QUERY PERO ME ARROJA DIFERENCIAS EN ALGUNOS ARTICULOS CUANDO ESTOS TIENEN DESCUENTOS, FACTURAS DE ANTICIPOS, O ESTAN ABIERTOS.
EN FIN CUADRA EN UN 80 %, NECESITO EL 100% ME PODRIAN AYUDAR POR FAVOR
SELECT ItemCode,
Sum(TotFac) - SUM(TotNC) as 'FacturadoNeto',
Sum(GBrutaFac)-SUM(GbrutaNC) as 'GBruta',
Round((Sum(GBrutaFac)-SUM(GbrutaNC))/case when (Sum(TotFac) - SUM(TotNC))= 0 then 1 else (Sum(TotFac) - SUM(TotNC)) end *100,2) as '% Margen'
FROM (
SELECT
ItemCode = T1.ItemCode,
Marca = (Select T2.FirmName from OMRC T2 JOIN OITM T3 on T2.FirmCode = T3.FirmCode where T3.ItemCode=T1.Itemcode),
TotFac = Sum(T1.Linetotal),
GBrutaFac = SUM(T1.GrssProfit),
TotNc= 0,
GbrutaNC = 0
FROM OINV T0 (NOLOCK) INNER JOIN INV1 T1 (NOLOCK) ON T0.DocEntry = T1.DocEntry
WHERE (T0.[DocDate] >='20140101' AND T0.[DocDate] <='20141231')
and T0.DocType = 'I' -- solo facturas por articulos
Group by T1.ItemCode
Union
SELECT
ItemCode = T1.ItemCode,
Marca = (Select T2.FirmName from OMRC T2 JOIN OITM T3 on T2.FirmCode = T3.FirmCode where T3.ItemCode=T1.Itemcode),
TotFac = 0,
GBrutaFac = 0,
TotNc= Sum(T1.LineTotal),
GbrutaNC = SUM(T1.GrssProfit)
FROM ORIN T0 (NOLOCK) INNER JOIN RIN1 T1 (NOLOCK) ON T0.DocEntry = T1.DocEntry
WHERE (T0.[DocDate] >='20140101' AND T0.[DocDate] <='20141231')
and T0.DocType = 'I' -- solo NC por articulos
Group by T1.ItemCode
Union
SELECT
ItemCode = T1.ItemCode,
Marca = (Select T2.FirmName from OMRC T2 JOIN OITM T3 on T2.FirmCode = T3.FirmCode where T3.ItemCode=T1.Itemcode),
TotFac = 0,
GBrutaFac = 0,
TotNc= Sum(T1.LineTotal),
GbrutaNC = SUM(T1.GrssProfit)
FROM ODPI T0 (NOLOCK) INNER JOIN DPI1 T1 (NOLOCK) ON T0.DocEntry = T1.DocEntry
WHERE (T0.[DocDate] >='20140101' AND T0.[DocDate] <='20141231')
and T0.DocType = 'I' -- solo Fact Anticipos por articulos
Group by T1.ItemCode
) T
Group by ItemCode, Marca
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.