Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Get MAC address from Firebird

23 views
Skip to first unread message

Pepe Pérez

unread,
Sep 10, 2024, 5:49:56 PM9/10/24
to firebird-support
Is there a way to get the MAC address of the server from Firebird? 

The idea is to detect if the database is moved to a different computer

Thank you.

Dimitry Sibiryakov

unread,
Sep 10, 2024, 5:54:59 PM9/10/24
to firebird...@googlegroups.com
Pepe Pérez wrote 10.09.2024 23:49:
> Is there a way to get the MAC address of the server from Firebird?

No built-in methods but you always can write UDF or UDR to get any
information you want.

> The idea is to detect if the database is moved to a different computer

Normally no one cares where the database is located physically as long as
they can access it. In a clustered environment databases and servers can migrate
anywhere resources are available.

--
WBR, SD.

hamacker

unread,
Sep 13, 2024, 10:00:19 AM9/13/24
to firebird...@googlegroups.com
If you need to know what it is, a production or development server, just use port 8050 for your development.
To detect what the port I use in current connection:
declare variable is_dev boolean;
declare variable remoteserviceport_value type of column rdb$config.rdb$config_value;
BEGIN
  is_dev=false;

  select a.rdb$config_value from rdb$config a
  where a.rdb$config_name='REMOTESERVICEPORT'
  into remoteserviceport_value;

  if (lremoteserviceport_value='8050') then
    is_dev=true;


--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/7d959ba4-3bb1-49dc-9346-2f9c064febb1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages