This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 2fc625727d0 Support parsing `ALTER LOCKDOWN PROFILE` in Oracle (#19523)
2fc625727d0 is described below
commit 2fc625727d025e0cb4df7a5ce5941c817530828b
Author: Jiaqi Yan <[email protected]>
AuthorDate: Wed Jul 27 21:04:56 2022 +0800
Support parsing `ALTER LOCKDOWN PROFILE` in Oracle (#19523)
* Support parsing ALTER LOCKDOWN PROFILE in Oracle
* format code
* remove SQ symbol
* format code
---
.../src/main/antlr4/imports/oracle/BaseRule.g4 | 30 ++++++++++-
.../src/main/antlr4/imports/oracle/DDLStatement.g4 | 63 ++++++++++++++++++++++
.../main/antlr4/imports/oracle/OracleKeyword.g4 | 13 +++++
.../sql/parser/autogen/OracleStatement.g4 | 1 +
.../impl/OracleDDLStatementSQLVisitor.java | 7 +++
.../core/database/visitor/SQLVisitorRule.java | 2 +
.../ddl/OracleAlterLockdownProfileStatement.java | 29 ++++++++++
.../jaxb/cases/domain/SQLParserTestCases.java | 4 ++
.../ddl/AlterLockdownProfileStatementTestCase.java | 26 +++++++++
.../resources/case/ddl/alter-lockdown-profile.xml | 37 +++++++++++++
.../sql/supported/ddl/alter-lockdown-profile.xml | 37 +++++++++++++
11 files changed, 248 insertions(+), 1 deletion(-)
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
index 3f62c54e04e..2cfdbb26cba 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
@@ -224,7 +224,6 @@ parameterValue
: literals | identifier
;
-
dispatcherName
: stringLiterals
;
@@ -1442,3 +1441,32 @@ varrayType
stagingLogName
: identifier
;
+
+featureName
+ : STRING_
+ ;
+
+optionName
+ : STRING_
+ ;
+
+clauseOption
+ : STRING_
+ ;
+
+clauseOptionPattern
+ : STRING_
+ ;
+
+optionValue
+ : STRING_
+ ;
+
+clause
+ : STRING_
+ ;
+
+sqlStatement
+ : STRING_
+ ;
+
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
index 2332e9ca096..fed3f96768c 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
@@ -3225,3 +3225,66 @@ functionCompileClause
alterHierarchy
: ALTER HIERARCHY hierarchyName (RENAME TO hierarchyName | COMPILE)
;
+
+alterLockdownProfile
+ : ALTER LOCKDOWN PROFILE profileName (lockdownFeatures | lockdownOptions |
lockdownStatements)
+ ;
+
+lockdownFeatures
+ : (DISABLE | ENABLE) FEATURE featureClauses
+ ;
+
+featureClauses
+ : EQ_ LP_ featureName (COMMA_ featureName)* RP_
+ | ALL (EXCEPT (EQ_ LP_ featureName (COMMA_ featureName)* RP_))?
+ ;
+
+lockdownOptions
+ : (DISABLE | ENABLE) OPTION lockDownOptionClauses
+ ;
+
+lockDownOptionClauses
+ : EQ_ LP_ optionName (COMMA_ optionName)* RP_
+ | ALL (EXCEPT (EQ_ LP_ optionName (COMMA_ optionName)* RP_))?
+ ;
+
+lockdownStatements
+ : (DISABLE | ENABLE) STATEMENT lockdownStatementsClauses
+ ;
+
+lockdownStatementsClauses
+ : EQ_ LP_ sqlStatement (COMMA_ sqlStatement )* RP_
+ | EQ_ LP_ sqlStatement RP_ statementClauses
+ | ALL (EXCEPT (EQ_ LP_ sqlStatement (COMMA_ sqlStatement)* RP_))?
+ ;
+
+statementClauses
+ : CLAUSE statementsSubClauses
+ ;
+
+statementsSubClauses
+ : EQ_ LP_ clause (COMMA_ clause)* RP_
+ | EQ_ LP_ clause RP_ clauseOptions
+ | ALL (EXCEPT (EQ_ LP_ clause (COMMA_ clause)* RP_))?
+ ;
+
+clauseOptions
+ : OPTION optionClauses
+ ;
+
+optionClauses
+ : EQ_ LP_ clauseOptionOrPattern (COMMA_ clauseOptionOrPattern)* RP_
+ | EQ_ LP_ clauseOption RP_ optionValues+
+ | ALL (EXCEPT EQ_ LP_ clauseOptionOrPattern (COMMA_
clauseOptionOrPattern)* RP_)?
+ ;
+
+clauseOptionOrPattern
+ : clauseOption | clauseOptionPattern
+ ;
+
+optionValues
+ : VALUE EQ_ LP_ optionValue (COMMA_ optionValue)* RP_
+ | MINVALUE EQ_ optionValue
+ | MAXVALUE EQ_ optionValue
+ ;
+
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/OracleKeyword.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/OracleKeyword.g4
index b21ff1f1e1d..1ff712e7d20 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/OracleKeyword.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/OracleKeyword.g4
@@ -2946,3 +2946,16 @@ ASYNCHRONOUS
REPEAT
: R E P E A T
;
+
+FEATURE
+ : F E A T U R E
+ ;
+
+STATEMENT
+ : S T A T E M E N T
+ ;
+
+CLAUSE
+ : C L A U S E
+ ;
+
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/OracleStatement.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/OracleStatement.g4
index dfd0df29198..7751bc04258 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/OracleStatement.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/OracleStatement.g4
@@ -120,5 +120,6 @@ execute
| alterMaterializedViewLog
| alterFunction
| alterHierarchy
+ | alterLockdownProfile
) SEMI_?
;
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java
index f021a2df1d3..d0624195853 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java
@@ -47,6 +47,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterM
import
org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterOperatorContext;
import
org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterOutlineContext;
import
org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterPackageContext;
+import
org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterLockdownProfileContext;
import
org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterSequenceContext;
import
org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterSessionContext;
import
org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterSynonymContext;
@@ -165,6 +166,7 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.Ora
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterLibraryStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterMaterializedViewLogStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterMaterializedViewStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterLockdownProfileStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterMaterializedZonemapStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterOperatorStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterOutlineStatement;
@@ -962,4 +964,9 @@ public final class OracleDDLStatementSQLVisitor extends
OracleStatementSQLVisito
public ASTNode visitAlterHierarchy(final AlterHierarchyContext ctx) {
return new OracleAlterHierarchyStatement();
}
+
+ @Override
+ public ASTNode visitAlterLockdownProfile(final AlterLockdownProfileContext
ctx) {
+ return new OracleAlterLockdownProfileStatement();
+ }
}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
index a4a5f78d3c2..ea8a92fe406 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
@@ -596,6 +596,8 @@ public enum SQLVisitorRule {
ALTER_INDEX_TYPE("AlterIndexType", SQLStatementType.DDL),
+ ALTER_LOCKDOWN_PROFILE("AlterLockdownProfile", SQLStatementType.DDL),
+
CURSOR("Cursor", SQLStatementType.DDL),
CLOSE("Close", SQLStatementType.DDL),
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterLockdownProfileStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterLockdownProfileStatement.java
new file mode 100644
index 00000000000..1fbfd0b62ac
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterLockdownProfileStatement.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.OracleStatement;
+
+/**
+ * Oracle alter lockdown profile statement.
+ */
+@ToString(callSuper = true)
+public final class OracleAlterLockdownProfileStatement extends
AbstractSQLStatement implements OracleStatement {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
index aad08b98f6b..4ad8513e72a 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
@@ -121,6 +121,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterLanguageStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterLibraryStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterMaterializedViewLogStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterLockdownProfileStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterMaterializedViewStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterMaterializedZonemapStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterOperatorStatementTestCase;
@@ -1373,6 +1374,9 @@ public final class SQLParserTestCases {
@XmlElement(name = "alter-index-type")
private final List<AlterIndexTypeStatementTestCase>
alterIndexTypeTestCases = new LinkedList<>();
+ @XmlElement(name = "alter-lockdown-profile")
+ private final List<AlterLockdownProfileStatementTestCase>
alterLockdownProfileTestCases = new LinkedList<>();
+
@XmlElement(name = "alter-operator")
private final List<AlterOperatorStatementTestCase> alterOperatorTestCases
= new LinkedList<>();
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterLockdownProfileStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterLockdownProfileStatementTestCase.java
new file mode 100644
index 00000000000..3316f109ce9
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterLockdownProfileStatementTestCase.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl;
+
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
+
+/**
+ * Alter lockdown profile statement test case.
+ */
+public final class AlterLockdownProfileStatementTestCase extends
SQLParserTestCase {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-lockdown-profile.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-lockdown-profile.xml
new file mode 100644
index 00000000000..0e3940eaf8c
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/alter-lockdown-profile.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<sql-parser-test-cases>
+ <alter-operator sql-case-id="alter_lockdown_profile_disable_feature" />
+ <alter-operator
sql-case-id="alter_lockdown_profile_disable_feature_all_except" />
+ <alter-operator sql-case-id="alter_lockdown_profile_disable_feature_all" />
+ <alter-operator sql-case-id="alter_lockdown_profile_enable_feature" />
+ <alter-operator sql-case-id="alter_lockdown_profile_enable_feature_all" />
+ <alter-operator
sql-case-id="alter_lockdown_profile_enable_feature_all_except" />
+ <alter-operator sql-case-id="alter_lockdown_profile_disable_option" />
+ <alter-operator sql-case-id="alter_lockdown_profile_enable_option" />
+ <alter-operator sql-case-id="alter_lockdown_profile_enable_option_all" />
+ <alter-operator sql-case-id="alter_lockdown-profile_disable_statement" />
+ <alter-operator
sql-case-id="alter_lockdown-profile_disable_statement_and_clause" />
+ <alter-operator
sql-case-id="alter_lockdown-profile_disable_statement_and_clause_all" />
+ <alter-operator
sql-case-id="alter_lockdown-profile_disable_statement_and_clause_and_option" />
+ <alter-operator
sql-case-id="alter_lockdown-profile_disable_statement_and_clause_and_option_and_value"
/>
+ <alter-operator sql-case-id="alter_lockdown-profile_disable_min_value" />
+ <alter-operator sql-case-id="alter_lockdown-profile_disable_max_value" />
+ <alter-operator
sql-case-id="alter_lockdown-profile_enable_statement_all_except" />
+</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-lockdown-profile.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-lockdown-profile.xml
new file mode 100644
index 00000000000..9140fb47fdf
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/alter-lockdown-profile.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<sql-cases>
+ <sql-case id="alter_lockdown_profile_disable_feature" value="ALTER
LOCKDOWN PROFILE hr_prof DISABLE FEATURE = ('LOB_FILE_ACCESS',
'TRACE_VIEW_ACCESS');" db-types="Oracle" />
+ <sql-case id="alter_lockdown_profile_disable_feature_all_except"
value="ALTER LOCKDOWN PROFILE hr_prof DISABLE FEATURE ALL EXCEPT =
('COMMON_USER_LOCAL_SCHEMA_ACCESS', 'LOCAL_USER_COMMON_SCHEMA_ACCESS');"
db-types="Oracle" />
+ <sql-case id="alter_lockdown_profile_disable_feature_all" value="ALTER
LOCKDOWN PROFILE hr_prof DISABLE FEATURE ALL;" db-types="Oracle" />
+ <sql-case id="alter_lockdown_profile_enable_feature" value="ALTER LOCKDOWN
PROFILE hr_prof ENABLE FEATURE = ('UTL_HTTP', 'UTL_SMTP', 'OS_ACCESS');"
db-types="Oracle" />
+ <sql-case id="alter_lockdown_profile_enable_feature_all_except"
value="ALTER LOCKDOWN PROFILE hr_prof ENABLE FEATURE ALL EXCEPT =
('AQ_PROTOCOLS', 'CTX_PROTOCOLS');" db-types="Oracle" />
+ <sql-case id="alter_lockdown_profile_enable_feature_all" value="ALTER
LOCKDOWN PROFILE hr_prof ENABLE FEATURE ALL;" db-types="Oracle" />
+ <sql-case id="alter_lockdown_profile_disable_option" value="ALTER LOCKDOWN
PROFILE hr_prof DISABLE OPTION = ('DATABASE QUEUING');" db-types="Oracle" />
+ <sql-case id="alter_lockdown_profile_enable_option" value="ALTER LOCKDOWN
PROFILE hr_prof ENABLE OPTION = ('DATABASE QUEUING');" db-types="Oracle" />
+ <sql-case id="alter_lockdown_profile_enable_option_all" value="ALTER
LOCKDOWN PROFILE hr_prof ENABLE OPTION ALL;" db-types="Oracle" />
+ <sql-case id="alter_lockdown-profile_disable_statement" value="ALTER
LOCKDOWN PROFILE hr_prof DISABLE STATEMENT = ('ALTER DATABASE');"
db-types="Oracle" />
+ <sql-case id="alter_lockdown-profile_disable_statement_and_clause"
value="ALTER LOCKDOWN PROFILE hr_prof DISABLE STATEMENT = ('ALTER SYSTEM')
CLAUSE = ('SUSPEND', 'RESUME');" db-types="Oracle" />
+ <sql-case id="alter_lockdown-profile_disable_statement_and_clause_all"
value="ALTER LOCKDOWN PROFILE hr_prof DISABLE STATEMENT = ('ALTER PLUGGABLE
DATABASE') CLAUSE ALL EXCEPT = ('DEFAULT TABLESPACE', 'DEFAULT TEMPORARY
TABLESPACE');" db-types="Oracle" />
+ <sql-case
id="alter_lockdown-profile_disable_statement_and_clause_and_option"
value="ALTER LOCKDOWN PROFILE hr_prof DISABLE STATEMENT = ('ALTER SESSION')
CLAUSE = ('SET') OPTION = ('COMMIT_WAIT', 'CURSOR_SHARING');" db-types="Oracle"
/>
+ <sql-case
id="alter_lockdown-profile_disable_statement_and_clause_and_option_and_value"
value="ALTER LOCKDOWN PROFILE hr_prof DISABLE STATEMENT = ('ALTER SYSTEM')
CLAUSE = ('SET') OPTION = ('PDB_FILE_NAME_CONVERT') VALUE = ('cdb1_pdb0',
'cdb1_pdb1');" db-types="Oracle" />
+ <sql-case id="alter_lockdown-profile_disable_min_value" value="ALTER
LOCKDOWN PROFILE hr_prof DISABLE STATEMENT = ('ALTER SYSTEM') CLAUSE = ('SET')
OPTION = ('CPU_COUNT') MINVALUE = '8';" db-types="Oracle" />
+ <sql-case id="alter_lockdown-profile_disable_max_value" value="ALTER
LOCKDOWN PROFILE hr_prof DISABLE STATEMENT = ('ALTER SYSTEM') CLAUSE = ('SET')
OPTION = ('CPU_COUNT') MAXVALUE = '2';" db-types="Oracle" />
+ <sql-case id="alter_lockdown-profile_enable_statement_all_except"
value="ALTER LOCKDOWN PROFILE hr_prof ENABLE STATEMENT ALL EXCEPT = ('ALTER
DATABASE');" db-types="Oracle" />
+</sql-cases>