DATABASE ADMINISTRATION ECS Release 5 Training. 625-CD-511-001 2 Objectives Create new database devices Allocate disk space Maintain database segments.

Slides:



Advertisements
Similar presentations
Chapter 20 Oracle Secure Backup.
Advertisements

4 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
File Management Chapter 12. File Management A file is a named entity used to save results from a program or provide data to a program. Access control.
Introduction to MySQL Administration.  Server startup and shutdown ◦ How to manually start and stop it from the command line ◦ How to arrange an automated.
Chapter 9 Auditing Database Activities
File Management Systems
1 File Management Chapter File Management File management system consists of system utility programs that run as privileged applications Input to.
Chapter 16 Chapter 16: Troubleshooting. Chapter 16 Learning Objectives n Develop your own problem-solving strategy n Use the Event Viewer to locate and.
Chapter 12 File Management Systems
Hands-On Microsoft Windows Server 2003 Administration Chapter 6 Managing Printers, Publishing, Auditing, and Desk Resources.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Linux+ Guide to Linux Certification, Second Edition
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
NovaBACKUP 10 xSP Technical Training By: Nathan Fouarge
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
Administration etc.. What is this ? This section is devoted to those bits that I could not find another home for… Again these may be useless, but humour.
1 Chapter Overview Monitoring Server Performance Monitoring Shared Resources Microsoft Windows 2000 Auditing.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Chapter 2: Designing Physical Storage MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide (70-443)
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies.
V 0.1Slide 1 Security – System Configuration How to configure WebSAMS? Access Control Other Information Configuration  system customization  system configuration.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Informix IDS Administration with the New Server Studio 4.0 By Lester Knutsen My experience with the beta of Server Studio and the new Informix database.
Architecture Rajesh. Components of Database Engine.
Chapter 13 Users, Groups Profiles and Policies. Learning Objectives Understand Windows XP Professional user accounts Understand the different types of.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Computer Emergency Notification System (CENS)
Overview Managing a DHCP Database Monitoring DHCP
1 File Management Chapter File Management n File management system consists of system utility programs that run as privileged applications n Concerned.
A Brief Documentation.  Provides basic information about connection, server, and client.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
Week 7 : Chapter 7 Agenda SQL 710 Maintenance Plan:
1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
UNIX & Windows NT Name: Jing Bai ID: Date:8/28/00.
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
1 Chapter Overview Monitoring Access to Shared Folders Creating and Sharing Local and Remote Folders Monitoring Network Users Using Offline Folders and.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
SAP R/3 User Administration1. 2 User administration in a productive environment is an ongoing process of creating, deleting, changing, and monitoring.
You Inherited a Database Now What? What you should immediately check and start monitoring for. Tim Radney, Senior DBA for a top 40 US Bank President of.
SQL Database Management
You Inherited a Database Now What?
DATABASE ADMINISTRATION
Introduction to Operating Systems
Active Directory Administration
Introduction of Week 3 Assignment Discussion
Chapter 3: Windows7 Part 3.
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Process Description and Control
Chapter 2: Operating-System Structures
You Inherited a Database Now What?
10 Administration etc..
Chapter 2: Operating-System Structures
Database administration
Lecture 4: File-System Interface
Sql Saturday Philadelphia
Mr. M. D. Jamadar Assistant Professor
Presentation transcript:

DATABASE ADMINISTRATION ECS Release 5 Training

625-CD Objectives Create new database devices Allocate disk space Maintain database segments Maintain transaction logs, error logs Maintain the interfaces file (Configure SQL Server) Startup and shutdown SQL servers Startup and shutdown Back Server Startup and shutdown Monitor Server Security and monitoring Product Installation and Disk Storage Management Backup and recovery Configuring, tuning, and monitoring

625-CD DBA Tasks and Functions Perform database backup, transaction log maintenance, and database recovery. Monitor and tune the physical allocation of database resources. Maintain user accounts. Create user registration and account access control permissions in the security database. Work with data specialists on DB design, data sets, and metadata management.

625-CD Sybase Directory Structure

625-CD Version 2.0 SQL Servers

625-CD Version 2.0 Production Databases

625-CD Version 2.0 System Management Databases

625-CD Naming Conventions The file name should indicate the function and/or content of the object regardless of the length of the file name. Only easily understandable abbreviations should be used. Parts of names are separated by the underscore character(_). Only one optional suffix is permitted and is appended to the file name by a period (.). The full path of the object is considered to be part of the name.

625-CD Version 2.0 Databases Production Databases System Management Databases Version 2.0 databases are divided into two categories:

