Oracle
|
IBM DB2 LUW
|
MS SQL
|
Postgre SQL
|
IBM Netezza
|
|
to connect to DB
|
set sid,conn / as sysdba
|
DB2 connect to <Db name>
|
thru SSMS servername/instance
name
|
pgsql,pgsql/c <Db name>
|
nzsql,nzsql/c <Db name>
|
List Db's on server
|
ps -ef|grep pmon
|
db2 list database;
|
select name from sys.databases;
|
SELECT datname FROM pg_database
|
select name from _v_database;
|
default port
|
1521
|
50000
|
1433
|
5432
|
5480
|
backup methods
|
cold,hot,rman,expdp/exp
|
offline/online,export
|
full,log,table level
|
pgdump
|
full,Incremental,table export
|
instance/DB's
|
one instance per DB except Rac
|
one instance many Db's
|
one instance many Db's
|
one instance many DB's
|
one instance many Db's
|
to start/shutdown DB
|
set sid,conn / as sysdba
|
db2start/db2stop
|
SSMS/offline/online
|
su postgres -c 'pg_ctl start -D /usr/local/pgsql/data -l
serverlog'
|
nzstop/nzstart
|
startup/shutdown
|
|||||
error log
|
alert_sid.log
|
db2diag.log
|
USE master
|
show log_directory ;
|
pg.log,servermgr.log
|
GO
|
pg_log
|
||||
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file',
NULL, NULL, N'asc'
|
|||||
Monitoring
|
Grid/OEM
|
pgwatch,Open PostgreSQL
Monitoring (OPM)
|
nzportal
|
||
High availability
|
RAC/DG/ADG
|
HADR
|
MS cluter/Mirroring
|
PGCluster is a multi-master and
synchronous replication tool
|
OS cluster/replication
|
database backup
|
rman>backup database ;
|
QUIESCE DATABASE IMMEDIATE FORCE
CONNECTIONS;BACKUP DB <db> TO
"/home/offline_full" COMPRESS;
|
BACKUP DATABASE [db] TO
DISK = 'F\db_backup_2015_09_02_210001_2075068.bak' WITH NOFORMAT,
NOINIT, NAME = N'db_delete-Full Database Backup', SKIP, NOREWIND,
NOUNLOAD, STATS = 10
|
pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}
|
nzbackup -dir /home/user/backups -u user -pw password
-db db1
|
database restore
|
rman>restore database
|
RESTORE DB <db> FROM
"/backup/offline_full" TAKEN AT <timestamp> INTO
<db2>;
|
RESTORE DATABASE [db] FROM
DISK = 'F\db_.bak' WITH FILE = 1, NOUNLOAD, STATS = 10
|
$ psql -U {user-name} -d {desintation_db}-f {dumpfilename.sql}
|
nzrestore -db db1 -u user -pw password -dir
/home/user/backups -v
|
current Db connections
|
select * from v$session;
|
db2 list application all;
|
sp_who2
|
SELECT usesysid, usename FROM pg_stat_activity;
|
nzsession
|
super user
|
sys,system
|
SYSADM, SYSCTRL
|
SA,SYSADMIN
|
postgres(OS)
|
NZ(os user) SYSTEM DB usr
|
Db config files
|
init.ora/spfile
|
db2cfg,dbmcfg
|
|||
Db files
|
ctl,redo,data
|
container data
|
data,log
|
NO TBS/everything in DISK
|
|
Sharing DBA experience to all -- Oracle,MS SQL, DB2 , Netezza DBA,postgreSQL,AWS Redshift,MySQL,oracle SAP
Wednesday, December 30, 2015
Various RDBMS comparisons and characteristics
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment