domingo, 26 de julho de 2020

Enabling rc.local in Debian 9.x and 10.x (Stretch)


Update: 06/05/2020 – I seem to have missed a couple of steps when I created the initial post! (I forgot about the systemd unit file – now corrected)

rc.local has been deprecated in Debian 9.

However, you can still enable it with the following steps.

Create a new file /etc/rc.local

Add the following lines:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0

Make rc.local executable

chmod +x /etc/rc.local

Create a new systemctl unit file

vi /etc/systemd/system/rc-local.service

Add the following to this new file:

[Unit]
 Description=/etc/rc.local Compatibility
 ConditionPathExists=/etc/rc.local
 Wants = network-online.target
 After=local-fs.target network-pre.target apparmor.service systemd-sysctl.service systemd-modules-load.service dbus.service
 Requires = dbus.service 

[Service]
 Type=forking
 ExecStart=/etc/rc.local start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes
 SysVStartPriority=99

[Install]
 WantedBy=multi-user.target

Enable rc.local

systemctl enable rc-local

Start the service:

systemctl start rc-local.service

Get the service status:

systemctl status rc-local.service

If successful, the status output should look like this:

systemctl status rc-local.service
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
  Drop-In: /lib/systemd/system/rc-local.service.d
           └─debian.conf
   Active: active (running) since Tue 2018-07-31 09:37:33 BST; 3h 49min ago
  Process: 522 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)



sexta-feira, 30 de agosto de 2019

quarta-feira, 24 de julho de 2019

Realizando uma busca textual em todas as colunas, de todas as tabelas no SQL Server



stpBusca_String_Tabela:
Exemplos de utilização:


SQL, sql server, sql server 2008, sql server 2008 R2, Oracle, Oracle Database, Oracle 11g, Oracle 10g, Oracle 12c, MySQL, Firebird, Consultoria, Consultor, Programador, Programação. Desenvolvedor, Analista de Sistemas, DBA, Criação de website, Criação de Sistema Web, Vitória, Vila Velha, Guarapari, Espírito Santo, ES, Consultoria SQL em VItória, Treinamento, Curso, Prestação de serviço, prestar serviço, freelancer, freela, banco de dados, consultoria em banco de dados, consultor de banco de dados


Autor: Dirceu Resende  https://www.dirceuresende.com/blog/realizando-uma-busca-textual-em-todas-as-colunas-de-todas-as-tabelas-de-todos-os-databases-no-sql-server/