HSQLDB creating database with properties in server.properties file - hsqldb

I want to create a database on server startup with certain properties. I have the following in my server.properties file:
server.database.0=file:db;check_props=true;sql.enforce_names=true;sql.pad_spaces=false;hsqldb.default_table_type=cached;hsqldb.tx=locks;hsqldb.tx_level=serializable;hsqldb.write_delay=false
server.dbname.0=ssi
I don't see these reflected in the resulting db.properties file. How should I do this?

These properties are for HSQLDB 2.2.9. The properties file for version 2.x does not contain such properties. The .script file contains the equivalent SQL setting statements.
Most URL properties, including those you have used, do not apply to an existing database.
There is also an issue check_props=true, which wrongly flags the sql.pad_space property.

Related

HSQLDB 2.3.3 database properties file

I am new to hsqldb and I am trying to upgrade an existing hsqldb database server from version 1.8 to 2.3.3. I want to copy the database properties from old db.properties to the new one, but it gets overwritten everytime I restart the db server. I have tried setting the db properties using sql commands but it does not show up in the new db.properties file. Please tell me how to set properties for the hsqldb database.
HSQLDB does not store the general database settings in the .properties files. Instead, it stores the settings as a series of SET ... statements in the .script file. The relevant properties of the old database are converted to the new settings when you upgrade.
http://hsqldb.org/doc/2.0/guide/management-chapt.html#mtc_database_settings

How to add breaking views to an Visual Studio SQL Server Database Project

I've created an SQL Server Database Project so that I can capture my database schema and add it to source control.
My problem is that the database contains Views which reference external databases. Given the business and project environment, this is an acceptable solution in the short tomedium term.
Sadly, this stops the database project from compiling, (since it don't contain the external database tables).
What are my options for getting around this error? I'm currently storing the schema in a single generated script, which is a pain to update.
Look at creating dacpac files out of the external databases and add them as database references. I did that by using the SQLPackage command line to generate the file, put the files in a "shared" folder (optional, but useful if this pattern persists with other projects), then add a database reference to the project. I recommend removing the variable for the DB name unless it can change in different environments. I blogged a bit about this here:
http://schottsql.blogspot.com/2012/10/ssdt-external-database-references.html
Now if it's a truly breaking change, I've done this through post-deploy scripts. Drop/recreate the view and reapply any permissions necessary. That's not ideal, but it can work.

Check SQL in QlikView

Is it possible to see the SQL QlikView generates when accessing the data in a database? (Something like in BusinessObjects "Show Script" option).
If yes, where can I find it?
In the QVW file where the SQL exists, go to the document properties:
Settings -> Document Properties -> General - check the 'Generate Logfile' checkbox. On the next reload, a log file will now be created in the same folder as the QVW with a .log extension. So if your QVW is called abc.qvw, there will be a log file called abc.qvw.log in the same folder. In this log file, the SQL which is passed to the database will be logged (this will be the sql after any dynamic elements have been evaluated - e.g. any dynamic variables which might be injected into the where clause).

NHibernate configuration: Configure(pathToXml) vs AddXmlFile(pathToXml)?

What's the difference between
Configuration.Configure(string)//Configure NHibernate using the file specified.
and
Configuration.AddXmlFile(string)//Read mappings from a particular XML file.
?
It looks like the latter's functionality is a subset of the former's, but does anyone care to elaborate?
The first one is to configure dialect, driver and other configurations properties.
The second is used if you want to append an additional XML mapping (HBM) file to an existing configuration object.
For example, create a Configuration using FluentNHibernate then append a classic XML mapping (when migrating legacy NH application to FNH, for example).

MSBuild and BizTalk

Is it possible to specify (or override) the Deploy ApplicationName, database server, and database name for BizTalk projects? If so, how?
Unfortunately this data is stored in the btproj.user file instead of the .btproj file, and my client doesn't want to check the btproj.user files into the source control system.
(FYI - we are using BizTalk Build Generator from CodePlex.)
I've just reviewed the source on CodePlex. When I understood everything correctly they are generating
%AppName%.Custom.targets
%AppName%.Custom.properties
files. Within the properties file some properties are listed for BTS Database Connectivity
<BizTalkDatabaseServerName>.</BizTalkDatabaseServerName>
<BizTalkManagementDatabaseName>BizTalkMgmtDB</BizTalkManagementDatabaseName>
<BizTalkManagementDatabaseConnectionString>
server=$(BizTalkDatabaseServerName);
database=$(BizTalkManagementDatabaseName);
integrated security=sspi;
</BizTalkManagementDatabaseConnectionString>
<PipelineComponentsFolderPath>C:\Program Files\Microsoft BizTalk Server 2010\Pipeline Components</PipelineComponentsFolderPath>
You could easily override these Property values by using the commandline or by adding additional msbuild arguments in VS or TeamBuild using the Property switch
msbuild.exe MyBizTalkProject.proj /p:BizTalkDatabaseServerName=SqlCluster
The developer of this project should rewrite the default MSBuild.Custom.properties file to look like this
<BizTalkDatabaseServerName Condition="'$(BizTalkDatabaseServerName)'==''">.</BizTalkDatabaseServerName>
By using this approach the "." identifier (for local SQL Server) will only be used when no value for the parameter is given. Because with the current implementation the definition of the Property could! override you value passed from the command line. So be aware of that.