Empty FogBugz Database
FogBugz will create its own schema if pointed at an empty database with one table in it:
CREATE TABLE Version (ixVersion int)
If FogBugz is pointed at such a database it will create all the necessary tables and fill them with default data.
Sometimes (particulary when you want to copy data into this table) you just want the schema and not all of the default rows that FogBugz needs to run (for instance default users, projects, areas, etc).
You can run this sql script against a database and it will remove all the data in the database, but keep the schema intact. Please be careful and do not run this script against a FogBugz database with any data you want to keep.
If your tables are not owned by 'dbo' when you move your FogBugz database you may find that the tables cannot be seen because of security restrictions.
This script will change the owner of all FogBugz tables to dbo. (Replace fogbugz in the script with the name of the FogBugz user)
You may also be able to use the following code, provided by Ian of CaseDetective:
SELECT 'EXEC(''sp_changeobjectowner @objname = '''''+
ltrim(u.name) + '.' + ltrim(s.name) + ''''''
+ ', @newowner = dbo'')'
FROM sysobjects s,
sysusers u
WHERE s.uid = u.uid
AND u.name <> 'dbo'
AND xtype in ('V', 'P', 'U')
AND u.name not like 'INFORMATION%'
order by s.name
