Database Administration Sessions. Identify the running Sessions The sessions can be identified using following objects. V$SESSION GV$SESSION Following.

Slides:



Advertisements
Similar presentations
Module XIV SQL Injection
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Introduction to Oracle Automatic Storage Management (ASM) Copyright System Managers LLC 2008.
1 Chapter 16 Tuning RMAN. 2 Background One of the hardest chapters to develop material for Tuning RMAN can sometimes be difficult Authors tried to capture.
9 Copyright © 2006, Oracle. All rights reserved. Automatic Performance Management.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
Rollback Segments Nilendu Misra (MAR99)
MySQL Access Privilege System
Deadlock 2.
Password Management for Oracle8 Ari Kaplan Independent Consultant.
An introduction to SQL*Trace, TKPROF and Execution Plans
SAP System.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
IS 432: DATABASE ADMINISTRATION Lecture 4: Parameter Files. Information Systems Department 1.
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 12 System and Object Privileges.
Chapter 9 Auditing Database Activities
Harvard University Oracle Database Administration Session 2 System Level.
Managing an Oracle Instance
9 Copyright © 2009, Oracle. All rights reserved. Managing Data Concurrency.
Adapted from Afyouni, Database Security and Auditing DB Auditing Examples (Ch. 9) Dr. Mario Guimaraes.
Security and Integrity
Oracle Database Administration
Getting Started with Oracle11g Abeer bin humaid. Create database user You should create at least one database user that you will use to create database.
Module 15: Monitoring. Overview Formulate requirements and identify resources to monitor in a database environment Types of monitoring that can be carried.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Module 18 Monitoring SQL Server 2008 R2. Module Overview Monitoring Activity Capturing and Managing Performance Data Analyzing Collected Performance Data.
Managing the Oracle RDBMS Today you will look at the basics, including: –Setting up Enterprise Manager –Using Enterprise Manager –Using Server Manager.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
CHAPTER 6 Users and Basic Security. Progression of Steps for Creating a Database Environment 1. Install Oracle database binaries (Chapter 1) 2. Create.
Week 6 Lecture 2 System and Object Privileges. Learning Objectives  Identify and manage system and object privileges  Grant and revoke privileges to.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
Threaded Applications Introducing additional threads in a Delphi application is easy.
Copyright (c) by CNAPTICS Corporation. All rights reserved.1 INFO Oracle Database 11g: Administration II Presented By: Marc S. Paller,
Copyright © 2011 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. SQL Workshop Day 3.
ITN Wake Tech1 ITN270 Advanced Internet Databases Lecture 15. General MySQL Administration Topics: –Securing a New MySQL Installation –MySQL Server.
By Lecturer / Aisha Dawood 1.  Dedicated and Shared Server Processes  Configuring Oracle Database for Shared Server  Oracle Database Background Processes.
Administration and Monitoring the Database Oracle 10g.
Using OUI to install Oracle9i Release 2 on an OpenVMS System.
Installing Oracle9i RAC Release 2 on HP OpenVMS Systems.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 6 Functions.
By Lecturer / Aisha Dawood 1.  Dedicated and Shared Server Processes  Configuring Oracle Database for Shared Server  Oracle Database Background Processes.
9 Copyright © 2007, Oracle. All rights reserved. Managing Data and Concurrency.
IT Database Administration SECTION 01. Starting Up and Shutting Down the Database Database Administration Facilities – A number of tools are available.
8 Copyright © 2005, Oracle. All rights reserved. Managing Data.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
PowerBuilder Online Courses - by Prasad Bodepudi Database Painter Primary & Foreign Keys Extended Attributes PowerBuilder System Tables Database Profiles.
Nitin Singh,AAO/EDP,RTI Allahabad1 Troubleshooting.
10 Managing Rollback Segments Objectives Planning the number and size of rollback segments Creating rollback segments using appropriate storage.
Tracing Individual Users in Connection-pooled Environments with Oracle 10g Terry Sutton Database Specialists, Inc.
© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Slide 1.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
CSC414 “Introduction to UNIX/ Linux” Lecture 3
Oracle Business Intelligence Foundation – Testing and Deploying OBI Repository.
Cognos 8 BI Configuration, Administration, and Upgrade Cognos 8 BI.
Agenda Managing Processes (Jobs) Command Grouping Running jobs in background (bg) Bringing jobs to foreground (fg), Background job status (jobs) Suspending.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
 Database Administration Oracle Database Instance Management Starting Up and Shutting Down أ. ندى الغامدي, أ. ندى الطوالة.
