CyberArmy University | Open Source Institute | CyberArmy Intelligence & Security | CyberArmy Services & Projects

[Miscellaneous] Using Firebird


[Reply] [View by Thread] [Help]
[Back To Article Discussion Forum]

Posted by Author Rae On 2007-04-29 10:02:26




View and vote on the article here: Using Firebird


Using Firebird

Category
Miscellaneous
Summary
Body
<p align="left]
Using Firebird





Changing Passwords



We know that the Firebird default administrative account is called "sysdba" and its default password is "masterkey". It is a good policy to change the defaults.



Let us suppose we are running Firebird in a Windows environment and have installed it in the path C:\\Program Files\\Firebird\\Firebird_1_5



Launch the command prompt by going to your Start button, then clicking run, then typing in "command" or "cmd". Move to the above directory, or in the installed Firebird directory.



Type



cd bin



Then at the prompt type



gsec -user 'sysdba' -password 'masterkey'

GSEC>modify sysdba -pw newpassword




Here, newpassword (which needs brackets around it like <>) signifies the new password for "sysdba." Now the same technique can be used for changing passwords of other users - you just have to change the first parameter from "sysdba" to the username whose password you want to modify.




Creating Databases



Databases in Firebird are stored with a .fdb extension. To create one, launch the command prompt and type



C:\\Program Files\\Firebird\\Firebird_1_5\\bin>isql


SQL>create database 'c:\\mydbs\\try.fdb' user 'SYSDBA' password 'masterkey';




This creates a database "try.fdb" in the directory c:\\mydbs with the creator as SYSDBA.



Adding Users



For granting roles and accesses to implement access control, it is essential to create new users. Type the following at the command prompt:



C:\\Program Files\\Firebird\\Firebird_1_5\\bin>gsec -user 'sysdba' -password 'masterkey'

GSEC>add newbie -pw pass




This will create a new user called "newbie" and with password "pass".




ODBC Usage



Firebird supports most of the common programming interfaces, such as:



- ODBC (Open Database Connectivity)



- JDBC (Java Database Connectivity)



- ADO.NET



The ODBC Driver is available as a separate executable which, in my case, was named Firebird_ODBC_1.2.0.69-Win32.exe.



The setup of the binary is straightforward, and any DBA will breeze through it.



After installation, go to the ODBC Setup in the Control Panel, select the "System DSN" tab and then click "Add." From the list given, select "Firebird/Interbase Driver" and then click "Finish." This is followed by a "Firebird ODBC Setup" window. In this give a Data Source Name (DSN), the path to your .fdb file, the username and the password associated. Finally test your connection.



Designing front-ends for Firebird databases with tools like Visual Basic comprises of setting up the database, the ODBC connection shown above and the visual design covered in any standard Visual Basic book.




References



http://www.firebirdsql.org



http://www.pcquest.com



http://www.programmersheaven.com



MSDN Online Help



Fundamentals of Database Systems by Elmasri, Navathe



Introduction to Database Management Systems by Date, C. J.



Database Concepts by Silberschatz, Korth




Written by Rae (28 December 2004)

Member of CAU Knowledge-Bank Tutorial Writers

Edited by jehnx


This article was imported from the CyberArmy University site. (original author: rae)


There are no replies to this post yet.



Guest:
Subject:
Message:
Signature:
Optional Image Link:
http://

CyberArmy::Forum v0.6
Generated In 0.01682 seconds


About Us | Privacy Policy | Mission Statement | Help