21.12.2016 03:45, Geoff Worboys wrote: > > Firebird v2.5.6 32bit "Classic" > on Windows 64bit 2012 R2 Standard > > I have an ON CONNECT database trigger in which I try to collect > the client address and network protocol using: > > rdb$get_context('SYSTEM', 'CLIENT_ADDRESS') > and rdb$get_context('SYSTEM', 'NETWORK_PROTOCOL') > > Most of the time they work, but sometimes they return NULL.
Usually this means an embedded connection to the database. While CLIENT_ADDRESS theoretically could be NULL for network connections, I can hardly believe this is possible for NETWORK_PROTOCOL which is filled by the remote server and does not depend on the client in any way. Even if you don't use fbembed to access that database, it could happen implicitly on the server side, e.g. if you use EXECUTE STATEMENT ON EXTERNAL and use a hostless connection string, or if you run gbak/gstat/gfix via the Services API (they connect embeddedly in this case). Dmitry ------------------------------------ ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------------------------ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/