networking – Home network including Mac mini as DNS and DHCP server

enter image description here

As the sketch suggests, I’m trying to design a home network using a Mac mini as a DNS and DHCP server. My idea is to have the ISP router only act as Gateway to the internet. Since the Mac mini only has one ethernet connection, I was thinking to put a switch between the ISP router and Mac + Ubiquiti AP.

My question is, could a configuration like the above work? Or would I require some other configuration? I do not want the wireless devices to get IPs from the ISP router. I have disabled the Wifi on that one as well. How can I make sure that the AP hands out IPs on the Mac’s subnet and not on the ISP router’s subnet?

Thanks in advance!

sql server – Duvida sobre CONCAT SQL

Entendi como funciona sobre CONCAT do SQL-Server, mas alguém pode me ajudar?

Por Exemplo: Tenho 3 tabelas: Equipe, Motor e Piloto.

usei concat com duas tabelas Equipe e Motor

Select Concat(Equipe,' - ', Motor) EQUIPE 
  From Pilotos PI, Equipes E, Motores M
 Where P.CODIGO_EQUIPE = E.CODIGO_EQUIPE
   And P.CODIGO_MOTOR = M.CODIGO_MOTOR

Veja o resultado abaixo deu certo, mas como faço excluir mesmo nome da 2ª coluna?

Resultado                       Quero resultado assim
EQUIPE                          EQUIPE
--------------------            -----------------------------
Cooper - Climax                 Cooper - Climax
Ferrari - Ferrari               Ferrari
Maserati - Maserati             Maserati

Aguardo.

networking – How to solve MYSQL Server not accepting the connections from remote server after restoring the server from Amazon Backup AMI?

Here are the details:

# cat /etc/release

    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=20.04
    DISTRIB_CODENAME=focal
    DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
    NAME="Ubuntu"
    VERSION="20.04.1 LTS (Focal Fossa)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 20.04.1 LTS"
    VERSION_ID="20.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=focal
    UBUNTU_CODENAME=focal

# mysqld –version


    /usr/sbin/mysqld  Ver 8.0.22-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))

root@XXXXXXX:~# cat /etc/mysql/mysql.conf.d/mysqld.cnf | grep --color bind

bind-address            = 0.0.0.0

Mysql Service Status:

root@XXXXXXX:~# systemctl status mysql.service
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-03-02 12:54:00 UTC; 1h 12min ago
    Process: 31460 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 31484 (mysqld)
     Status: "Server is operational"
      Tasks: 40 (limit: 2372)
     Memory: 356.6M
     CGroup: /system.slice/mysql.service
             └─31484 /usr/sbin/mysqld

Mar 02 12:53:59 ip-192-168-1-115 systemd(1): Starting MySQL Community Server...
Mar 02 12:54:00 ip-192-168-1-115 systemd(1): Started MySQL Community Server.

root@XXXXXXX:~# tail -100 /var/log/mysql/mysql.log

/usr/sbin/mysqld, Version: 8.0.22-0ubuntu0.20.04.2 ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
2021-03-02T12:53:51.185036Z        12 Query     FLUSH PRIVILEGES
2021-03-02T12:53:54.040659Z        12 Quit

root@XXXXXXX:~# tail -25 /var/log/mysql/error.log

2021-03-02T11:48:38.852882Z 1 (System) (MY-013577) (InnoDB) InnoDB initialization has ended.
2021-03-02T11:48:38.993865Z 0 (System) (MY-011323) (Server) X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-03-02T11:48:39.083889Z 0 (Warning) (MY-010068) (Server) CA certificate ca.pem is self signed.
2021-03-02T11:48:39.084070Z 0 (System) (MY-013602) (Server) Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-03-02T11:48:39.110064Z 0 (System) (MY-010931) (Server) /usr/sbin/mysqld: ready for connections. Version: '8.0.22-0ubuntu0.20.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
2021-03-02T12:16:18.763905Z 137 (ERROR) (MY-013134) (Server) Table './flash@002dfast@002dprod@002ddb/videos' is marked as crashed and should be repaired
2021-03-02T12:16:18.765400Z 137 (Warning) (MY-010756) (Server) Checking table:   './flash@002dfast@002dprod@002ddb/videos'
2021-03-02T12:38:29.704195Z 0 (System) (MY-013172) (Server) Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.22-0ubuntu0.20.04.2).
2021-03-02T12:38:31.195350Z 0 (System) (MY-010910) (Server) /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22-0ubuntu0.20.04.2)  (Ubuntu).
2021-03-02T12:38:31.627975Z 0 (System) (MY-010116) (Server) /usr/sbin/mysqld (mysqld 8.0.22-0ubuntu0.20.04.2) starting as process 31217
2021-03-02T12:38:31.637190Z 1 (System) (MY-013576) (InnoDB) InnoDB initialization has started.
2021-03-02T12:38:31.975618Z 1 (System) (MY-013577) (InnoDB) InnoDB initialization has ended.
2021-03-02T12:38:32.112947Z 0 (System) (MY-011323) (Server) X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-03-02T12:38:32.200447Z 0 (Warning) (MY-010068) (Server) CA certificate ca.pem is self signed.
2021-03-02T12:38:32.200629Z 0 (System) (MY-013602) (Server) Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-03-02T12:38:32.233977Z 0 (System) (MY-010931) (Server) /usr/sbin/mysqld: ready for connections. Version: '8.0.22-0ubuntu0.20.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
2021-03-02T12:53:58.504425Z 0 (System) (MY-013172) (Server) Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.22-0ubuntu0.20.04.2).
2021-03-02T12:53:59.610387Z 0 (System) (MY-010910) (Server) /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22-0ubuntu0.20.04.2)  (Ubuntu).
2021-03-02T12:54:00.048268Z 0 (System) (MY-010116) (Server) /usr/sbin/mysqld (mysqld 8.0.22-0ubuntu0.20.04.2) starting as process 31484
2021-03-02T12:54:00.058643Z 1 (System) (MY-013576) (InnoDB) InnoDB initialization has started.
2021-03-02T12:54:00.443835Z 1 (System) (MY-013577) (InnoDB) InnoDB initialization has ended.
2021-03-02T12:54:00.581426Z 0 (System) (MY-011323) (Server) X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-03-02T12:54:00.665735Z 0 (Warning) (MY-010068) (Server) CA certificate ca.pem is self signed.
2021-03-02T12:54:00.665956Z 0 (System) (MY-013602) (Server) Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-03-02T12:54:00.693806Z 0 (System) (MY-010931) (Server) /usr/sbin/mysqld: ready for connections. Version: '8.0.22-0ubuntu0.20.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
root@ABCXYZ:~# mysql -u'phpmyadmin' -p -h192.168.1.115 -P3306
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.115' (110)
root@ABCXYZ:~#

Using exactly the same command from the mysql server (i.e. in this hashed out as XXXXXXX) & it works fine and we are able to connect:

root@XXXXXXX:~# mysql -u’phpmyadmin’ -p -h192.168.1.115 -P3306

I also did packet capture on the "" to ensure that there is no connectivity issue from ""
root@ip-172-31-32-115:~# tcpdump -n host 192.168.1.188
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes



12:43:19.631926 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425290709 ecr 0,nop,wscale 7), length 0
12:43:20.649648 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425291727 ecr 0,nop,wscale 7), length 0
12:43:22.665634 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425293743 ecr 0,nop,wscale 7), length 0
12:43:26.889674 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425297967 ecr 0,nop,wscale 7), length 0
12:43:35.081803 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425306159 ecr 0,nop,wscale 7), length 0
12:43:51.209876 IP 192.168.1.188.47250 > 192.168.1.115.3306: Flags (S), seq 945902876, win 62727, options (mss 8961,sackOK,TS val 1425322287 ecr 0,nop,wscale 7), length 0
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel

SQL Server Replication: Is there a way to know which articles are being used in a replicated database?

The only way to come close to being sure would be to log their usage via things like the Profiler, Extended Events, or depending on what version your SQL Server instance is, the Query Store. You’d have to pick a timeframe long enough to log that you think is sufficient since it’s possible in some contexts / businesses, some of the tables are used with low frequency for quarterly / bi-yearly / yearly reports (but maybe that doesn’t apply in your use case).

Depending on how important it is for that data to be online, you could always also perform a scream test and take the replicated destination database offline for a few hours or a day, or apply a similar strategy to a group of tables at a time, to see who starts complaining about what’s broken and then concretely determining which tables were in use for those consumers.

2013 – Server Error in ‘/’ Application when contacting SQL server

We have migrated Sharepoint 2013 application VM and Sharepoint SQL VM to new fresh server. Now when accessing it we get an application error:
enter image description here

It seems like the app VM cannot access SQL VM. But logins are working, I can assess DB via SQL server management studio with domain user. It is like config DB cannot be accessed.
Any ideas? How to troubleshoot?

sql server – Trick to remember which instance I am working with

I work as a BI developer and always switch between different instances on a same server. However, sometimes I forget the right instance and for example may cause to truncate a table on the other.
I know this is not a technical question but rather experimental. I would be so thankful if you , dear DBAs, could tell me what do you do to always work on the right instance?