README.fbsvcmgr 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. New utility fbsvcmgr in firebird 2.1.
  2. Firebird (like interbase 6 and before) never had a way to access service from command line.
  3. With the exception of -service switch of gbak and total use of services API in gsec since FB2,
  4. to use services one had to use third party GUI or write himself a program using C or other
  5. programming language. Use of GUI is almost always not a problem, when you work with local machine
  6. or machine in your LAN. But in case, when you connect to remote unix server using any text-only
  7. connection, use of services is almost impossible. And this is really a problem sometimes.
  8. Utility fbsvcmgr solves this problem. With it you may use any service, implemented by firebird.
  9. To use this utility you should be familiar with firebird services API - fbsvcmgr does NOT emulate
  10. traditional utilities switches, this is just frontend with services API. The first required
  11. parameter of command line is services manager you want to connect to. For local connection use
  12. simply service_mgr, to attach to remote machine something like hostname:service_mgr is OK. Later
  13. service parameter blocks (SPB) with values, when required, follow. Any of them may (or may not)
  14. be prefixed with single '-' sign. For long command lines, typical for fbsvcmgr, use of '-' makes
  15. command line better human-readable. Compare, please:
  16. # fbsvcmgr service_mgr user sysdba password masterke action_db_stats dbname employee sts_hdr_pages
  17. and
  18. # fbsvcmgr service_mgr -user sysdba -password masterke -action_db_stats -dbname employee -sts_hdr_pages
  19. Syntax of service parameter blocks, understood by fbsvcmgr, almost exactly match with one you may
  20. see in ibase.h include file or Borland InterBase 6.0 API documentation. To save typing and make
  21. command line a bit shorter slightly abbreviated form is used. All SPB parameters have one of two
  22. forms: isc_spb_VALUE or isc_VALUE1_svc_VALUE2. Accordingly in first case you should type simply
  23. VALUE, and for the second - VALUE1_VALUE2. For example:
  24. isc_spb_dbname => dbname
  25. isc_action_svc_backup => action_backup
  26. isc_spb_sec_username => sec_username
  27. isc_info_svc_get_env_lock => info_get_env_lock
  28. and so on. Exception is one you see in the sample above - isc_spb_user_name may be specified as
  29. user_name and simply user.
  30. Describing of all SPB parameters is not real for README or release notes - it's about 40 pages
  31. in InterBase 6.0 beta documentation. Therefore here only known differences between that
  32. documentation and real life are noticed.
  33. 1. Using fbsvcmgr you may perform single action (and get results of it's execution when available)
  34. or get multiple information items from services manager. For example:
  35. # fbsvcmgr service_mgr -user sysdba -password masterke -action_display_user
  36. will list all users of local firebird server:
  37. SYSDBA Sql Server Administrator 0 0
  38. QA_USER1 0 0
  39. QA_USER2 0 0
  40. QA_USER3 0 0
  41. QA_USER4 0 0
  42. QA_USER5 0 0
  43. GUEST 0 0
  44. SHUT1 0 0
  45. SHUT2 0 0
  46. QATEST 0 0
  47. And:
  48. # fbsvcmgr service_mgr -user sysdba -password masterke -info_server_version -info_implementation
  49. will report both server version and it's implementation:
  50. Server version: LI-T2.1.0.15740 Firebird 2.1 Alpha 1
  51. Server implementation: Firebird/linux AMD64
  52. But attempt to mix all of this in single command line:
  53. # fbsvcmgr service_mgr -user sysdba -password masterke -action_display_user -info_server_version -info_implementation
  54. raises an error:
  55. Unknown switch "-info_server_version"
  56. 2. Some parameters have buggy form in Borland beta documentation. When in trouble, consult ibase.h
  57. first for correct form.
  58. 3. Everything concerning licensing was removed from interbase 6.0 and therefore not supported here.
  59. Config file view/modification is not supported in firebird since 1.5 and therefore is not implemented
  60. here.
  61. 4. isc_spb_rpr_list_limbo_trans was forgotten in Borland beta documentation, but present in fbsvcmgr.
  62. 5. Two new items, not mentioned by Borland beta documentation, were added to firebird 2.1 and are
  63. supported by fbsvcmgr. One of them works only for windows, this is isc_spb_trusted_auth, which (type
  64. as trusted_auth) forces use of windows trusted authentication by firebird. Another one is
  65. availability to set (isc_spb_)dbname parameter in all security database related actions, it's an
  66. equivalent of -database switch of gsec utility. Notice - in gsec this switch is mostly used to
  67. specify remote server you want to administer. In fbsvcmgr name of server is already given in services
  68. manager name (first parameter), therefore this parameter in most cases is not needed.
  69. 6. Items added in firebird 2.5:
  70. - bkp_no_triggers - specify it to avoid executing database-wide triggers.
  71. Author: Alex Peshkov, <peshkoff at mail.ru>