Tools for Oracle Databases

Similar documents
Tools for Oracle Oracle Tutorials 2013 Przemyslaw Radowiecki CERN IT-DB

Oracle Database Express Edition

ORACLE SQL DEVELOPER

Using SQL Developer. Oracle University and Egabi Solutions use only

Schema Validate With Oracle 10g Database Status

Oracle Database 12c R2: Administration Workshop Ed 3 NEW

Oracle Database 12c R2: Administration Workshop Ed 3

Copy Data From One Schema To Another In Sql Developer

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

Check Table Oracle Database Version Sql Developer Error Unsupported

ORACLE DBA I. Exploring Oracle Database Architecture

Oracle Application Express: Administration 1-2

Oracle - Oracle Database 12c R2: Administration Workshop Ed 3

Granting Read-only Access To An Existing Oracle Schema

Pl Sql Copy Table From One Schema To Another

TipsandTricks. Jeff Smith Senior Principal Product Database Tools, Oracle Corp

Course: Oracle Database 12c R2: Administration Workshop Ed 3

INSTALL GUIDE BIOVIA INSIGHT 2016

I, J, K. Lightweight directory access protocol (LDAP), 162

Oracle Database 12c: Administration Workshop Ed 2

Configuring the Oracle Network Environment. Copyright 2009, Oracle. All rights reserved.

Drop Failed For User Principal Owns A Schema

Contents About This Guide... 5 About Notifications... 5 Managing User Accounts... 6 Managing Companies Managing Password Policies...

Default Password For Hr Schema In Oracle 10g

INSTALL GUIDE BIOVIA INSIGHT 2.6

Setting up a database for multi-user access

Oracle Database 12c: Administration Workshop Duration: 5 Days Method: Instructor-Led

Oracle Database 12c: Administration Workshop Ed 2 NEW

SAP BusinessObjects. Erick Carlson SAP Solution Architect N.A. SAP on Oracle Team

SQL Developer. 101: Features Overview. Jeff Smith Senior Principal Product Database Tools, Oracle Corp

Difference Between Oracle Database Instance Vs

Extend EBS Using Applications Express

SQLDev. TipsandTricks. Jeff Smith Senior Principal Product Database Tools, Oracle Corp

Database Administration and Management

APEX Times Ten Berichte. Tuning DB-Browser Datenmodellierung Schema Copy & Compare Data Grids. Extension Exchange.

Oracle Associate User With Schema Export Full

Sqlplus To Create The Plan_table In Your Schema

EasyLobby Database Setup EasyLobby Family of Products Version 10.0

Configuring SAP Targets and Runtime Users

Contents Using the Primavera Cloud Service Administrator's Guide... 9 Web Browser Setup Tasks... 10

Course Contents of ORACLE 9i

Essential (free) Tools for DBA!

Oracle DBA workshop I

VII. Corente Services SSL Client

Installation of Oracle 11g R2 XE. Install and configure SQL Developer

Explore the Oracle 10g database architecture. Install software with the Oracle Universal Installer (OUI)

Oracle ILM Assistant Installation Guide Version 1.4

Oracle Sql Developer User's Guide Release 2.1

Oracle Database Sql Developer User's Guide For

Micro Focus Enterprise Analyzer 3.4. Installation Guide

ORANET- Course Contents

Sample Database Table Schemas 11g Release 2 Pdf

Oracle Database 12c: Administration Workshop Ed 2

Integra Codebase 4.2 SP1 Installation and Upgrade Guide

Oracle BI 11g R1: Build Repositories

Oracle Database 11g: Administration Workshop I Release 2

Oracle Database: SQL and PL/SQL Fundamentals

Quick Start SAP Sybase IQ 16.0 SP08

Oracle 12C DBA Online Training. Course Modules of Oracle 12C DBA Online Training: 1 Oracle Database 12c: Introduction to SQL:

SAP BusinessObjects Profitability and Cost Management Upgrade Guide

MDCStore High Content Data Management Solution Database Schema

Oracle Database 11g: New Features for Oracle 9i DBAs

Database Username And Current User Schema Do Not Match Sql Server

Oracle SQL Developer & REST Data Services

Expert Oracle Database

Oracle Database 11g: Administration Workshop I Release 2

Contents Overview... 5 Downloading Primavera Gateway... 5 Primavera Gateway On-Premises Installation Prerequisites... 6

DB2 for z/os: Programmer Essentials for Designing, Building and Tuning

Novell ZENworks Asset Management 7

ORACLE 11gR2 DBA. by Mr. Akal Singh ( Oracle Certified Master ) COURSE CONTENT. INTRODUCTION to ORACLE

Lab # 1. Introduction to Oracle

Microsoft SQL Installation and Setup

Oracle Database 11g for Experienced 9i Database Administrators

Oracle BI 11g R1: Build Repositories Course OR102; 5 Days, Instructor-led

Alter Change Default Schema Oracle Sql Developer

VMware AirWatch Database Migration Guide A sample procedure for migrating your AirWatch database

Migrating vrealize Automation 6.2 to 7.2

