jueves, 26 de diciembre de 2019

Instalar MySQL en Linux Centos


  1. sudo yum update
  2. yum install wget
  3. wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
  4. sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
  5. yum update
  6. sudo yum install mysql-server
  7. sudo systemctl start mysqld
  8. mysql -u root -p
  9. update user SET PASSWORD=PASSWORD("password") WHERE USER='root';
  10. sudo systemctl stop mysqld
  11. sudo systemctl start mysqld


viernes, 13 de diciembre de 2019

Borrado de Logs


JOB control-m para;

1. Detectar y borrar todos los logs iguales o anteriores a X días de antigüedad

SO: windows server 2012 o superior

Tipo de job: OS
Correr como command en 1 linea:

forfiles /p "C:\IIS\LOG" /s /m *.log /D -X /C "cmd /c del @path"

nota: X reemplazar el numero de días mínimo a preservar 
ej: D-7 preserva los últimos 7 días de logs

Fin

www.axity.com



Inicio y Reinicio del agente del MS SQL Server

JOB control-m para;

1. Detectar el agente de MS SQL Server si esta abajo y subir el servicio.
2. Reiniciar el agente de MS SQL Server si esta arriba

Tipo de job: OS
Correr como command en 1 linea:

powershell.exe "if ((Get-Service -name SQLSERVERAGENT).Status -eq 'Stopped'){Start-Service SQLSERVERAGENT} if ((Get-Service -name SQLSERVERAGENT).Status -eq 'Running'){Restart-Service SQLSERVERAGENT}"

NOTA: Reemplazar SQLSERVERAGENT por el nombre del servicio de agente correcto
Fin

Job adicionales;
1. Listar servicios que contengan SQL y AGENT; powershell.exe "Get-Service | where-object {$_.name -like '*SQL*AGENT*'}"
2. Devolver el estado de un servicio; powershell.exe "Get-Service -name <NOMBRE_SERVICIO>"


www.axity.com



Instalar MySQL en Linux Centos

sudo yum update yum install wget wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm sudo rpm -ivh mysql-community-rele...