Posts

Adding PDB Resources in Grid Infrastructure

Image
In Oracle Database 21c, within the Grid Infrastructure environment, a new type of resource called  ora.pdb.type  has been introduced, which can be used to manage PDBs. These resources are named using the following format: ora. < DB Unique Name > . < PDB Name > .pdb Like other resources in the cluster and GI environment, PDB-related resources can be controlled and managed using the  srvctl  tool. For example, you can start or stop a PDB using this tool: [ grid@RAC3 ~ ]$ srvctl start pdb -db db21c -pdb pdb1 [ grid@RAC3 ~ ]$ srvctl status pdb -db db21c -pdb pdb1 Pluggable database PDB1 is enabled. Pluggable database PDB1 of database db21c is running on nodes: rac2,rac3 [ grid@RAC3 ~ ]$ srvctl stop pdb -db db21c -pdb pdb1 [ grid@RAC3 ~ ]$ srvctl status pdb -db db21c -pdb pdb1 Pluggable database PDB1 is enabled. Pluggable database PDB1 of database db21c is not running. [ oracle@RAC2 ~ ]$ srvctl stop pdb -db db21c -pdb pdb1 -n rac3 -stopoption IMMEDIA...

SESSION-LEVEL SEQUENCES

  Oracle Database 12c introduces session-level sequences, which generate sequence values that are maintained independently within each database session: CREATE SEQUENCE seq_new START WITH 1 INCREMENT BY 1 SESSION; --session 1: select seq_new.nextval from dual; 1 --session 2: select seq_new.nextval from dual; 1 To change this sequence from  session level  to  global level , and vice versa, the following commands are used: alter sequence seq_new global ; alter sequence seq_new session;

Oracle AI Database 26ai - SQL Domain

Image
SQL domain can include a set of constraints and attributes, and by assigning it to a column, we can apply those constraints to that column. In other words, SQL Domain enables the extension of data types in a way that aligns with business requirements. One of the most important use cases of this feature arises when we want to apply specific conditions to the input values of a column. For example, for an   Age   column of type   NUMBER , we may want to prevent values less than 18 by enforcing the condition   Age >= 18 . Or, in a more practical example, for a column intended to store email addresses, we can apply a rule so that the column only accepts input in the format   text@text.text . Of course, in versions prior to 26ai, this could be achieved using different approaches such as triggers, check constraints, and so on. For instance, using a check constraint, we can enforce that values inserted into the   Email   column must match the   text@te...