Skip to main content

Home/ eDBA Services - Oracle & MySQL/ Group items tagged presentations

Rss Feed Group items tagged

Dariusz Owczarek

SQL Functions Quick Reference - 1 views

  •  
    This chapter of Oracle Database SQL Language Quick Reference presents the syntax for SQL functions.
Dariusz Owczarek

SQL Syntax Quick Reference - 0 views

  • ALTER INDEX [ schema. ]index { { deallocate_unused_clause | allocate_extent_clause | shrink_clause | parallel_clause | physical_attributes_clause | logging_clause } ... | rebuild_clause | PARAMETERS ( 'ODCI_parameters' ) ) | COMPILE | { ENABLE | DISABLE } | UNUSABLE | VISIBLE | INVISIBLE | RENAME TO new_name | COALESCE | { MONITORING | NOMONITORING } USAGE | UPDATE BLOCK REFERENCES | alter_index_partitioning } ;
  • ALTER ROLE role { NOT IDENTIFIED | IDENTIFIED { BY password | USING [ schema. ] package | EXTERNALLY | GLOBALLY } } ;
  • ALTER SEQUENCE [ schema. ] sequence { INCREMENT BY integer | { MAXVALUE integer | NOMAXVALUE } | { MINVALUE integer | NOMINVALUE } | { CYCLE | NOCYCLE } | { CACHE integer | NOCACHE } | { ORDER | NOORDER } } ... ;
  • ...31 more annotations...
  • ALTER SESSION { ADVISE { COMMIT | ROLLBACK | NOTHING } | CLOSE DATABASE LINK dblink | { ENABLE | DISABLE } COMMIT IN PROCEDURE | { ENABLE | DISABLE } GUARD | { ENABLE | DISABLE | FORCE } PARALLEL { DML | DDL | QUERY } [ PARALLEL integer ] | { ENABLE RESUMABLE [ TIMEOUT integer ] [ NAME string ] | DISABLE RESUMABLE } | alter_session_set_clause } ;
  • ALTER SYSTEM { archive_log_clause | checkpoint_clause | check_datafiles_clause | distributed_recov_clauses | FLUSH { SHARED_POOL | BUFFER_CACHE } | end_session_clauses | SWITCH LOGFILE | { SUSPEND | RESUME } | quiesce_clauses | rolling_migration_clauses | alter_system_security_clauses | shutdown_dispatcher_clause | REGISTER | SET alter_system_set_clause [ alter_system_set_clause ]... | RESET alter_system_reset_clause [ alter_system_reset_clause ]... } ;
  • CREATE [ SHARED ] [ PUBLIC ] DATABASE LINK dblink [ CONNECT TO { CURRENT_USER | user IDENTIFIED BY password [ dblink_authentication ] } | dblink_authentication ]... [ USING connect_string ] ;
  • CREATE [ OR REPLACE ] DIRECTORY directory AS 'path_name' ;
  • CREATE [ UNIQUE | BITMAP ] INDEX [ schema. ] index ON { cluster_index_clause | table_index_clause | bitmap_join_index_clause } [ UNUSABLE ] ;
  • CREATE PROFILE profile LIMIT { resource_parameters | password_parameters }... ;
  • CREATE ROLE role [ NOT IDENTIFIED | IDENTIFIED { BY password | USING [ schema. ] package | EXTERNALLY | GLOBALLY } ] ;
  • CREATE SEQUENCE [ schema. ] sequence [ { INCREMENT BY | START WITH } integer | { MAXVALUE integer | NOMAXVALUE } | { MINVALUE integer | NOMINVALUE } | { CYCLE | NOCYCLE } | { CACHE integer | NOCACHE } | { ORDER | NOORDER } ]... ;
  • CREATE [ OR REPLACE ] [ PUBLIC ] SYNONYM [ schema. ] synonym FOR [ schema. ] object [ @ dblink ] ;
  • CREATE USER user IDENTIFIED { BY password | EXTERNALLY [ AS 'certificate_DN' ] | GLOBALLY [ AS '[ directory_DN ]' ] } [ DEFAULT TABLESPACE tablespace | TEMPORARY TABLESPACE { tablespace | tablespace_group_name } | { QUOTA { size_clause | UNLIMITED } ON tablespace }... EDO | PROFILE profile | PASSWORD EXPIRE | ACCOUNT { LOCK | UNLOCK } [ DEFAULT TABLESPACE tablespace | TEMPORARY TABLESPACE { tablespace | tablespace_group_name } | { QUOTA { size_clause | UNLIMITED } ON tablespace }... | PROFILE profile | PASSWORD EXPIRE | ACCOUNT { LOCK | UNLOCK } ]... ] ;
  • CREATE [OR REPLACE] [[NO] FORCE] VIEW [schema.] view [ ( { alias [ inline_constraint... ] | out_of_line_constraint } [, { alias [ inline_constraint...] | out_of_line_constraint } ] ) | object_view_clause | XMLType_view_clause ] AS subquery [ subquery_restriction_clause ] ;
  • LOCK TABLE [ schema. ] { table | view } [ partition_extension_clause | @ dblink ] [, [ schema. ] { table | view } [ partition_extension_clause | @ dblink ] ]... IN lockmode MODE [ NOWAIT | WAIT integer ] ;
  • PURGE { { TABLE table | INDEX index } | { RECYCLEBIN | DBA_RECYCLEBIN } | TABLESPACE tablespace [ USER username ] } ;
  • GRANT { grant_system_privileges | grant_object_privileges } ;
  • ALTER PROFILE profile LIMIT { resource_parameters | password_parameters } ... ;
  • ALTER RESOURCE COST { { CPU_PER_SESSION | CONNECT_TIME | LOGICAL_READS_PER_SESSION | PRIVATE_SGA } integer } ... ;
  • ALTER TABLE [ schema. ] table [ alter_table_properties | column_clauses | constraint_clauses | alter_table_partitioning | alter_external_table_clauses | move_table_clause ] [ enable_disable_clause | { ENABLE | DISABLE } { TABLE LOCK | ALL TRIGGERS } ] ... ;
  • ALTER TABLESPACE tablespace { DEFAULT [ table_compression ] storage_clause | MINIMUM EXTENT size_clause | RESIZE size_clause | COALESCE | SHRINK SPACE [ KEEP size_clause] | RENAME TO new_tablespace_name | { BEGIN | END } BACKUP | datafile_tempfile_clauses | tablespace_logging_clauses | tablespace_group_clause | tablespace_state_clauses | autoextend_clause | flashback_mode_clause | tablespace_retention_clause } ;
  • ALTER USER { user { IDENTIFIED { BY password [ REPLACE old_password ] | EXTERNALLY [ AS 'certificate_DN' ] | GLOBALLY [ AS '[directory_DN]' ] } | DEFAULT TABLESPACE tablespace | TEMPORARY TABLESPACE { tablespace | tablespace_group_name } | { QUOTA { size_clause | UNLIMITED } ON tablespace } ... | PROFILE profile | DEFAULT ROLE { role [, role ]... | ALL [ EXCEPT role [, role ] ... ] | NONE } | PASSWORD EXPIRE | ACCOUNT { LOCK | UNLOCK } } ... | user [, user ]... proxy_clause } ;
  • ALTER VIEW [ schema. ] view { ADD out_of_line_constraint | MODIFY CONSTRAINT constraint { RELY | NORELY } | DROP { CONSTRAINT constraint | PRIMARY KEY | UNIQUE (column [, column ]...) } | COMPILE } ;
  • CREATE SCHEMA AUTHORIZATION schema { create_table_statement | create_view_statement | grant_statement }... ;
  • CREATE [ GLOBAL TEMPORARY ] TABLE [ schema. ] table { relational_table | object_table | XMLType_table }
  • CREATE [ BIGFILE | SMALLFILE ] { permanent_tablespace_clause | temporary_tablespace_clause | undo_tablespace_clause } ;
  • DELETE [ hint ] [ FROM ] { dml_table_expression_clause | ONLY (dml_table_expression_clause) } [ t_alias ] [ where_clause ] [ returning_clause ] [error_logging_clause];
  • INSERT [ hint ] { single_table_insert | multi_table_insert } ;
  • MERGE [ hint ] INTO [ schema. ] { table | view } [ t_alias ] USING { [ schema. ] { table | view } | subquery } [ t_alias ] ON ( condition ) [ merge_update_clause ] [ merge_insert_clause ] [ error_logging_clause ] ;
  • RENAME old_name TO new_name ;
  • REVOKE { revoke_system_privileges | revoke_object_privileges } ;
  • SELECT [ subquery_factoring_clause ] subquery [ for_update_clause ] ;
  • TRUNCATE TABLE [schema.] table [ {PRESERVE | PURGE} MATERIALIZED VIEW LOG ] [ {DROP | REUSE} STORAGE ] ;
  • UPDATE [ hint ] { dml_table_expression_clause | ONLY (dml_table_expression_clause) } [ t_alias ] update_set_clause [ where_clause ] [ returning_clause ] [error_logging_clause] ;
  •  
    This chapter of Oracle Database SQL Language Quick Reference presents the syntax for Oracle SQL statements.
