Download Powerpoint - SQL Saturday

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Beware of the Dark Side
A Guided Tour of Oracle
for the SQL Server DBA
David Postlethwaite
SQLSaturday #467 Sponsors
About Me
 David Postlethwaite
 Liverpool Victoria LV=






SQL and Oracle DBA
MCSE 2012 Data Platform
MCITP 2008, 2005
Oracle OCA
25 years IT Experience
6 years as DBA
 david@clunyweb.co.uk
 Blog: gethynellis.com
3 |
Introduction
 Oracle
 “Selecting a database is a bit like picking a religion. There are pros
and cons to each, and the discussions run hot and heavy. ”
 “Love it or hate it, you can’t hide from it Oracle is out there”
4 |
Lies, Statistics and Prejudice
 The Passion
 The Internet is full of articles extolling the virtues of SQL and Oracle
 And plenty criticising them
 All are biased
History












1979 Oracle first released
1985 Oracle Client Server
1989 SQL Server v1 on OS/2 (16 Bit)
1992 Oracle supports 64 Bit
1993 SQL Server 4.2 on Windows NT (16 Bit)
1997 Oracle supports java, http and Linux
1997 SQL Server 7.0
2001 Oracle RAC (Real Application Clusters)
2003 Oracle 64 Bit for Linux
2003 SQL 2000 on 64 Bit
2007 Oracle 11g supports Windows
2012 SQL Always On
Oracle Platforms (12c)









Microsoft Windows (64 bit)
Linux x86 64
Solaris (SPARC and x86-64)
HP-UX Itanium
OpenVMS (IA64)
AIX
zLinux 64
Oracle Cloud
Microsoft Azure
Oracle Add Ons
 More than just a DBMS
 Development Tools Operating Systems




Oracle Forms
Oracle Apex
Oracle Edge
Java
 Middleware







PeopleSoft
E Business Suite
Oracle Financials
JD Edwards
WebCenter
BI Tools
Web Logic
Solaris
Linux
Physical Servers
Sun Sparc
Sun x86
Oracle Super Cluster
Sun Blade Servers
Virtual Servers
Oracle Private Cloud Appliance
Cloud
Oracle Managed Cloud Services
Oracle Editions
Express
Edition
Standard
Edition One
Standard
Edition
Enterprise
Edition
Maximum
1 CPU
2 Sockets
4 Sockets
No Limit
RAM
1GB
OS Max
OS Max
OS Max
Database Size
11GB
No Limit
No Limit
No Limit
Download from oracle.com
Many Enterprise features require extra licence
Oracle Certification
 Oracle Certified Associate (OCA)
 Oracle Certified Professional (OCP)
 Oracle Certified Master (OCM) (11g)
Instance, Database and Schema
master
model
File group
Data
file
msdb
File group
Log
file
Data
file
tempdb
File group
Log
file
Data
file
File group
Log
file
processes
User DB 2
User DB 1
File group
File group
Data
file
memory
schema
SQL Server Instance
Data
file
Log
file
schema
schema
Log
file
schema
Data
file
Log
file
Instance, Database and Schema
database
processes
system
sysaux
temp
undo
Table space
Table space
Table space
Table space
Data
file
Data
file
Data
file
Data
file
JohnSmith
AdventureWorks
UserSchema1
memory
tablespace
Data
file
(s)Pfile
(init.ora)
Oracle Instance
Redo Log
tablespace
tablespace
Data
file
Data
file
Redo Log
Redo Log
Control file
Instance, Database and Schema
Storage Structure
User
Schema 1
User Database 1
primary filegroup
Data
file
filegroup 2
Data
file
Data
file
Log
file
SQL Server Database
User
Schema 2
User
Schema 3
Tablespace 2
Tablespace 1
Data
file
Data
file
Data
file
Data
file
redo logs
Oracle Schema
Data
file
undo
tablespace
File Structure
8k only
2k, 4k ,8k ,16k or 32k
Mapping of Tablespaces to Databases
SQL Server
master
database
resource
database
model
database
msdb
database
tempdb
database
user
file
User database
Transaction
log
User schema
system
tablespace
sysaux
tablespace
data dictionary
temporary
tablespace
user
tablespace
redo logs
Oracle
undo
tablespace
Start up Procedure
Sqlserver.exe
idle
oracle.exe
nomount
Spfile (init.ora)
registry
master
database
mount
model
database
msdb
database
control file
tempdb
database
system
tablespace
user
database
transaction
log
undo
tablespace
redo logs
user
tablespace
temporary
tablespace
open
sysaux
tablespace
Viewing Oracle
 Tools for Oracle
 SQL Plus
 SQL Developer
 OEM Oracle Enterprise Manager (Grid)
 Third Party
 Toad
DEMO
 Sqlplus / as sysdba
 show user
 startup

- nomount

- mount

- open
 Select * from v$instance (don’t forget the semi colon)
 Select status from v$instance;
 Create user JohnSmith identified by password123
Backups
SQL Backups
.BAK file
Oracle Backup
Backup is literally copying files to another location
Cold /Offline (or consistent) backups
Hot / Online (or inconsistent) backups
Archive log Mode
“alter tablespace begin backup”
Recover Manager RMAN
Automates and configures backups and restores
But you still need a scheduler to run RMAN commands
TNS and How to Connect
 TNS Transparent Network Substrate

SET TNS_Admin= C:\app\oracle\product\12.1.0\dbhome\NETWORK\ADMIN

TNSNames.ora





Production =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521) )
(CONNECT_DATA =
(SERVICE_NAME= ora12c) ) )
 Listener


Listener.ora
Sqlnet.ora

sqlplus.exe
davidp@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=server1t)(PORT=1521))
(CONNECT_DATA=(SID=ora12c)))

Mapping of Objects
Microsoft SQL Server
Oracle
instance (server)
database
database
schema
schema
no direct equivalent.
file group
table space
login
user /schema
user
user / schema
permission
privilege
indexed view
materialized view (snapshot)
t-sql
pl-sql
error Logs
alert log
transaction Log file
redo logs
execution plan
explain plan
Any Questions
 Conclusion
 Hopefully you now have a better understanding of Oracle
 And will be able to converse with Oracle DBAs more easily
 Q&A
 david@clunyweb.co.uk
 Blog: gethynellis.com
 www.linkedin.com/in/davidpostlethwaite/
SQLSaturday #467 Sponsors
Related documents