The creator - a Firebird user stored in the security database - of a database and database objects becomes automatically the "owner". The owner of the database (beside SYSDBA) can run a backup, execute "gfix" and more. The owner of database objects like tables, views, stored procedures ... can add/drop fields, grant SQL privileges to other users, alter stored procedures and more. The database owner is not necessarily the owner of objects inside the database and changing the database owner via a backup/restore cycle doesn't change the owner of database objects automatically. Hmm, quite confusing, right? But that's the way how it currently works.
Each Firebird installation comes with a pre-installed user called SYSDBA. SYSDBA is an interesting user for those, who don't want to fiddle around with user management. Usually, this is the case for Firebird newbies. But, using SYSDBA as owner is not the best idea, because you don't have control over the password if there is already a Firebird installation at your customers site or even worse, web-hosters probably don't allow using SYSDBA. So, SYSDBA is fine for in-house usage, but a NO GO for deployment. At least this is my opinion.
What's next? Right! How do I change the owner from SYSDBA to something else? There is no regular DDL statement for that. One way is to recreate the database via a SQL script and pump data over. A second approach is to use a carefully researched mix of backup/restore cycles and direct system table manipulations via our tool FBOwnerMigrator. This is a wizard driven Windows application which guides you through the necessary steps. The good news for you is, we don't want money for it. ;-) And the bad news, there is no public download available. I was often asked: "Why?". I answered: "Because it hacks system tables which may corrupt your database". Although corruption did not happen yet and there are already quite some people out there using this tool for some years. But one never knows.
So, if you want a copy, please contact me.
Regards,
Thomas
Each Firebird installation comes with a pre-installed user called SYSDBA. SYSDBA is an interesting user for those, who don't want to fiddle around with user management. Usually, this is the case for Firebird newbies. But, using SYSDBA as owner is not the best idea, because you don't have control over the password if there is already a Firebird installation at your customers site or even worse, web-hosters probably don't allow using SYSDBA. So, SYSDBA is fine for in-house usage, but a NO GO for deployment. At least this is my opinion.
What's next? Right! How do I change the owner from SYSDBA to something else? There is no regular DDL statement for that. One way is to recreate the database via a SQL script and pump data over. A second approach is to use a carefully researched mix of backup/restore cycles and direct system table manipulations via our tool FBOwnerMigrator. This is a wizard driven Windows application which guides you through the necessary steps. The good news for you is, we don't want money for it. ;-) And the bad news, there is no public download available. I was often asked: "Why?". I answered: "Because it hacks system tables which may corrupt your database". Although corruption did not happen yet and there are already quite some people out there using this tool for some years. But one never knows.
So, if you want a copy, please contact me.
Regards,
Thomas