Dariusz Owczarek

Bind variables and bind variable peeking | Somewhere in between - 0 views

  • Each time you execute this statement; Oracle will convert it to an ASCII function and apply a hashing algorithm over it; than it will check if this SQL statement is already present in the SHARED POOL.
  • If the statement is in the SHARED POOL, Oracle will reuse (soft parse) it together with its execution plan. If the statement is not in the SHARED POOL, Oracle will have to do a hard parse.
  • Oracle’ CBO can generate more optimized execution plan if the he knows upfront the values of the filter predicated, meaning if the values are literals and not bind variables.
  • ...4 more annotations...
  • When you execute an SQL with bind variables, the value for the filter predicate is unknown.
  • In Oracle 8i, CBO will generate one execution plan, regardless of the input of “:a”. In Oracle 9i,10g CBO will wait until the cursor is opened, bind the value from the bind variable and then optimize the SQL. In Oracle 11g CBO has a new feature called “adaptive cursor sharing” which will be discussed in another post
  • Bind variable peeking is when Oracle’s CBO waits until he gets the value for the bind variable and then optimizes the SQL. But, this is very important: this is done in the hard parsing phase of the SQL.
  • When to use bind variables In OLTP system = YES When you execute many statements per second = YES Data Warehouse = NO Data Mining = NO End month reports = NO
Dariusz Owczarek

How To Configure Dispatchers For RAC Environment - 0 views

  • Doc ID: 578524.1
  • Note: It is very important to use entire address string in order to configure dispatchers on RAC and host name used in it should be a VIP hostname, otherwise connection may suffer intermittent ORA-12545 errors. Refer metalink note <333159.1>
  • alter system set dispatchers='(address=(protocol=tcp)(host=node1-vip))(dispatchers=2)' scope=both   sid='racdb1';
  • ...3 more annotations...
  • If you have a firewall present between client and the server, then it may block connections on the randomly selected dispatchers ports. If this is the case for your setup then set the dispatcher with PORT clause as below and configure the firewall to allow the communication on these ports along with the listener port.
  • alter system set dispatchers='(address=(protocol=tcp)(host=<vip address>)(port=<port_number>))' scope=both sid='racdb1';
  • Note - If the port clause is not used in the dispatchers configuration then port numbers will be chosen randomly which could be blocked in the firewall resulting redirected connection to dispatchers getting time out errors. For more details refer note <125021.1>:Oracle Connections and Firewalls
  •  
    This document would guide you to configure dispatchers for Real Application Cluster (RAC) database.
1 - 5 of 5
Showing 20 items per page