Bug 535448 (RHQ-2142)

Summary: add sql server database option
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: DatabaseAssignee: Joseph Marques <jmarques>
Status: CLOSED NEXTRELEASE QA Contact: Pavel Kralik <pkralik>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: mvecera
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-2142
Whiteboard:
Fixed In Version: 1.3 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joseph Marques 2009-06-10 01:20:00 UTC
add base support for running product on top of SQL Server

Comment 1 Joseph Marques 2009-06-10 01:36:57 UTC
rev4062 - add embedded database support to product using SQL Server:
1a) add SQLServerDatabaseType and override dbutils Column, Table, DataSet and XmlDataSet class as needed by T-SQL syntax;
1b) add T-SQL data type mappings in db-typemaps.xml; 
2) support SQL Server-specific helper methods to DatabaseTypeFactory and PersistenceUtility for ;
3) change rhq-container.build.xml to support SQL Server datasource (with snapshot isolation) and JMS backends;
4a) fix (or add new) native queries as necessary to support T-SQL syntax;
4b) extend logic in several SLSBs that switch on DatabaseType for various native sql solutions;
5) include default SQL Server configuration to /etc/m2/settings.xml using JTDS; 
6) change ALL domain entities in the project to use GeneratorType.AUTO (which default to identity strategy for SQL Server and sequence for Oracle/Postgres); 

Comment 2 Joseph Marques 2009-06-10 01:45:21 UTC
note, this support is currently experimental.  since sql server doesn't support MVCC, you must alter the database to use read committed with row versioning (a feature that became available in sql server 2005)

ALTER DATABASE rhq SET READ_COMMITTED_SNAPSHOT ON

unfortunately, this doesn't solve all issues.  given the set of SLSBs we have today, we still have a few hot spots in the application where transaction size and/or duration cause some locking issues.  

note: i haven't seen any locking issues with measurement and/or availability reporting yet.

Comment 3 John Mazzitelli 2009-06-10 05:04:39 UTC
svn rev4065 adds support for ms sql server to the installer

Comment 4 Joseph Marques 2009-06-24 01:55:28 UTC
rev4168 - add support for SQL Server 2008; 
drop isolation level to read committed (w/row versioning) instead of snapshot isolation; 

Comment 5 Pavel Kralik 2009-07-01 16:09:55 UTC
The installer supports ms sql server option. r4181

Comment 6 Red Hat Bugzilla 2009-11-10 20:58:40 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2142
This bug is related to RHQ-2116
This bug is related to RHQ-2208
This bug relates to RHQ-2175