625-CD B.0 Databases ICLHW Ingest ICLHW Ingest DMGHW Advertising DMGHW Advertising ACMHW Storage Management Pull Monitor Metadata ACMHW Storage Management Pull Monitor Metadata PLNHW Planning and Data Processing Subsystem PLNHW Planning and Data Processing Subsystem ASTER LUT Aster Lookup Table (EDC only) ASTER LUT Aster Lookup Table (EDC only)

625-CD SQL Server SQL Server Executable (shared) Operating System Procedure Cache Locks Pending I/O queue Other Memory Shared Memory CPUs Disks Network Engine 0 Network I/O Running Registers File Descriptors Engine 1 Network I/O Running Registers File Descriptors Engine N Network I/O Running Registers File Descriptors Data Caches

625-CD What is a Transaction Log? Automatically records every transaction issued by each user of the DB. Keeps track of all changes to the database. Each database has its own transaction log. Cannot be turned off. Write-ahead file. Changes are reversed if transaction fails to complete. Receive a dump transactions in seconds.

625-CD Transaction Log Backup Transaction Log - an expanding file that records all database transactions. Used for complete recovery of DB if media fails. Maintained on a different device than DB Backed up with regular system backups, but non-scheduled backups can be performed with permission.

625-CD Maintaining the Interfaces file Adding an entry to the interfaces file (When a new SQL Server is created) Modifying an existing entry in the interface file (When the machine that has the SQL Server is running gets moved)

625-CD Start & Stop SQL Server STOP! BACKUP and MONITOR Server must be STOPPED before STOPPING SQL Server START the SQL Server after installation, system outage or maintenance

625-CD Start & Stop SQL Backup Server STOP the BACKUP Server before STOPPING SQL Server SQL Server must be Up and Running in order to START the BACKUP Server

625-CD Start & Stop SQL Monitor Server STOP the MONITOR Server before stopping SQL Server SQL Server must be up and running in order to START the MONITOR Server

625-CD Database Device Stores objects that make up databases May be: –a distinct physical device –a disk partition –a file Must be initialized first

