You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/05/13 11:09:15 UTC
[shardingsphere] branch master updated: Add SQL Definition for
`ALTER SYSTEM` of Oracle Database (#10253)
This is an automated email from the ASF dual-hosted git repository.
panjuan 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 537397d Add SQL Definition for `ALTER SYSTEM` of Oracle Database (#10253)
537397d is described below
commit 537397debf80414cc15533865246436e293bd55d
Author: Thanoshan MV <48...@users.noreply.github.com>
AuthorDate: Thu May 13 16:38:17 2021 +0530
Add SQL Definition for `ALTER SYSTEM` of Oracle Database (#10253)
* add alter system definition
* modify code
* change rules
* remove duplicate rules and import statements
* rename rule as it's previously used
* change rules and andd more testcases
* fix typo in clause naming
* define INTEGER_ rule, test cases
* add INTEGER_ before NUMBER_
* change instanceId to NUMBER_
* change NUMBER_ to INTEGER_ where necessary
* change numberLiterals definition
---
.../src/main/antlr4/imports/oracle/BaseRule.g4 | 62 ++++-
.../src/main/antlr4/imports/oracle/DDLStatement.g4 | 267 ++++++++++++++++++++-
.../src/main/antlr4/imports/oracle/Literals.g4 | 4 +
.../main/antlr4/imports/oracle/OracleKeyword.g4 | 140 ++++++++++-
.../sql/parser/autogen/OracleStatement.g4 | 1 +
.../impl/OracleDDLStatementSQLVisitor.java | 11 +-
.../statement/impl/OracleStatementSQLVisitor.java | 2 +-
.../sql/parser/core/visitor/SQLVisitorRule.java | 2 +
.../statement/ddl/AlterSystemStatement.java} | 42 +---
.../oracle/ddl/OracleAlterSystemStatement.java} | 41 +---
.../asserts/statement/ddl/DDLStatementAssert.java | 5 +
.../ddl/impl/AlterSystemStatementAssert.java | 41 ++++
.../jaxb/cases/domain/SQLParserTestCases.java | 5 +
.../ddl/AlterSystemStatementTestCase.java} | 38 +--
.../src/main/resources/case/ddl/alter-system.xml | 41 ++++
.../src/main/resources/sql/supported/ddl/alter.xml | 22 ++
16 files changed, 611 insertions(+), 113 deletions(-)
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 b301b43..a9f66bc 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
@@ -38,7 +38,7 @@ stringLiterals
;
numberLiterals
- : MINUS_? NUMBER_
+ : (PLUS_ | MINUS_)? (INTEGER_ | NUMBER_)
;
dateTimeLiterals
@@ -175,6 +175,14 @@ directoryName
: identifier
;
+dispatcherName
+ : stringLiterals
+ ;
+
+clientId
+ : stringLiterals
+ ;
+
opaqueFormatSpec
: identifier
;
@@ -288,7 +296,7 @@ alias
;
dataTypeLength
- : LP_ (NUMBER_ (COMMA_ NUMBER_)?)? RP_
+ : LP_ (INTEGER_ (COMMA_ INTEGER_)?)? RP_
;
primaryKey
@@ -544,7 +552,7 @@ asmFileName
;
fileNumber
- : NUMBER_
+ : INTEGER_
;
instanceName
@@ -598,3 +606,51 @@ domain
dateValue
: dateTimeLiterals | stringLiterals | numberLiterals | expr
;
+
+sessionId
+ : numberLiterals
+ ;
+
+serialNumber
+ : numberLiterals
+ ;
+
+instanceId
+ : NUMBER_
+ ;
+
+sqlId
+ : identifier
+ ;
+
+logFileName
+ : stringLiterals
+ ;
+
+logFileGroupsArchivedLocationName
+ : stringLiterals
+ ;
+
+asmVersion
+ : stringLiterals
+ ;
+
+walletPassword
+ : identifier
+ ;
+
+hsmAuthString
+ : identifier
+ ;
+
+targetDbName
+ : identifier
+ ;
+
+certificateId
+ : identifier
+ ;
+
+categoryName
+ : identifier
+ ;
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 1d97815..1a656c8 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
@@ -156,15 +156,15 @@ identifyOptions
;
identityOption
- : START WITH (NUMBER_ | LIMIT VALUE)
- | INCREMENT BY NUMBER_
- | MAXVALUE NUMBER_
+ : START WITH (INTEGER_ | LIMIT VALUE)
+ | INCREMENT BY INTEGER_
+ | MAXVALUE INTEGER_
| NOMAXVALUE
- | MINVALUE NUMBER_
+ | MINVALUE INTEGER_
| NOMINVALUE
| CYCLE
| NOCYCLE
- | CACHE NUMBER_
+ | CACHE INTEGER_
| NOCACHE
| ORDER
| NOORDER
@@ -787,7 +787,7 @@ hashPartitions
;
hashPartitionsByQuantity
- : PARTITIONS NUMBER_ (STORE IN (tablespaceName (COMMA_ tablespaceName)*))? (tableCompression | indexCompression)? (OVERFLOW STORE IN (tablespaceName (COMMA_ tablespaceName)*))?
+ : PARTITIONS INTEGER_ (STORE IN (tablespaceName (COMMA_ tablespaceName)*))? (tableCompression | indexCompression)? (OVERFLOW STORE IN (tablespaceName (COMMA_ tablespaceName)*))?
;
indexCompression
@@ -1421,3 +1421,258 @@ leadCdbUriClause
propertyClause
: PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName
;
+
+alterSystem
+ : ALTER SYSTEM alterSystemOption
+ ;
+
+alterSystemOption
+ : archiveLogClause
+ | checkpointClause
+ | checkDatafilesClause
+ | distributedRecovClauses
+ | flushClause
+ | endSessionClauses
+ | alterSystemSwitchLogfileClause
+ | suspendResumeClause
+ | quiesceClauses
+ | rollingMigrationClauses
+ | rollingPatchClauses
+ | alterSystemSecurityClauses
+ | affinityClauses
+ | shutdownDispatcherClause
+ | registerClause
+ | setClause
+ | resetClause
+ | relocateClientClause
+ | cancelSqlClause
+ | flushPasswordfileMetadataCacheClause
+ ;
+
+archiveLogClause
+ : ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause?
+ ;
+
+checkpointClause
+ : CHECKPOINT (GLOBAL | LOCAL)?
+ ;
+
+checkDatafilesClause
+ : CHECK DATAFILES (GLOBAL | LOCAL)?
+ ;
+
+distributedRecovClauses
+ : (ENABLE | DISABLE) DISTRIBUTED RECOVERY
+ ;
+
+flushClause
+ : FLUSH flushClauseOption
+ ;
+
+endSessionClauses
+ : (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)?
+ ;
+
+alterSystemSwitchLogfileClause
+ : SWITCH LOGFILE
+ ;
+
+suspendResumeClause
+ : SUSPEND | RESUME
+ ;
+
+quiesceClauses
+ : QUIESCE RESTRICTED | UNQUIESCE
+ ;
+
+rollingMigrationClauses
+ : startRollingMigrationClause | stopRollingMigrationClause
+ ;
+
+rollingPatchClauses
+ : startRollingPatchClause | stopRollingPatchClause
+ ;
+
+alterSystemSecurityClauses
+ : restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause
+ ;
+
+affinityClauses
+ : enableAffinityClause | disableAffinityClause
+ ;
+
+shutdownDispatcherClause
+ : SHUTDOWN IMMEDIATE? dispatcherName
+ ;
+
+registerClause
+ : REGISTER
+ ;
+
+setClause
+ : SET alterSystemSetClause+
+ ;
+
+resetClause
+ : RESET alterSystemResetClause+
+ ;
+
+relocateClientClause
+ : RELOCATE CLIENT clientId
+ ;
+
+cancelSqlClause
+ : CANCEL SQL SQ_ sessionId serialNumber (AT_ instanceId)? sqlId? SQ_
+ ;
+
+flushPasswordfileMetadataCacheClause
+ : FLUSH PASSWORDFILE_METADATA_CACHE
+ ;
+
+instanceClause
+ : INSTANCE instanceName
+ ;
+
+sequenceClause
+ : SEQUENCE INTEGER_
+ ;
+
+changeClause
+ : CHANGE INTEGER_
+ ;
+
+currentClause
+ : CURRENT NOSWITCH?
+ ;
+
+groupClause
+ : GROUP INTEGER_
+ ;
+
+logfileClause
+ : LOGFILE logFileName (USING BACKUP CONTROLFILE)?
+ ;
+
+nextClause
+ : NEXT
+ ;
+
+allClause
+ : ALL
+ ;
+
+toLocationClause
+ : TO logFileGroupsArchivedLocationName
+ ;
+
+flushClauseOption
+ : sharedPoolClause | globalContextClause | bufferCacheClause | flashCacheClause | redoToClause
+ ;
+
+disconnectSessionClause
+ : DISCONNECT SESSION SQ_ INTEGER_ COMMA_ INTEGER_ SQ_ POST_TRANSACTION?
+ ;
+
+killSessionClause
+ : KILL SESSION SQ_ INTEGER_ COMMA_ INTEGER_ (COMMA_ AT_ INTEGER_)? SQ_
+ ;
+
+startRollingMigrationClause
+ : START ROLLING MIGRATION TO asmVersion
+ ;
+
+stopRollingMigrationClause
+ : STOP ROLLING MIGRATION
+ ;
+
+startRollingPatchClause
+ : START ROLLING PATCH
+ ;
+
+stopRollingPatchClause
+ : STOP ROLLING PATCH
+ ;
+
+restrictedSessionClause
+ : (ENABLE | DISABLE) RESTRICTED SESSION
+ ;
+
+setEncryptionWalletOpenClause
+ : SET ENCRYPTION WALLET OPEN IDENTIFIED BY (walletPassword | hsmAuthString)
+ ;
+
+setEncryptionWalletCloseClause
+ : SET ENCRYPTION WALLET CLOSE (IDENTIFIED BY (walletPassword | hsmAuthString))?
+ ;
+
+setEncryptionKeyClause
+ : SET ENCRYPTION KEY (identifiedByWalletPassword | identifiedByHsmAuthString)
+ ;
+
+enableAffinityClause
+ : ENABLE AFFINITY tableName (SERVICE serviceName)?
+ ;
+
+disableAffinityClause
+ : DISABLE AFFINITY tableName
+ ;
+
+alterSystemSetClause
+ : setParameterClause | useStoredOutlinesClause | globalTopicEnabledClause
+ ;
+
+alterSystemResetClause
+ : parameterName scopeClause*
+ ;
+
+sharedPoolClause
+ : SHARED_POOL
+ ;
+
+globalContextClause
+ : GLOBAL CONTEXT
+ ;
+
+bufferCacheClause
+ : BUFFER_CACHE
+ ;
+
+flashCacheClause
+ : FLASH_CACHE
+ ;
+
+redoToClause
+ : REDO TO targetDbName (NO? CONFIRM APPLY)?
+ ;
+
+identifiedByWalletPassword
+ : certificateId? IDENTIFIED BY walletPassword
+ ;
+
+identifiedByHsmAuthString
+ : IDENTIFIED BY hsmAuthString (MIGRATE USING walletPassword)?
+ ;
+
+setParameterClause
+ : parameterName EQ_ parameterValue (COMMA_ parameterValue)* alterSystemCommentClause? DEFERRED? containerCurrentAllClause? scopeClause*
+ ;
+
+useStoredOutlinesClause
+ : USE_STORED_OUTLINES EQ_ (TRUE | FALSE | categoryName)
+ ;
+
+globalTopicEnabledClause
+ : GLOBAL_TOPIC_ENABLED EQ_ (TRUE | FALSE)
+ ;
+
+alterSystemCommentClause
+ : COMMENT EQ_ stringLiterals
+ ;
+
+containerCurrentAllClause
+ : CONTAINER EQ_ (CURRENT | ALL)
+ ;
+
+scopeClause
+ : SCOPE EQ_ (MEMORY | SPFILE | BOTH) | SID EQ_ (SQ_ sessionId SQ_ | SQ_ ASTERISK_ SQ_)
+ ;
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
index 9da6e08..13bc86f 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
@@ -29,6 +29,10 @@ STRING_
| (SQ_ ('\\'. | '\'\'' | ~('\'' | '\\'))* SQ_)
;
+INTEGER_
+ : INT_
+ ;
+
NUMBER_
: INT_? DOT_? INT_ (E (PLUS_ | MINUS_)? INT_)?
;
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 76aec98..4178530 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
@@ -1639,6 +1639,22 @@ TRACE
: T R A C E
;
+DISTRIBUTED
+ : D I S T R I B U T E D
+ ;
+
+RECOVERY
+ : R E C O V E R Y
+ ;
+
+FLUSH
+ : F L U S H
+ ;
+
+NOREPLY
+ : N O R E P L Y
+ ;
+
SWITCH
: S W I T C H
;
@@ -1675,6 +1691,26 @@ PROTECTION
: P R O T E C T I O N
;
+SUSPEND
+ : S U S P E N D
+ ;
+
+RESUME
+ : R E S U M E
+ ;
+
+QUIESCE
+ : Q U I E S C E
+ ;
+
+UNQUIESCE
+ : U N Q U I E S C E
+ ;
+
+SHUTDOWN
+ : S H U T D O W N
+ ;
+
REGISTER
: R E G I S T E R
;
@@ -1687,10 +1723,6 @@ SWITCHOVER
: S W I T C H O V E R
;
-SHUTDOWN
- : S H U T D O W N
- ;
-
FAILED
: F A I L E D
;
@@ -1771,10 +1803,6 @@ REMOVE
: R E M O V E
;
-SUSPEND
- : S U S P E N D
- ;
-
LOST
: L O S T
;
@@ -1798,3 +1826,99 @@ DEFAULT_CREDENTIAL
TIME_ZONE
: T I M E UL_ Z O N E
;
+
+RESET
+ : R E S E T
+ ;
+
+RELOCATE
+ : R E L O C A T E
+ ;
+
+CLIENT
+ : C L I E N T
+ ;
+
+PASSWORDFILE_METADATA_CACHE
+ : P A S S W O R D F I L E UL_ M E T A D A T A UL_ C A C H E
+ ;
+
+NOSWITCH
+ : N O S W I T C H
+ ;
+
+POST_TRANSACTION
+ : P O S T UL_ T R A N S A C T I O N
+ ;
+
+KILL
+ : K I L L
+ ;
+
+ROLLING
+ : R O L L I N G
+ ;
+
+MIGRATION
+ : M I G R A T I O N
+ ;
+
+PATCH
+ : P A T C H
+ ;
+
+ENCRYPTION
+ : E N C R Y P T I O N
+ ;
+
+WALLET
+ : W A L L E T
+ ;
+
+AFFINITY
+ : A F F I N I T Y
+ ;
+
+MEMORY
+ : M E M O R Y
+ ;
+
+SPFILE
+ : S P F I L E
+ ;
+
+BOTH
+ : B O T H
+ ;
+
+SID
+ : S I D
+ ;
+
+SHARED_POOL
+ : S H A R E D UL_ P O O L
+ ;
+
+BUFFER_CACHE
+ : B U F F E R UL_ C A C H E
+ ;
+
+REDO
+ : R E D O
+ ;
+
+CONFIRM
+ : C O N F I R M
+ ;
+
+MIGRATE
+ : M I G R A T E
+ ;
+
+USE_STORED_OUTLINES
+ : U S E UL_ S T O R E D UL_ O U T L I N E S
+ ;
+
+GLOBAL_TOPIC_ENABLED
+ : G L O B A L UL_ T O P I C UL_ E N A B L E D
+ ;
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 4fc06b8..77b9f8b 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
@@ -49,5 +49,6 @@ execute
| alterSynonym
| alterSession
| alterDatabase
+ | alterSystem
) 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 c3a36f6..c2101a3 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
@@ -18,8 +18,8 @@
package org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl;
import lombok.NoArgsConstructor;
-import org.apache.shardingsphere.sql.parser.api.visitor.operation.SQLStatementVisitor;
import org.apache.shardingsphere.sql.parser.api.visitor.ASTNode;
+import org.apache.shardingsphere.sql.parser.api.visitor.operation.SQLStatementVisitor;
import org.apache.shardingsphere.sql.parser.api.visitor.type.DDLSQLVisitor;
import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AddColumnSpecificationContext;
import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterDefinitionClauseContext;
@@ -27,6 +27,7 @@ import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterI
import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterSessionContext;
import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterSynonymContext;
import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterDatabaseContext;
+import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterSystemContext;
import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.AlterTableContext;
import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.ColumnDefinitionContext;
import org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser.ColumnNameContext;
@@ -62,6 +63,7 @@ import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.Ora
import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterDatabaseStatement;
import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterTableStatement;
import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterSynonymStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleAlterSystemStatement;
import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleCreateIndexStatement;
import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleCreateTableStatement;
import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleDropIndexStatement;
@@ -303,9 +305,14 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
public ASTNode visitAlterSession(final AlterSessionContext ctx) {
return new OracleAlterSessionStatement();
}
-
+
@Override
public ASTNode visitAlterDatabase(final AlterDatabaseContext ctx) {
return new OracleAlterDatabaseStatement();
}
+
+ @Override
+ public ASTNode visitAlterSystem(final AlterSystemContext ctx) {
+ return new OracleAlterSystemStatement();
+ }
}
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/OracleStatementSQLVisitor.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/OracleStatementSQLVisitor.java
index f86cfdd..318ff51 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/OracleStatementSQLVisitor.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/OracleStatementSQLVisitor.java
@@ -527,7 +527,7 @@ public abstract class OracleStatementSQLVisitor extends OracleStatementBaseVisit
DataTypeLengthSegment result = new DataTypeLengthSegment();
result.setStartIndex(ctx.start.getStartIndex());
result.setStopIndex(ctx.stop.getStartIndex());
- List<TerminalNode> numbers = ctx.NUMBER_();
+ List<TerminalNode> numbers = ctx.INTEGER_();
if (numbers.size() == 1) {
result.setPrecision(Integer.parseInt(numbers.get(0).getText()));
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/visitor/SQLVisitorRule.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/visitor/SQLVisitorRule.java
index 0015dd5..6eacd59 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/visitor/SQLVisitorRule.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/visitor/SQLVisitorRule.java
@@ -94,6 +94,8 @@ public enum SQLVisitorRule {
ALTER_SESSION("AlterSession", SQLStatementType.DDL),
+ ALTER_SYSTEM("AlterSystem", SQLStatementType.DDL),
+
DROP_SERVER("DropServer", SQLStatementType.DDL),
CREATE_TRIGGER("CreateTrigger", SQLStatementType.DDL),
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterSystemStatement.java
similarity index 61%
copy from shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
copy to shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterSystemStatement.java
index 9da6e08..db472d9 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterSystemStatement.java
@@ -15,36 +15,16 @@
* limitations under the License.
*/
-lexer grammar Literals;
+package org.apache.shardingsphere.sql.parser.sql.common.statement.ddl;
-import Alphabet, Symbol;
+import lombok.Setter;
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
-IDENTIFIER_
- : [A-Za-z]+[A-Za-z_$#0-9]*
- | DQ_ ~'"'+ DQ_
- ;
-
-STRING_
- : (DQ_ ( '\\'. | '""' | ~('"'| '\\') )* DQ_)
- | (SQ_ ('\\'. | '\'\'' | ~('\'' | '\\'))* SQ_)
- ;
-
-NUMBER_
- : INT_? DOT_? INT_ (E (PLUS_ | MINUS_)? INT_)?
- ;
-
-HEX_DIGIT_
- : '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_
- ;
-
-BIT_NUM_
- : '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_
- ;
-
-fragment INT_
- : [0-9]+
- ;
-
-fragment HEX_
- : [0-9a-fA-F]
- ;
+/**
+ * Alter system statement.
+ */
+@Setter
+@ToString
+public class AlterSystemStatement extends AbstractSQLStatement implements DDLStatement {
+}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterSystemStatement.java
similarity index 61%
copy from shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
copy to shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterSystemStatement.java
index 9da6e08..5294bb9 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterSystemStatement.java
@@ -15,36 +15,15 @@
* limitations under the License.
*/
-lexer grammar Literals;
+package org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl;
-import Alphabet, Symbol;
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.AlterSystemStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.OracleStatement;
-IDENTIFIER_
- : [A-Za-z]+[A-Za-z_$#0-9]*
- | DQ_ ~'"'+ DQ_
- ;
-
-STRING_
- : (DQ_ ( '\\'. | '""' | ~('"'| '\\') )* DQ_)
- | (SQ_ ('\\'. | '\'\'' | ~('\'' | '\\'))* SQ_)
- ;
-
-NUMBER_
- : INT_? DOT_? INT_ (E (PLUS_ | MINUS_)? INT_)?
- ;
-
-HEX_DIGIT_
- : '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_
- ;
-
-BIT_NUM_
- : '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_
- ;
-
-fragment INT_
- : [0-9]+
- ;
-
-fragment HEX_
- : [0-9a-fA-F]
- ;
+/**
+ * Oracle alter system statement.
+ */
+@ToString
+public class OracleAlterSystemStatement extends AlterSystemStatement implements OracleStatement {
+}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java
index c50e1ae..f1cc313 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java
@@ -20,6 +20,7 @@ package org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statemen
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.AlterIndexStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.AlterSystemStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.AlterTableStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateIndexStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateTableStatement;
@@ -33,6 +34,7 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAs
import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.AlterIndexStatementAssert;
import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.AlterSessionStatementAssert;
import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.AlterSynonymStatementAssert;
+import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.AlterSystemStatementAssert;
import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.AlterTableStatementAssert;
import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.CreateIndexStatementAssert;
import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.CreateTableStatementAssert;
@@ -43,6 +45,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.AlterIndexStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSessionStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSynonymStatementTestCase;
+import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSystemStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterTableStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateIndexStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateTableStatementTestCase;
@@ -82,6 +85,8 @@ public final class DDLStatementAssert {
AlterSynonymStatementAssert.assertIs(assertContext, (OracleAlterSynonymStatement) actual, (AlterSynonymStatementTestCase) expected);
} else if (actual instanceof OracleAlterSessionStatement) {
AlterSessionStatementAssert.assertIs(assertContext, (OracleAlterSessionStatement) actual, (AlterSessionStatementTestCase) expected);
+ } else if (actual instanceof AlterSystemStatement) {
+ AlterSystemStatementAssert.assertIs(assertContext, (AlterSystemStatement) actual, (AlterSystemStatementTestCase) expected);
}
}
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/AlterSystemStatementAssert.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/AlterSystemStatementAssert.java
new file mode 100644
index 0000000..953b442
--- /dev/null
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/AlterSystemStatementAssert.java
@@ -0,0 +1,41 @@
+/*
+ * 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.asserts.statement.ddl.impl;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.AlterSystemStatement;
+import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSystemStatementTestCase;
+
+/**
+ * Alter system statement assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class AlterSystemStatementAssert {
+
+ /**
+ * Assert alter system statement is correct with expected parser result.
+ *
+ * @param assertContext assert context
+ * @param actual actual alter system statement
+ * @param expected expected alter system statement test case
+ */
+ public static void assertIs(final SQLCaseAssertContext assertContext, final AlterSystemStatement actual, final AlterSystemStatementTestCase expected) {
+ }
+}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
index fa79f21..880c6b0 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
@@ -55,6 +55,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.AlterServerStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSessionStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSynonymStatementTestCase;
+import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSystemStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterTableStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateDatabaseStatementTestCase;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateFunctionStatementTestCase;
@@ -254,6 +255,9 @@ public final class SQLParserTestCases {
@XmlElement(name = "alter-synonym")
private final List<AlterSynonymStatementTestCase> alterSynonymTestCase = new LinkedList<>();
+
+ @XmlElement(name = "alter-system")
+ private final List<AlterSystemStatementTestCase> alterSystemTestCase = new LinkedList<>();
@XmlElement(name = "create-database")
private final List<CreateDatabaseStatementTestCase> createDatabaseTestCase = new LinkedList<>();
@@ -364,6 +368,7 @@ public final class SQLParserTestCases {
putAll(alterServerTestCase, result);
putAll(alterSessionTestCase, result);
putAll(alterSynonymTestCase, result);
+ putAll(alterSystemTestCase, result);
putAll(alterProcedureTestCase, result);
putAll(alterDatabaseTestCase, result);
putAll(createViewTestCase, result);
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterSystemStatementTestCase.java
similarity index 61%
copy from shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
copy to shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterSystemStatementTestCase.java
index 9da6e08..9da50e2 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/Literals.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AlterSystemStatementTestCase.java
@@ -15,36 +15,12 @@
* limitations under the License.
*/
-lexer grammar Literals;
+package org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl;
-import Alphabet, Symbol;
+import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
-IDENTIFIER_
- : [A-Za-z]+[A-Za-z_$#0-9]*
- | DQ_ ~'"'+ DQ_
- ;
-
-STRING_
- : (DQ_ ( '\\'. | '""' | ~('"'| '\\') )* DQ_)
- | (SQ_ ('\\'. | '\'\'' | ~('\'' | '\\'))* SQ_)
- ;
-
-NUMBER_
- : INT_? DOT_? INT_ (E (PLUS_ | MINUS_)? INT_)?
- ;
-
-HEX_DIGIT_
- : '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_
- ;
-
-BIT_NUM_
- : '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_
- ;
-
-fragment INT_
- : [0-9]+
- ;
-
-fragment HEX_
- : [0-9a-fA-F]
- ;
+/**
+ * Alter system statement test case.
+ */
+public class AlterSystemStatementTestCase extends SQLParserTestCase {
+}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/case/ddl/alter-system.xml b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/case/ddl/alter-system.xml
new file mode 100644
index 0000000..e972504
--- /dev/null
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/case/ddl/alter-system.xml
@@ -0,0 +1,41 @@
+<?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-system sql-case-id="alter_system_archive_log_change"/>
+ <alter-system sql-case-id="alter_system_archive_log_logfile"/>
+ <alter-system sql-case-id="alter_system_check_datafiles"/>
+ <alter-system sql-case-id="alter_system_quiesce_restricted"/>
+ <alter-system sql-case-id="alter_system_start_rolling_migration"/>
+ <alter-system sql-case-id="alter_system_start_rolling_patch"/>
+ <alter-system sql-case-id="alter_system_enable_affinity_service"/>
+ <alter-system sql-case-id="alter_system_shutdown_immediate"/>
+ <alter-system sql-case-id="alter_system_set_comment_container_scope"/>
+ <alter-system sql-case-id="alter_system_set_query_rewrite_enabled"/>
+ <alter-system sql-case-id="alter_system_reset_parameter_scope"/>
+ <alter-system sql-case-id="alter_system_relocate_client"/>
+ <alter-system sql-case-id="alter_system_enable_restricted_session"/>
+ <alter-system sql-case-id="alter_system_encryption_wallet_open_identified_by_password"/>
+ <alter-system sql-case-id="alter_system_encryption_key_identified_by_password"/>
+ <alter-system sql-case-id="alter_system_flush_shared_pool"/>
+ <alter-system sql-case-id="alter_system_checkpoint"/>
+ <alter-system sql-case-id="alter_system_set_dispatchers"/>
+ <alter-system sql-case-id="alter_system_switch_logfile"/>
+ <alter-system sql-case-id="alter_system_enable_distributed_recovery"/>
+ <alter-system sql-case-id="alter_system_flush_passwordfile_metada_cache"/>
+</sql-parser-test-cases>
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/ddl/alter.xml b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/ddl/alter.xml
index bd0e7d1..e7eedbf 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/ddl/alter.xml
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/ddl/alter.xml
@@ -192,4 +192,26 @@
<sql-case id="alter_session_change_parameter" value="ALTER SESSION SET NLS_DATE_LANGUAGE = French" db-types="Oracle" />
<sql-case id="alter_session_set_container" value="ALTER SESSION SET CONTAINER = cdb$root" db-types="Oracle" />
<sql-case id="alter_session_set_container_service" value="ALTER SESSION SET CONTAINER = pdb1 SERVICE = my_new_service" db-types="Oracle" />
+<!--alter system test-->
+ <sql-case id="alter_system_archive_log_change" value="ALTER SYSTEM ARCHIVE LOG CHANGE 9356083" db-types="Oracle" />
+ <sql-case id="alter_system_archive_log_logfile" value="ALTER SYSTEM ARCHIVE LOG LOGFILE 'diskl:log6.log' TO 'diska:[arch$]'" db-types="Oracle" />
+ <sql-case id="alter_system_check_datafiles" value="ALTER SYSTEM CHECK DATAFILES" db-types="Oracle" />
+ <sql-case id="alter_system_quiesce_restricted" value="ALTER SYSTEM QUIESCE RESTRICTED" db-types="Oracle" />
+ <sql-case id="alter_system_start_rolling_migration" value="ALTER SYSTEM START ROLLING MIGRATION TO '11.2.0.0.0'" db-types="Oracle" />
+ <sql-case id="alter_system_start_rolling_patch" value="ALTER SYSTEM START ROLLING PATCH" db-types="Oracle" />
+ <sql-case id="alter_system_enable_affinity_service" value="ALTER SYSTEM ENABLE AFFINITY uwclass.servers SERVICE pdbdev" db-types="Oracle" />
+ <sql-case id="alter_system_shutdown_immediate" value="ALTER SYSTEM SHUTDOWN IMMEDIATE 'D000'" db-types="Oracle" />
+ <sql-case id="alter_system_set_comment_container_scope" value="ALTER SYSTEM SET audit_sys_operations = TRUE COMMENT = 'Begin auditing SYS' CONTAINER = ALL SCOPE = SPFILE" db-types="Oracle" />
+ <sql-case id="alter_system_set_query_rewrite_enabled" value="ALTER SYSTEM SET QUERY_REWRITE_ENABLED = TRUE" db-types="Oracle" />
+ <sql-case id="alter_system_reset_parameter_scope" value="ALTER SYSTEM RESET plsql_code_type SCOPE = SPFILE" db-types="Oracle" />
+ <sql-case id="alter_system_relocate_client" value="ALTER SYSTEM RELOCATE CLIENT '-MGMTDB:_mgmtdb'" db-types="Oracle" />
+ <sql-case id="alter_system_enable_restricted_session" value="ALTER SYSTEM ENABLE RESTRICTED SESSION" db-types="Oracle" />
+ <sql-case id="alter_system_encryption_wallet_open_identified_by_password" value="ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "password"" db-types="Oracle" />
+ <sql-case id="alter_system_encryption_key_identified_by_password" value="ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY "password"" db-types="Oracle" />
+ <sql-case id="alter_system_flush_shared_pool" value="ALTER SYSTEM FLUSH SHARED_POOL" db-types="Oracle" />
+ <sql-case id="alter_system_checkpoint" value="ALTER SYSTEM CHECKPOINT" db-types="Oracle" />
+ <sql-case id="alter_system_set_dispatchers" value="ALTER SYSTEM SET DISPATCHERS = '(INDEX=0)(PROTOCOL=TCP)(DISPATCHERS=5)','(INDEX=1)(PROTOCOL=ipc)(DISPATCHERS=10)'" db-types="Oracle" />
+ <sql-case id="alter_system_switch_logfile" value="ALTER SYSTEM SWITCH LOGFILE" db-types="Oracle" />
+ <sql-case id="alter_system_enable_distributed_recovery" value="ALTER SYSTEM ENABLE DISTRIBUTED RECOVERY" db-types="Oracle" />
+ <sql-case id="alter_system_flush_passwordfile_metada_cache" value="ALTER SYSTEM FLUSH PASSWORDFILE_METADATA_CACHE" db-types="Oracle" />
</sql-cases>