3 Copyright © Oracle Corporation, All rights reserved. 管理数据库事例.
SQL Trace and TKPROF.
How To Pass Oracle 1z0-060 Exam In First Attempt?
Errorstack –Shortstack
Is 221: Database Administration
Oracle Accounts on Campus
Database Security OER- Unit 1-Authentication
COP5725 DATABASE MANAGEMENT POSTGRESQL TUTORIAL
The Linux Command Line Chapter 10
Lab 6: Process Management
Presentation transcript:

Database Administration Sessions

Identify the running Sessions The sessions can be identified using following objects. V$SESSION GV$SESSION Following queries can be used to identify sessions. Select * from v$session Select * from GV$session SELECT s.inst_id, s.sid, s.serial#, p.spid, s.username, s.program FROM gv$session s JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id WHERE s.type != 'BACKGROUND';

Killing the session The basic syntax for killing a session is shown below. SQL> ALTER SYSTEM KILL SESSION 'sid,serial#'; Or SQL> ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE; it returns control back to the current session immediately, rather than waiting for confirmation of the kill.

OS approach The Windows Approach To kill the session on the Windows operating system, first identify the session, then substitute the relevant SID and SPID values into the following command issued from the command line. C:> orakill ORACLE_SID spid The UNIX Approach To kill the session on UNIX or Linux operating systems, first identify the session, then substitute the relevant SPID into the following command. % kill spid If after a few minutes the process hasn't stopped, terminate the session using the following. % kill -9 spid If in doubt check that the SPID matches the UNIX PROCESSID shown using. % ps -ef | grep ora The session thread should be killed immediately and all resources released.

Extending the System session limit First check the session limit in oracle instance. show parameter sessions Alter the new session limit. alter system set sessions=180 scope=spfile; Shutdown and then startup. show parameter sessions

Sessions Management using Profiles show parameter resource_limit Alter resource limit. alter system set RESOURCE_LIMIT=true scope=both; Creating a new profile with session limit. create profile sesslimit limit sessions_per_user 2; Create user and assign new profile. create user fish identified by fish123 default tablespace data profile sesslimit; grant create session to fish; connect fish/fish123

Oracle Session views v$sessmetric This view is new in Oracle 10g and allows improved timing and statistics. v$session_event This views is similar to v$system_event. However, it breaks it down to currently connected sessions. V$session_event has also the column max_wait that shows the maximum time waited for a wait event. v$session_longops Use v$session_longops if you have a long running pl/sql procedure and want to give feedback on how far the procedure proceeded. If the following Procedure is run, it will report its progress in v$session_longops. The Procedure will also set the module attribute in v$session which makes it possible to find the sid and serial# of the session.

v$session_wait This views shows what wait event each session is waiting for, or what the last event was that it waited for. In contrast, v$session_event lists the cumulative history of events waited for in a session. The columns P1, P2 and P3 are parameters that are dependant on the event. With Oracle 10g, v$session_wait's information will be exposed within v$session as well.Since 10g, Oracle displays the v$session_wait information also in the v$session view. v$session_wait_history This view is new in Oracle 10g and allows improved timing and statistics. v$sesstat This view is similar to v$mystat except that it shows cumulated statistics for all sessions. Join sid with v$session and join statistic# with v$statname. v$sesstat is also similar to v$sysstat, except that v$sysstat accumulates the statistics as soon as a session terminates.