Oracle Database. Installation and Configuration of Real Application Security Administration (RASADM) Prerequisites

Logi Ad Hoc Reporting Troubleshooting Authentication Failure. Standard Authentication

ORACLE DBA TRAINING IN BANGALORE

MDCStore 2.0 DATABASE. Installation Guide

Oracle Way To Grant Schema Privileges All Tables

DB2 for z/os Stored Procedure support in Data Server Manager

Enterprise Manager: Scalable Oracle Management

Real Application Security Administration

How To Create New Schema In Oracle 10g Using Toad

Administration Guide Release 5.0

Security Tips in Oracle Reports Services Release 6i with Oracle Portal Release 3.0. An Oracle Technical White Paper October 2000

Analytics Installation and Configuration Guide

Oracle V Table Schema Sql Script

The Oracle SQLT Utility. By Kevin Gilpin, Rolta TUSC Wednesday March 14, 2012

Tablespace Usage By Schema In Oracle 11g Rac

Oracle Database 12c Administration Workshop

Convert a Single Instance Database to Oracle RAC 10g on RHEL4 Using Grid Control

Web-Banking for corporate clients User manual

Projects. Corporate Trainer s Profile. CMM (Capability Maturity Model) level Project Standard:- TECHNOLOGIES

Technology Note. ER/Studio: Upgrading from Repository (v ) to Team Server 17.x

ZENworks Reporting System Reference. January 2017

A. Kishore

COURSE CONTENT. ORACLE 10g/11g DBA. web: call: (+91) / 400,

Transcription:

Database Tutorials 2017 Tools for Oracle Databases Andrei Dumitru / IT-DB

Oracle Account Management Oracle SQL*Plus Benthic Golden Oracle SQL Developer CERN Session Manager Oracle Enterprise Manager CERN Data Pump Tool CERN DB Link Viewer Oracle Tools on EOS 2

Oracle Accounts Management Oracle database accounts are computing resources Similar to your project account Managed like other computing resources at CERN https://resources.web.cern.ch/resources/manage/oracle/default.aspx Details in SNOW KB0000829: Account Management for Oracle accounts https://cern.service-now.com/service-portal/article.do?n=kb0000829 3

Oracle Accounts Naming Convention Account for a project <projectname>_xxxxxx myproject_admin, myproject_user Personal account do not use '_' (underscore) in the login name same name as your CERN account 4

Oracle Account Lifecycle Request to be part of the e-group for that database for devdb11 oracle-general-purpose-users Wait for the approval to join the e-group (next day) Once approved, request account on the desired database A DBA will approve the request You receive an email informing you the account is ready Change the password Ready to go 5

Demo Request a new Oracle account https://resources.web.cern.ch Account related actions Temporarily unlock Increase the quota Manage DADs (Database Access Descriptors) Change password, owner, description Delete 6

SQL*Plus command line SQL and PL/SQL language interface reporting tool bundled with the Oracle Database Client and Server software can be used interactively or from scripts sqlplus is equivalent to: "sqlcmd" in Microsoft SQL Server "psql" in PostgreSQL "mysql" in MySQL 7

When to use SQL*Plus? When troubleshooting database connection problems compatible with database, native tool lightweight - lower probability of additional software errors easy to use: need to know basic SQL commands In shell scripts Change expired password sqlplus -S /nolog <<EOF > /tmp/list_of_employees.lst connect myuser/$my_passwd@db_service set head off set feedback off select unique name from employees order by 1; exit EOF 8

SQL*Plus example features substitution variables (&) SQL> insert into my_table(col1,col2) values ( &name,&age); Enter value for name: myname Enter value for age: external scripts (RUN or @) SQL> run /users/scripts/myscript.sql SQL> @/users/scripts/myscript repeating commands with changing input values; very powerful feature in conjunction with rlwrap (see following slide) the command run or its alias: @ enables execution of SQL scripts stored on file system 9

rlwrap - 'readline wrapper Nice extension of SQL*Plus (on UNIX/Linux systems) rlwrap runs the specified command, intercepting user input in order to provide readline line editing, persistent history and completion Ctrl-R search in command history Usage: rlwrap sqlplus $@ 10

Benthic Golden Query and scripting tool for Oracle databases Easy to use, lightweight Free for CERN usage Limitations Windows only Oracle Instant Client 32-bit required CERN license for version 5 only 11

Feature example Output formatting 12

Installation and configuration Download directly from Benthic http://www.benthicsoftware.com/downloads.html Follow installation instructions Use CERN license keys (on DFS) \\cern.ch\dfs\applications\benthic\benthic_keys_cern.html Version 5 13

Oracle SQL Developer Free Oracle Database IDE/GUI Works on Windows, MacOS, Linux (Java based) Features manage and browse database objects execute, edit and debug SQL, PL/SQL statements and scripts Database design and data modelling ad hoc reporting third-party plugins to connect to non-oracle databases Download from Oracle website http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html 14

SQL Query Tuning Design efficient applications by anticipating a query execution plan (explain plan) Explain Plan F10 Explain plan Verify the real execution plan running a query and analysing the real execution path Autotrace F6 Autotrace 15