625-CD Initializing a Database Device Command Script Template /******************************************/ /* name: [add_devices.sql] */ /* purpose: */ /* written: */ /* revised: */ /* reason: */ /******************************************/ disk init name = [device name], physname = "/dev/[device name]", vdevno = [#], size = [size] go sp_helpdevice [device name} go

625-CD Completed database device creation script

625-CD Create New Database Command Script Template

625-CD Completed Create DatabaseScript

625-CD User Database Request Form REQUESTER INFORMATION: Name: ______________________________________________________________________ Office Phone Number: __________________________________________________________ Address: ______________________________ Office Location: ___________________ DATABASE(S) TO BE CREATED: _____________________________________________________________________________ JUSTIFICATION: ______________________________________________________________ _____________________________________________________________________________ Date of Request: ________________________ Date Required: ________________________ Supervisor Approval: __________________________________________ Date: ____________ Ops Supervisor Approval: ______________________________________ Date: ____________ User Database Request Form REQUESTER INFORMATION: Name: ______________________________________________________________________ Office Phone Number: __________________________________________________________ Address: ______________________________ Office Location: ___________________ DATABASE(S) TO BE CREATED: _____________________________________________________________________________ JUSTIFICATION: ______________________________________________________________ _____________________________________________________________________________ Date of Request: ________________________ Date Required: ________________________ Supervisor Approval: __________________________________________ Date: ____________ Ops Supervisor Approval: ______________________________________ Date: ____________

625-CD Renaming Database Command Sample /* Rename database Old-database-name to New-database-name */ sp_dboption Old-database-name, "single user", true go use Old-database-name go checkpoint go use master go sp_renamedb Old-database-name, New-database-name go sp_dboption New-database-name, "single user", false go use New-database-name go checkpoint go use master go

625-CD T1INS01 t1ins01_srvr t1ins01_mon_srvr t1ins01_syb_backup T1MSS07 t1mss06_srvr t1mss06_mon_srvr t1mss06_syb_backup T1INS02 t1ins02_srvr t1ins02_mon_srvr t1ins02_syb_backup T1PLS01 t1pls01_srvr t1pls01_mon_srvr t1pls01_syb_backup T1ICG01 t1icg01_srvr t1icg01_sqs222_srvr t1icg01_mon_srvr t1icg01_syb_backup T1MSS06 t1mss06_srvr t1mss06_mon_srvr t1mss06_syb_backup T1ICG03 t1icg03_srvr t1icg03_sqs222_srvr t1icg03_mon_srvr t1icg03_syb_backup T1MSH01 t1msh01_srvr t1msh01_mon_srvr t1msh01_syb_backup T1ACG01 t1acg01_srvr t1acg01_sqs222_srvr t1acg01_mon_srvr t1acg01_syb_backup T1SPS02 t1sps02_srvr t1sps02_mon_srvr t1sps02_syb_backup Servers Name:(Sybase & SQS)

625-CD Changing Password Command Sample sp_password old-password, new-password, user-name

625-CD Database Segments Collection of database devices or fragments available to a particular database Can have tables and indexes assigned to it Can span a set of physical devices Created when the database is created or when DBA deems necessary or as part of the database recovery procedure

625-CD Why Database Segments? Reduces read/write access time Increases SQL Server performance Added administrative control over placement, size, and space usage of specific database objects

625-CD Database Segments Template File

625-CD Sample template.sql file for creation of a database table

625-CD Completed Create Table Script

625-CD Backup and Recovery

625-CD Database Data Backup Databases data are backed daily Can be requested at any time Need to know the following: –Name of DB to be backed up –Name of the server on which the DB resides –Name of the backup volume –Name of the dump file on the backup volume Run daily by a UNIX Cron Job

625-CD Database Recovery/ Database Device Restoration Device Failure verified by SA SA requests a restoration from the DBA Transaction log for each DB on the failed device is backed up DBA examines space usage of each DB on failed device. DB(s) on the failed device are deleted; then device is deleted DBA initializes new DB device DBA recreates each user DB on the new device Each DB is restored from DB backups and transaction logs DBA notifies SA when restoration is complete.

625-CD Sample template.sql file for new database user login

625-CD dbcc memusage Sample Output Meg. 2K Blks Bytes Configured Memory: Code size: Kernel Structures: Server Structures: Cache Memory: Proc Buffers: Proc Headers:

625-CD Configure SQL Server Customization Fine Tuning Optimize memory allocation or performance Configuration Variables: –allow/deny updates –audit queue size –password expiration interval –remote access Some values take effect immediately, others require a server reboot. –When in doubt, reboot!

625-CD I provide Mister Quester with a password for the SQL Server, Then I send to everyone to confirm the new account. SQL Server Login Approval Process I complete the SQL Server Login Request Form and send it to my Supervisor. Looks okay to me! I’ll send it to the Database Administrator. R. E. Quester If the form is complete, I’ll approve it and send it on to the Operations Supervisor

625-CD SQL Server Login Account Request Form SQL Server Login Account Request REQUESTER INFORMATION: Name: ______________________________________________________________________ UNIX ID: _______________________________ Group: _______________________________ Office Phone Number: __________________________________________________________ Address: ______________________________ Office Location: ___________________ Database(s) to be accessed: _____________________________________________________ ____________________________________________________________________________ Permissions required for database objects:___________________________________________ ____________________________________________________________________________ Justification: __________________________________________________________________ ____________________________________________________________________________ Date of Request: ________________________ Date Required: ________________________ Supervisor Approval: __________________________________________ Date: ____________ Ops Supervisor Approval: ______________________________________ Date: ____________

625-CD Database Access Privileges Assign a user to a group that has specific access privileges. Assign a user object permissions. Assign a user command permissions.

625-CD Database Tuning and Performance Monitoring Use sp_config to determine current configuration parameters and set future run values. Use dbcc memusage to determine current memory usage. Use sp_spaceused to determine how much space has been used on the device. Running two event processors

625-CD sp_config Sample Output

625-CD Physical Memory Utilization Scheme Operating System Kernel and Other Applications SQL Server Executable SQL Server Kernel SQL Server Internal Structures Procedure Data Configurable SQL Server Cache

625-CD Topology for Running Two Event Processors Event Server #1 Event Server reads & writes reads & writes Primary Processor Shadow Processor Run Job Remote Agent User Command PING Start Job MACHINE MACHINE B (PLS) MACHINE A (SPS) RemoteRemote ThirdThird #1 #2

625-CD Sybase Security (Auditing) 1) Run sybinit and install auditing. 2) Add a login for auditing: sp_addlogin ssa, ssa_password, sybsecurity use sybsecurity sp_changedbowner ssa sp_role "grant", sso_role, ssa 3) Enable auditing: sp_auditoption "enable auditing", "on" sp_auditlogin loginname, "cmdtext", "on" 4) To Test: create a table in a database with one field grant all on the table for the loginname log into isql using the loginname insert a record into the table log into isql as ssa select * from sysaudits where loginname = "loginname"

625-CD Integrity Monitoring Database Consistency Checker dbcc: is a set of utility commands for checking the logical and physical consistency of a database