If you need assistance with rules, please contact our Technical Support team.
Access
All the rules below are available on https://software.datical.com . Browse to Common/Datical_DB_Rules.
Rules
Database | Category | Rule | Rule Type | Object Type | Filename | Description |
---|---|---|---|---|---|---|
Oracle | Performance | AddColumnsShouldNotUseDefaultValue | Forecast | Column | AddColumnsShouldNotUseDefaultValue.drl | Alter table add column statements should not include a default value specification. Columns added to existing tables should not have defaultValue set |
MSSQL | Structure | New Constraint is non-nullable on column type CHAR | Forecast | Table-Column-Constraint | Column_Constraint_CHAR_CannotBeNonNullable.drl | Restricts the user from creating a non-nullable column with CHAR datatype |
MSSQL | Structure | New Column is type image, varBinary | Forecast | Table-Column | Column_DoNotUse_Image_varBinary.drl | Warning when column type is IMAGE or VARBINARY |
MSSQL | Structure | New Column is in type (NCHAR, NVARCHAR, NTEXT) | Forecast | Table-Column | Column_DoNotUse_NCHAR_NVARCHAR_NTEXT.drl | Warn when column type is NTex, NChar or NVarchar |
MSSQL | Structure | New Column is type TEXT | Forecast | Table-Column | Column_DoNotUse_TextType.drl | Warn when column type is Text |
MSSQL | Naming Convention | New or Renamed Column is in keyword list | Forecast | Table-Column | Column_Keyword_List.drl | New or Renamed Column is in keyword list |
MSSQL | Structure | New Column is type VARCHAR(MAX) | Forecast | Table-Column | Column_VARCHAR_MAX.drl | rule which warns the user to consider VARCHAR(8000) or less instead of VARCHAR(MAX) as a column data type |
MSSQL | Naming Convention | New or Renamed Column has special characters (excluding underscore) in name | Forecast | Table-Column | ColumnName_NoSpecialCharacters.drl | Column name should not contain special characters |
MSSQL | Naming Convention | New Table Column Constraint is named by system | Forecast | Table-Column | ColumnName_NoSystemGeneration.drl | This rule checks if the name of the column while creating the table was generated by the system. When the column name is generated by the system, it starts with "COLUMN". So this rule disallows the name of the column to start with "COLUMN" string. |
MSSQL | Structure | New Column is type NTEXT | Forecast | Table-Column | Columns_DoNotUse_NTextType.drl | Warn when column type is NText |
Oracle | Standards - Corporate | DoNotAllowDropTables | Forecast | Table | DoNotAllowDropTables.drl | Fails if any undeployed changeset attempts to drop a table. |
Oracle | Standards - Corporate | Drop Column Warning | Forecast | Table-COlumn | DropColumnWarning.drl | Warn if column is being dropped |
Oracle | Standards - Corporate | Drop Table Warning | Forecast | Table | DropTableWarning.drl | Warn if table is being dropped |
All | Structure | ErrorWhenCreatingDuplicateIndex | Forecast | Index | DuplicateIndexError-MSSQL.drl | Error if creating an index, where an index already exists with the same columns, in any order. |
Postgres | Structure | ErrorWhenCreatingDuplicateIndex-Postgres | Forecast | Index | DuplicateIndexError-Postgres.drl | Error if creating an index, where an index already exists with the same columns, in any order. Postgres-specific version required |
MSSQL | Naming Convention | New Function is not prefixed with ?fn_ | Forecast | Function | Function_Format_Prefix_Xfn_.drl | error if funtion is not prefixed by Xfn (X can be any letter) |
MSSQL | Naming Convention | New Function is not prefixed with ufn_ | Forecast | Function | Function_Format_Prefix_ufn_.drl | error if funtion is not prefixed by ufn |
MSSQL | Storage Options | New or Modified Index without ALLOW_PAGE_LOCKS !=ON | Forecast | Index | Index_Allow_Page_Locks_ON.drl | Warn if "Allow Page locks" is not on for index |
MSSQL | Storage Options | New or Modified Index with ALLOW_ROW_LOCKS != ON | Forecast | Index | Index_Allow_Row_Locks_ON.drl | Warn if "Allow Row locks" is not on for index |
MSSQL | Structure | New Index is CLUSTERED and is not Primary Key | Forecast | Table-Index | Index_ClusteredAndPK.drl | Warn if the index is clustered but not a primary key |
MSSQL | Storage Options | New or Modified Index with DATA_COMPRESSION != PAGE | Forecast | Index | Index_DATA_COMPRESSION_PAGE.drl | Warn when an index is created with DATA_COMPRESSION NOT PAGE |
MSSQL | Storage Options | New or Modified Index with IGNORE_DUP_KEY != OFF | Forecast | Index | Index_Ignore_Dup_Key_OFF.drl | Warn when "Ignore Duplicate Key" if not OFF for an index |
MSSQL | Storage Options | New or Modified Index has more than 16 columns | Forecast | Index | Index_Maximum_16_Columns.drl | Error when index contains more than 16 columns |
MSSQL | Storage Options | New or Modified Index with PAD_INDEX != OFF | Forecast | Index | Index_Pad_Index_OFF.drl | Warn if Pad Index is not OFF on an index |
MSSQL | Storage Options | New or Modified Index with STATISTICS_NORECOMPUTE != OFF | Forecast | Index | Index_Statistics_NoRecompute_OFF.drl | Warn if "Statistics Recompute" is not ON on an index |
MSSQL | Naming Convention | New Index is not in format: <prefix>_<tablename>@<col1>$<col2>$<col3>$<col4>$<col5>, "New Index is not in format: <prefix>_<tablename>@<col1>$<col2>$<col3>#<col12>#<col13> (where col12, col13 are included columns; col1, col2 and col3 are columns on which index is defined)", "New Index is not in format: <prefix>_<tablename>@<col1>$<col2>$<col3>#includes (when there are more than 5 included columns)", New Index is not in format: <prefix>_<tablename>@<C#>$<C#>$<C#>$<C#>$<C#>#Includes | Forecast | Index | IndexNamingFormat.drl | Warn when New Index is not in the format <prefix>_<table-name>@<c1>>_ |
Oracle/MSSQL | Naming Convention | All new date columns should end _DATE. | Forecast | Table-Column | Oracle_Column_Date_Naming_Convention.drl | Error if column of type date do not end with _date |
Oracle/MSSQL | Naming Convention | All new columns ending with _FLAG or _FLG should be of type CHAR(1) | Forecast | Table-Column | Oracle_Column_Flag_Char1.drl | Error if column names ending in _FLAG or _FLG are not of type char(1) |
Oracle/MSSQL | Naming Convention | All new Primary key constraints should start with PK_, All new Unique keys should start with UK_, All new Foreign keys should start with FK_, All new check constraints should start with CK_ | Forecast | Table-Column-Constraint | Oracle_Constraint_Keys_Naming_Convention.drl | Error if naming Convention for constraints (Primary keys, Unique keys, check constraints, foreign keys) are not followed. |
Oracle | Datatype | Deprecated LONG and LONG RAW datatypes should no longer be used | Forecast | Datatype | Oracle_LongAndLongRaw.drl | Error if t deprecated 'LONG' and 'LONG RAW' datatypes are used. |
Oracle/MSSQL | Naming Convention | All new sequences should end with _SEQ | Forecast | Sequence | Oracle_Sequence_Naming_Convention.drl | Error if sequences do not end by _SEQ. |
MSSQL | Naming Convention | New Primary Key is not in format: PK_<table_name>_ID | Forecast | Table-PK | PK_Format.drl | Error if Primary Key does not follow proper naming convention. |
MSSQL | Structure | New Primary Key is not CLUSTERED | Forecast | Table-PK | PK_NotClustered.drl | Error when a primary key is not clustered. |
MSSQL | Naming Convention | New Stored Procedure is not prefixed with ?sp_ | Forecast | StoredProc | StoredProcedure_Format_Prefix_Xsp_.drl | Error when stored procedure name does not start by Xsp_ |
MSSQL | Naming Convention | New Stored Procedure is not prefixed with sp_ | Forecast | StoredProc | StoredProcedure_Format_Prefix_sp_.drl | Error when stored procedure name does not start by sp_ |
MSSQL | Naming Convention | New or Renamed Table Column Constraint is CHECK and not in format: CK_<tablename>@<column> | Forecast | Table-Column-Constraint | Table_Column_Constraint_CHECK_Format.drl | Error table column constraing is CHECK but name is not CK_tablename@column |
MSSQL | Naming Convention | New or Renamed Table FK Contraint is not in format: FK_<tablename>_<column>@<ftablename>_<column> | Forecast | Table-FK | Table_FKConstraint_Format.drl | Error if Table FK Constraint is not in format: FK_<tablename>_<column>@<ftablename>_<column> |
MSSQL | Naming Convention | New Table FK Constraint is named by system | Forecast | Table-FK | Table_FKConstraint_NamedBySystem.drl | Warning if Table FK Constraint is named by system |
MSSQL | Naming Convention | New or Renamed Table has special characters (excluding underscore) in name | Forecast | Table | TableName_NoSpecialCharacters.drl | Error if table name contains special character. |
MSSQL | Naming Convention | New or Renamed Table name can only contain alphanumeric (and underscore) chracters. | Forecast | Table | TableNamesMustOnlyContainAlphaNumericAndUnderscore.drl | Error if table name contains non alphanumeric and underscore. |
ALL | Naming Convention | Table names cannot have special characters and must start with T_ | Forecast | Table | TableNamingStandards.drl | Error if table naems don't follow standard (no special characters and must start with T_) |
MSSQL | Naming Convention | New or Renamed Trigger is not in format: trg_<tablename>_<type> The type should be designated as 'I' = insert, 'U' = update, 'D' = delete. | Forecast | TableTrigger | Trigger_Format.drl | Error if trigger name does not follow the standard trg_<tablename>_<type> |
MSSQL | Naming Convention | Trigger should not contain special charcter and should start with TR_ | Forecast | TableTrigger | TriggerNamingStandards.drl | Error if trigger name contains special character and does not start by TR_ |
MSSQL | Naming Convention | New or Renamed View is not prefixed with vw_ | Forecast | View | ViewName_Format_Prefix_VW_.drl | Error if view name does not start by VW_ |
MSSQL | Naming Convention | New or Renamed View has special characters (excluding underscore) in name | Forecast | VIew | ViewName_NoSpecialCharacters.drl | Error if view name contains special character |
All | Standards - Corporate | Check if the context of any changeset is part of a specific list. | PreForecast | Datical Changeset | ContextMustBeSetAndValid.drl | Error if context is not set properly. |
All | Standards - Corporate | Check if the label of any changeset follows the VersionOne card id. | PreForecast | Datical Changeset | VersionOneLabelMustBeSetAndValid.drl | Error if label is not set properly. |
Oracle | Standards - Corporate | Check if there is a grant to a role that is restricted. | Forecast | Grant | NoGrantWithoutCustomRolesRules.drl | Error if a grant tries to give access to a role that is on a list of restricted roles. |
Oracle | Comments | Comments should not be nested | SqlRule | comments | No_Nested_Comments.drl | Throws ERROR when a nested C type comment is present in sql script. PL/SQL does not support nested C-style (/* ... *//*) comments. |
Oracle | Comments | Single line comments should start with "--" | SqlRule | single line comment | SingleLine_Comments.drl | Throws WARNING when a sql script contains single line comments but not uses -- to declare the comment The multi-line comment syntax (/* ...* /) should not be used for single line comments; the -- syntax is more appropriate. |
Oracle | Constraint | Variables should be nullable | SqlRule | Not Null | Variable_InitializedWith_NULL.drl | Throws warning when SQL script contains variables initialized with NULL Explicit variable initializations with null values are superfluous, since unassigned variables are implicitly initialized to null. |
Oracle | DataType | "MLSLABEL" should not be used | SqlRule | MLSLABEL | MLSLABEL_SHouldNotBeUsed.drl | Tthrows ERROR when a sql script contains MLSLABEL The deprecated MLSLABEL datatype is still supported only for backwards compatibility with Trusted Oracle, and since Oracle8, the only valid value it can hold is NULL. Thus, the usage of this type should be progressively removed. |
Oracle | DataType | "NUMBER" variables should be declared with precision | SqlRule | NUMBER | ||
Oracle | DataType | Scale should not be specified for float types | SqlRule | Float | Scale_NoDefined_forFloat.drl | Throws ERROR when a Float variable is defined with a scale in sql script. Float data types, such as FLOAT, DOUBLE PRECISION, and REAL cannot have a scale constraint. Trying to specify a scale results in the exception PLS-00510: Float cannot have scale being raised. |
Oracle | Datatype | "PLS_INTEGER" should not be used | SqlRule | SIMPLE_INTEGER | ||
Oracle | Datatype | "VARCHAR" should NOT be used | SqlRule | VARCHAR2 | ||
Oracle | Datatype | "CHAR" and "NVARCHAR" should NOT be used | SqlRule | VARCHAR2, NVARCHAR2 | ||
Oracle | DataTypes | "NCHAR" and "NVARCHAR2" size should not be specified in bytes | SqlRule | NCHAR | ||
Oracle | Datatypes | "ROWID" and "UROWID" data types should not be used | SqlRule | Rowid and Urowid | ||
Oracle | DBMS_OUTPUT | "DBMS_OUTPUT.PUT_LINE" should not be used | SqlRule | DBMS_OUTPUT.PUT_LINE | ||
Oracle | Functions | The 'result_cache' hint should be avoided | SqlRule | Result_Cache | ||
Oracle | Joins | "FULL OUTER JOINS" should be used with caution | SqlRule | Outer Joins | ||
Oracle | Joins | SQL tables should be joined with the "JOIN" keyword | SqlRule | Join | ||
Oracle | Joins | "NATURAL JOIN" queries should not be used | SqlRule | Natural Join | ||
Oracle | Loops | "EXIT WHEN" should be used rather than "IF ... THEN EXIT; END IF;" | SqlRule | Exit | ||
Oracle | Loops | "FORALL" should be used instead of "FOR" | SqlRule | For Loop | ||
Oracle | Loops | "IF" statement conditions should not evaluate unconditionally to "TRUE" or to "FALSE" | SqlRule | If Loop | ||
MSSQL | Naming Convention | New Index is not Primary Key and is CLUSTERED and is NOT UNIQUE and is not prefixed with CIDX_ | PostForecast | Index | ||
MSSQL | Naming Convention | New Index is not Primary Key and is CLUSTERED and is UNIQUE and is not prefixed with UCIDX_ | PostForecast | Index | ||
MSSQL | Naming Convention | New Index is not Primary Key and is NON-CLUSTERED and is NOT UNIQUE and is not prefixed with IDX_ | PostForecast | Index | ||
MSSQL | Naming Convention | New Index is not Primary Key and is NON-CLUSTERED and is UNIQUE and is not prefixed with UIDX_ | PostForecast | Index | ||
MSSQL | Naming Convention | New or Renamed Table Column Constraint is DEFAULT VALUE and not in format: DF_<tablename>@<column> | PostForecast | Table-Column-Constraint | ||
Oracle | Naming Convention | Column aliases should be defined using "AS" | SqlRule | Column Alias | ||
Oracle | Naming Convention | Constant names should comply with a naming convention | SqlRule | Constant Name | ||
Oracle | Naming Convention | Cursor parameters should follow a naming convention | SqlRule | Cursor Parameters | ||
Oracle | Naming Convention | Cursors should follow a naming convention | SqlRule | Cursors | ||
Oracle | Naming Convention | Exceptions should follow a naming convention | SqlRule | Exceptions | ||
Oracle | Naming Convention | "GOTO" statements should not be used | SqlRule | GOTO | ||
Oracle | Naming Convention | Package names should comply with a naming convention | SqlRule | Packages | ||
Oracle | Naming Convention | Record fields should comply with a naming convention | SqlRule | Record Variables | ||
Oracle | Naming Convention | Types should follow a naming convention | SqlRule | Types | ||
Oracle | Naming Convention | Variables should comply with a naming convention | SqlRule | Variables | ||
Oracle | Operators | Oracle's join operator (+) should not be used | SqlRule | Join Operator | ||
Oracle | Naming Convention | Package names should comply with a naming convention | SqlRule | Packages | ||
Oracle | Naming Convention | Record fields should comply with a naming convention | SqlRule | Record Variables | ||
Oracle | Naming Convention | Types should follow a naming convention | SqlRule | Types | ||
Oracle | Naming Convention | Variables should comply with a naming convention | SqlRule | Variables | ||
Oracle | Operators | Oracle's join operator (+) should not be used | SqlRule | Join Operator | ||
Oracle/MSSQL | Structure | All New Tables should have a primary key or Unique key | PostForecast | Table | Table_NoPrimaryOrUniqueKey.drl | All New Tables should have a primary key or Unique key. |
MSSQL | Structure | New Table does not have a CLUSTERED Index | PostForecast | Table | Table_NoClusteredIndex.drl | Checks that if the tables contain at least one clustered index |
Oracle | Structure | "CASE" should be used rather than "DECODE" | SqlRule | Case | ||
Oracle | Structure | CASE should be used for sequences of simple tests | SqlRule | Case | ||
Oracle | Structure | Constant declarations should contain initialization assignments | SqlRule | Constants | ||
Oracle | Structure | "CREATE OR REPLACE" should be used instead of "CREATE" | SqlRule | Create or Replace | ||
Oracle | Structure | "EXIT" should not be used in loops | SqlRule | EXIT statement | ||
MSSQL | Structure | New or Modified Function contains "SELECT *" | SqlRule | Function | Oracle_Select_Star.drl | |
Oracle | Structure | "GROUP BY" should not be used in SQL "SELECT" statements | SqlRule | Group By | ||
Oracle | Structure | "cursor%NOTFOUND" should be used instead of "NOT cursor%FOUND" | SqlRule | Cursor | ||
Oracle | Structure | Anchored types should not be constrained | SqlRule | Anchored Type | ||
Oracle | Structure | "COMMIT" should not be used inside a loop | SqlRule | Commit | ||
Oracle | Structure | "DELETE" and "UPDATE" statements should contain "WHERE" clauses | SqlRule | DELETE-UPDATE | ||
Oracle | Structure | "FORALL" statements should use the "SAVE EXCEPTIONS" clause | SqlRule | FORALL | ||
Oracle | Structure | "FUNCTIONS" should not have "OUT" parameters | SqlRule | Function | ||
Oracle | Structure | "FETCH ... BULK COLLECT INTO" should not be used without a "LIMIT" clause | SqlRule | FETCH-BULK | ||
Oracle | Structure | "GOTO" should not be used within loops | SqlRule | Loop | ||
Oracle | Structure | Pipelined functions should have at least one "PIPE ROW" statement and not return an expression (PLS-00633) | SqlRule | Function | ||
Oracle | Structure | Procedures should not contain "RETURN" statements | SqlRule | Procedure | ||
Oracle | Structure | "RAISE_APPLICATION_ERROR" should only be used with error codes from -20,000 to -20,999 | SqlRule | RAISE_APPLICATION_ERROR | ||
Oracle | Structure | SQL EXISTS subqueries should not be used | SqlRule | Select | ||
Oracle | Structure | Columns to be read with a "SELECT" statement should be clearly defined | SqlRule | Select | ||
Oracle | Structure | Queries should not "SELECT" too many columns | SqlRule | Select | ||
Oracle | Structure | "UNION" should not be used in "SELECT" statements | SqlRule | Unions | ||
Oracle | Structure | DML events clauses should not include multiple "OF" clauses | SqlRule | Trigger | ||
Oracle | Structure | The "RELIES_ON" clause should not be used | SqlRule | Relies_On | ||
Oracle | Structure | "END LOOP" should be followed by a semicolon | SqlRule | LOOP | ||
MSSQL | Structure | New or Modified Stored Procedure contains "SELECT *" | SqlRule | StoredProc | ||
Oracle | Table | A primary key should be specified during table creation | SqlRule | Table-PK | ||
Oracle | Tracking | Track uses of NOSONAR comments | SqlRule | NOSONAR | ||
Oracle | Variable | Variables should not be initialized with "NULL" | SqlRule | Initialized with NULL | ||
Oracle | Variables | "NOT NULL" variables should be initialized | SqlRule | NOT NULL Variables | ||
Oracle | Variables | Size should be specified for string variables | SqlRule | Size | ||
All | Do Not Allow Grant or Revoke Error | SqlRule | Grant/Revoke | |||
Oracle | GOTO should not be used to jump backwards | SqlRule | GOTO | |||
Oracle | "LOOP ... END LOOP;" constructs should be avoided | SqlRule | LOOP | |||
Oracle | Functions | Formatted Date Conversion Check | SqlRule | Date Format | SqlRules_Oracle_formattedDateRequired.drl | Calls to TO_DATE / TO_TIMESTAMP / TO_TIMESTAMP_TZ functions must provide non-null date format as second argument. Error if relying on default date format. |
Oracle | Structure | DB Link Check | SqlRule | Link | SqlRules_Oracle_restrictDbLinks.drl | Restrict the use of database links. Error if a non-whitelisted link reference was found in a script. |
Additional Rules
Database | Rule Group | Rule Name | Rule Type | Object Type | Filename | Description |
---|---|---|---|---|---|---|
Oracle | Standards - Naming | ErrorWhenTableNameGreaterThan20OrAuditTableNameGreaterThan26 | Forecast | Table | Error of if table name is greater than 20 characters, or if table name ends in _AUDIT and is greater than 26 characters | |
Oracle | Structure | ErrorWhenOwningSchemaNotPrefixedInCreateTable | SqlRules | Table | ErrorWhenOwningSchemaNotPrefixedInCreateTable.drl | Error if owning schema is not prefixed in the create table statement |
Oracle | Standards - Naming | ErrorWhenTableColumnNameGreaterThan26CharactersLong | Forecast | Column | Error if column name length is greater than 26 | |
Oracle | Standards - Naming | ErrorIfNonAuditTableColumNamedSeqNoOrSeqID | Forecast | Column | Error if colum name = SEQ_NO or SEQ_ID | |
Oracle | Standards - Datatype | CreateTableShouldWarnIfDatatypeNotInList | Forecast | Column - Datatype | Error if If datatype is not in list: CLOB, BLOB, NUMBER, LONG or RAW | |
Oracle | Standards - Datatype | WarnOnDatatypeLongRawChar | Forecast | Column - Datatype | Warn if datatype is LONG, RAW or CHAR | |
Oracle | Standards - Naming | ErrorWhenIndexNameGreaterThan30CharactersLong | Forecast | Index | Warn if index name exceeds 30 characters | |
Oracle | Standards - Naming | PrimaryKeyShouldEndWith_PK | Forecast | Index - Primary Key | Fail if primary key index name is not suffixed with _PK. For example, MY_TABLE_PK – Indicates Primary Key Index | |
Oracle | Standards - Naming | NonPrimaryKeyIndexNameValidation | Forecast | Index - Primary Key | Fails if non primary key index names are not suffixed with _00 (denoting index number), or _00N (indicates index which is non_unique, or _00U (indicates index index which is unique) | |
Oracle | Standards - Naming | IndexTablespaceShouldBeNamed_schemaname_indx | Forecast | Index | For indexes make sure that the tablespace name is "<schema>_indx" | |
Oracle | Standards - Naming | ErrorWhenForeignKeyNameGreaterThan30CharactersLong | Forecast | Constraint - Foreign Key | Fail if foreign key name exceeds 30 characters | |
Oracle | Standards - Naming | ForeignKeyConstraintNameShouldNotStartWithSYS_ | Forecast | Constraint - Foreign Key | Check for Oracle generated FK constraint names. Do not allow Oracle to generate default foreign key names | |
Oracle | Standards - Naming | ForeignKeyShouldEndWIth_FKn | Forecast | Constraint - Foreign Key | Error if Foreign Key name does not end in FKn. Constraints are always suffixed with a ‘_FKn’ (where ‘n’ is the constraint number) | |
Oracle | Standards - Naming | ErrorWhenViewNameGreaterThan30CharactersLong | Forecast | View | Warn if view name exceeds 30 characters | |
Oracle | Standards - Naming | ErrorWhenViewNameGreaterThan25CharactersLong | Forecast | View | Warn if view name exceeds 25 characters | |
Oracle | Standards - Naming | ViewNameShouldEndWith_V | Forecast | View | Warn if view name is not suffixed with _V | |
Oracle | Structure | ViewShouldNotReferenceAnotherView | Forecast | View | Warn if view does not reference base table (must not reference another view) | |
Oracle | Standards - Naming | ErrorWhenSynonymNameGreaterThan30CharactersLong | Forecast | Synonym | Warn if synonym name exceeds 30 characters | |
Oracle | Standards - Naming | ErrorWhenTriggerNameGreaterThan30CharactersLong | Forecast | Trigger | Warn if trigger name exceeds 30 characters | |
Oracle | Standards - Naming | TriggerNameShouldEndWith_TRG | Forecast | Trigger | Warn if trigger name is not suffixed with _TRG | |
Oracle | Standards - Naming | AuditTriggerShouldContainOwnedbyTablename | Forecast | Trigger | Audit Triggers must contain the name of the table they are owned by | |
Oracle | Standards - Naming | ErrorWhenPackageNameGreaterThan30CharactersLong | Forecast | Package | Warn if package name exceeds 30 characters | |
Oracle | Standards - Naming | PackagePackageBodyNameShouldBeginWithPKG_ | Forecast | Package | Error if package or package body name is not prefixed with PKG_ | |
Oracle | Standards - Naming | ErrorWhenPackageBodyNameGreaterThan30CharactersLong | Forecast | Package | Warn if package body name exceeds 30 characters | |
Oracle | Standards - Naming | StoredProcedureNameShouldBeginWithPRC_ | Forecast | Procedure | Warn if stored procedure name is not prefixed with PRC_ | |
Oracle | Standards - Naming | ErrorWhenStoredProcedureNameGreaterThan30CharactersLong | Forecast | Procedure | Error if stored procedure name exceeds 30 characters | |
Oracle | Standards - Naming | ErrorWhenFunctionNameGreaterThan30CharactersLong | Forecast | Function | Error if function name exceeds 30 characters | |
Oracle | Standards - Naming | FunctionNameShouldBeginWithFN_ | Forecast | Function | Warn if function name is not prefixed with FN_ | |
Oracle | Performance | CreateTableColumnShouldNotUseDefaultValue | Forecast | Column | Create table statements should not include a default value specification | |
Oracle | Performance | CreateIndexShouldContainParallelOption | SqlRules | Index | Error when parallel attribute is missing from create index statement | |
Oracle | Performance | CreateTableMissingTablespaceSpecification | SqlRules | Table | Create table statements must include a tablespace specification | |
All | Security | ErrorWhenSqlContainsGrantExceptForServiceID | SqlRules | Grant | Error if sql contains "GRANT*" except for "GRANT [dsas]" | |
All | Security | ErrorWhenSqlContainsCreateRole | SqlRules | Role | Error if sql contains "CREATE ROLE" | |
MSSQL | Security | ErrorWhenSqlContainsChangeDbOwner-MSSQL | SqlRules | Database | Error if generated SQL changes DB Owner | |
Oracle | Structure | TriggerShouldNotReturnData_No_SELECT | Forecast | Trigger | Error if Trigger contains SELECT statement. Returning data to client is not allowed. | |
Oracle | Standards - Datatype | ColumnNameEndingIn-_FLG-ShouldBeTypeVarchar1 | Forecast | Column | Fails if any undeployed changeset attempts to create a table with a column name ending in “_FLG” that does not have data type of VARCHAR(1). | |
Oracle | Standards - Datatype | DATATYPE-WarnWhenColumnCreatedWithVARCHAR2_4000 | Forecast | Column | Fails if any undeployed changeset creates a table with a column of data type VARCHAR2(4000). | |
Oracle | Standards - Datatype | DATATYPE-ErrorWhenColumnCreatedWithCHAR | Forecast | Column | Fails if any undeployed changeset creates a table with or adds a column of data type CHAR. | |
Oracle | Standards - Datatype | DATATYPE-WarnWhenColumnCreatedWithCLOB | Forecast | Column | Warns if any undeployed changeset creates a table with a column of data type CLOB. | |
Oracle | Standards - Corporate | ErrorWhenCommentMissingFromColumn | Forecast | Column | Fails if any undeployed changeset creates a table with a column that is not commented | |
Oracle | Standards - Corporate | ErrorWhenCommentMissingFromTable | Forecast | Table | Fails if any undeployed changeset creates a table is not commented | |
Oracle | Standards - Corporate | ErrorWhenCommentMissingFromView | Forecast | View | Fails if any undeployed changeset creates a view that is not commented | |
Oracle | Performance | ErrorWhenIndexHasGreaterThan3Columns | Forecast | Index | ||
Oracle | Performance | Forecast | Foreign Key | FKColumnsShouldHaveIndex.drl | Fails if any undeployed changeset creates a foreign key where the base table column does not contain an index. | |
Oracle | Standards - Naming | ErrorWhenTableNameGreaterThan20OrAuditTableNameGreaterThan26CharactersLong | Forecast | Table | ||
Oracle | Standards - Naming | ErrorWhenTableNameGreaterThan25CharactersLong | Forecast | Table | Fails if any undeployed changeset creates a table with a name greater than 25 characters | |
Oracle | Standards - Naming | ForeignKeyNameShouldNotStartWithSYS_ | Forecast | Foreign Key | ||
All | Standards - Corporate | GRANTNotAllowedInProduction | Forecast | Grant | Fails if any undeployed changeset on the PROD context generates SQL containing a GRANT statement. | |
All | Standards - Corporate | NewSequencesNeedSpecificStartNumber | Forecast | Sequence | Fails if any undeployed changeset on the A context creates a sequence that starts at 0 or an odd number. Also fails if any undeployed changeset on the B context creates a sequence that starts at 0 or an even number. Fails if any undeployed changeset creates a sequence that does not increment by 2. | |
Oracle | Standards - Corporate | NoLOBIndicesInOracle | Forecast | Index | Fails if any undeployed changeset creates an index on a column with a LOB data type. | |
Standards - Corporate | NoLoggingOnIndices | Forecast | Index | |||
Oracle | Standards - Corporate | NoRenameViewAltSchemaInOracle | Forecast | View | Fails if any undeployed changeset renames a view in an alternate schema. | |
All | Standards - Corporate | OnlyCertainUsersCanAlterStoredProcedures | Forecast | Stored Procedure | Fails if any Datical user other than users stated in the rule attempts to run a Forecast where undeployed changesets alter stored procedures. | |
All | Standards - Corporate | OnlyCertainUsersCanLoadData | Forecast | DML | Fails if any Datical user other than users stated in the rule attempts to run a Forecast where undeployed changesets insert or update data. | |
All | Standards - Corporate | PrivateSynonymsNotAllowedInProduction | Forecast | Synonym | Fails if any undeployed changeset on the PROD context creates a private synonym. | |
All | Standards - Corporate | TruncateNotAllowedInStoredProcedure | Forecast | Stored Procedure | Fails if any undeployed changeset creates a stored procedure that contains a TRUNCATE command. | |
All | Datical | WarnOnRemarksForColumnInAddColumn | Forecast | Column | Warn if using Datical remarks attribute for a non-mySQL database. | |
All | Standards - Corporate | MoreThanThreeWarningsIsAnError | PostForecast | Fails if Forecast produced more than 3 warnings. | ||
All | Standards - Corporate | DisallowGrants | SqlRules | Grant | Error if the GRANT keyword is found in a SQL Script. | |
All | Standards - Corporate | DisallowTryCatchBlocks | SqlRules | Code | Error if the TRY/CATCH keywords are found in a SQL Script. | |
All | Standards - Corporate | ChangeSetCommentsMustExistAndNotBeEmpty | PreForecast | Datical Changeset | Change Set Comments Must Exist and Not Be Empty | |
All | Standards - Corporate | ChangeSetIDsMustStartWithSpecificString | PreForecast | Datical Changeset | Change Sets ID must start with JIRA- | |
All | Standards - Corporate | ErrorWhenChangesetCannotBeRolledback | PreForecast | Rollback | Error when changeset is missing a manual or auto rollback | |
Oracle | GeneratedSQLLinesLessThan2499 | PreForecast | SqlPlus | Generated SQL: Individual SQL line(s) exceeds 2499 characters and cannot be executed in SQLPLUS | ||
MSSQL | Standards - Corporate | GeneratedSQLShouldNotChangedb_owner | PreForecast | db_owner | Error is generated SQL attempts to change the db_owner | |
Oracle | Standards - Corporate | GeneratedSQLShouldNotContainAlterSession | PreForecast | Alter Session | Error if generated SQL contains an ALTER SESSION command | |
All | Standards - Corporate | GeneratedSQLShouldNotContainDROPs | PreForecast | Drop | Error if generated SQL contains a DROP statement | |
All | Standards - Corporate | GeneratedSQLShouldNotContainGRANTSs | PreForecast | Grant | Error if generated SQL contains a GRANT statement | |
Oracle | Standards - Corporate | GeneratedSQLShouldNotContainSPOOL | PreForecast | Spool | Error if generated SQL contains a SPOOL statement | |
All | Datical | PrintTheClientSystemInfoModel | PreForecast | Datical Models | Print the Client System Information model | |
All | Datical | PrintTheDatabaseDefModel | PreForecast | Datical Models | Print the Database Definition model | |
All | Standards - Corporate | CreateTableShouldInform | Forecast | Table | Prints informational message in Forecast report if any undeployed changeset creates a table. | |
All | Standards - Corporate | CreateTableShouldWarn | Forecast | Table | Warns if any undeployed changeset creates a table. Useful to remind DBAs to setup replication. | |
All | Standards - Corporate | DropColumnShouldUseRollback | Forecast | Column | Fails if any undeployed changeset that drops a column does not provide a corresponding rollback script. | |
All | Standards - Corporate | TableMustContain-CREATED_DATE-And-CREATED_BY-Columns | Forecast | Table | When Creating Tables, fail if 'CREATED_DATE' or 'CREATED_BY' columns are not found | |
All | Standards - Naming | TriggerNamesMustStartWith-_TR-AndNotUseSpecialCharacters | Forecast | Trigger | Trigger names must start with 'TR_' and cannot use special characters '*#+<space>-'. |
Generic Rules
Database | Rule Group | Rule Name | Rule Type | Object Type | Filename | Description |
---|---|---|---|---|---|---|
All | General | RuleWhichMakesRestCall | Forecast | Table | RuleWhichMakesRestCall.drl | Generic rule that make REST calls as part of the rule logic. |
All | General | RuleWhichHitsDatabase | Forecast | Trigger | RuleWhichHitsDatabase.drl | Generic rule that can make database queries as part of the rule logic. |