SQL Query Tuning Use the drop down arrow next to the Explain Plan button to access cached plans from v$sql_plan 16

SQL Tuning Advisor Use tuning advisor to know suggestions about potential improvements of your queries SQL Tuning Advisor 17

Quickly format output set sqlformat json select * from customers; set sqlformat csv select * from customers; -- back to normal set sqlformat select * from customers; 18

SQL Developer Connection creation New DB connection 19

And much more Develop Administer Model Migrate 20

SQL Developer Advantages Big development environment No need to install, simple unzip downloaded package and software is ready to use (JDK required) Portable copy unzipped files on flash drive and you can use it on any PC You can connect in parallel to several different databases WARNING: Easy to work by mistake on production instead of test/development database Disadvantages Heavy: can take some time to start Needs JDK (JRE not enough) 21

Session Manager CERN in-house development Main features: WEB application Browse database connections Check sessions & SQL details Terminate (kill) sessions Session Manager works on existing database connections http://session-manager.web.cern.ch/ 22

Login Integrated with CERN SSO Database login: - credentials of a database account 23

SM database credentials used My Sessions shows an report with some details about sessions connected to database user, whose credentials were used to log in (below: logged in to TEST database as SM_PRESENT, so SM_PRESENT s sessions are displayed) Logged as SM_PRESENT@TEST SM_PRESENT s sessions 24

SM database credentials used (cont.) All Sessions = My Sessions + sessions to which I have privileges Search your session Logged as SM_PRESENT@TEST 25

SM terminate session Mark session and just do it! 26

Session details SQL details Execution plan Execution plan 27

SQL details Go to SQL details 28

E-groups in SM Check your privileges 29

E-groups in SM 30

E-group definition Create your e-group Follow the naming convention: session-manager-<your distinct string> session-manager-our-application-developers session-manager-our-application-admins Contact IT-DB (SNOW ticket) to request new e-group registration Provide list of pairs (in CSV format): database name, db account name test,qa_test_user test,super_dev_user devdb11,project_account Manage the list of your e-group members Remember about security implications! 31

Oracle Enterprise Manager Available at oem.cern.ch Deep look at the database performance Performance Home Top Activity ASH Analytics SQL Monitoring 32

OEM Top Activity 33

OEM Active Session History Load Map 34

OEM SQL Monitoring 35

How to access oem.cern.ch? Authentication and authorization based on e-groups create an e-group for database developers contact IT-DB No OEM access for shared databases like general development databases devdb11 36

CERN Data Pump Tool Automatic solution for copying content of a database schema from one database system to another available to CERN Oracle database users implemented as an PL/SQL package data filtering (include/exclude schema objects) some limitations Detailed description https://twiki.cern.ch/twiki/bin/view/db/cerndb_dpuser SNOW KB0001169 How can I copy the content of an Oracle schema on one database to another schema on a different database? https://cern.service-now.com/serviceportal/article.do?n=kb0001169 37

CERN Data Pump Tool - Limitations Tables with LONG data type are not supported (skipped)! each skipped table is signalled in the log by an ORA-31679 error Only one schema per call can be copied Schema with the same name has to exists on target database (no name remapping is possible). If destination schema not empty, the previous content will be removed 38

CERN DB Link Viewer Can be accessed at cern.ch/dblink-viewer Application that enables you to inspect database links Color Code Red Line - TNS alias is invalid or account is missing on target database Blue Line - Target database account is locked or has expired password Black Line - Link could not be checked: target database not accessible Grey Line - Link status has not been updated for three or more days Green Line - Everything good Background Color Red background - Link might be using an outdated password Orange background - Host descriptor is not a TNS alias Blue background - Link points to the same database 39

CERN DB Link Viewer 40

tnsnames.ora on EOS

Current Installations Oracle full database clients available in AFS now /afs/cern.ch/project/oracle TNS Names /afs/cern.ch/project/oracle/admin/tnsnames.ora Several releases available - linux64 / linux32 Different from standard Oracle Instant Client full contains all the client tools: tnsping, expdp, impdp, sqlldr Details in SNOW KB0001167: Oracle deployment from the AFS tree at CERN 42

On EOS now Same approach but only Linux 64bits available /eos/project/o/oracle/public TNS Names /eos/project/o/oracle/public/admin/tnsnames.ora Copy of SQL*Developer up to date available for clients to pick it up Can be used as of today Details about tnsnames.ora in SNOW KB0001211: Oracle database connect string definitions (tnsnames file) 43

Quick test #on lxplus - for sh like shells (bash,sh,zsh) export ORACLE_CERN=/eos/project/o/oracle/public. $ORACLE_CERN/script/profile_oracle.sh #on lxplus - for csh like (csh, tcsh) setenv ORACLE_CERN /eos/project/o/oracle/public source $ORACLE_CERN/script/cshrc_oracle.csh tnsping devdb12 tnsping devdb12 TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 20-NOV-2017 04:01:17 Copyright (c) 1997, 2013, Oracle. All rights reserved. Used parameter files: /eos/project/o/oracle/public/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact OK (0 msec) 44