FIREBIRD RDBMSQuick TutorialchinsanFirebird DBAInstallation and common DB operationServer, Account ManagementTroubleshootingSecurity and AuditBackup and RestoreSome Firebird SQL toolsInstallationThere are 2 main types of builds: the “Superserver” and the “Classic server”. We went for the Superserver because it scales better with higher number of connections (although it lacks SMP support).FirebirdSS-1.5.4.4910-0.i686.tar.gzextract the tarball[chinsan@GST scripts]$ diff -ruN preinstall.sh.orig preinstall.sh--- preinstall.sh.orig 2007-10-17 15:14:19.000000000 +0800+++ preinstall.sh 2007-10-17 15:15:05.000000000 +0800@@ -214,22 +214,6 @@ } -#-------------------------------------------------------------------------# Check for presence of editor 'ex'--checkForEx() {- ex <<EOS >/dev/null 2>&1-q-EOS- if [ $? -ne 0 ]- then- echo "+------------------- ERROR -----------------------+"- echo "| Your system miss editor 'ex'. |"- echo "| Please install it before running setup program. |"- echo "+-------------------------------------------------+"- exit 127- fi-} #== Main Pre =================================================================@@ -239,7 +223,6 @@ ArchiveDateTag=`date +"%Y%m%d_%H%M"` ArchiveMainFile="${FBRootDir}_${ArchiveDateTag}.tar.gz" - checkForEx # Ok so any of the following packages are a problem # these don't work at least in the latest rpm manager, since itServerStart Serverservice firebird startor su -c "fbmgr -start" firebirdor su -c "fbmgr -start -forever -password SYSDBApassword" firebirdStop Serverservice firebird stopor su -c "fbmgr -shut -password SYSDBApassword" firebirdAccount managementthe default admin username:password pair for Firebird is SYSDBA:masterkey.In fact, it’s ‘masterke’ as only the first 8 characters are checked.It is STRONGLY recommended that you change the SYSDBA password with:% gsec -user SYSDBA -pass masterkeyGSEC> modify SYSDBA -pw newpasswordGSEC> quitbefore doing anything serious with Firebird.Add user:% gsecGSEC> add myuser -pass mypasswordGSEC> quitForget password?If you still have SYSDBA password, it’s easy as SYSDBA can alter password of any user. If not, you need to replace the security.fdb with a clean one (where you know the password).SYSDBAbin/changeDBAPassword.sh/etc/init.d/firebirdISC_PASSWORD=foobarWARNING: you should not expose the SYSDBA password in a publicly-readable file. So please ensure this file is not world readable. Eventually this file should not need to contain any passwords. As root user alone should be sufficient privilege to stop/start the server.gsec Explanation of gsec switches:-user should always be SYSDBA-pass SYSDBA password-mo modify user-add add user-del delete user-pw password for userCommon DB operation(1)interactive shell: isqlIn isql, every SQL statement must end with a semicolon(;). if forgot the semicolon, just type it after CON> prompt.databse connection:Note: Server name and pathSQL> connect hostname:”/path/to/employee.fdb” user ‘SYSDBA’ password ‘SYSDBApassword’;Important: If you run Classic Server on Linux, a fast, direct local connection is attempted if the database path does not start with a hostname. This may fail if your Linux login doesn’t have sufficient access rights to the database file. In that case, connect to localhost:/<path>. Then the server process (with Firebird 1.5 usually running as firebird) will open the file. On the other hand, network-style connections may fail if a user created the database in Classic local mode and the server doesn’t have enough access rights.If you run Classic Server on Windows, you must specify a hostname (which may be localhost) plus a full path, or the connection will fail.Common DB operation(2)quit:SQL> QUIT;In the CREATE DATABASE statement the quotes around path string, username, and password are mandatory. This is different from the CONNECT statement. ie.SQL>CREATE DATABASE 'D:\data\test.fdb' page_size 8192CON>user 'SYSDBA' password 'masterkey';
Add New Comment