Presentation is loading. Please wait.

Presentation is loading. Please wait.

RDBMS Progress, Oracle and SQL Server in relationship with Big Brother/Big Data.

Similar presentations


Presentation on theme: "RDBMS Progress, Oracle and SQL Server in relationship with Big Brother/Big Data."— Presentation transcript:

1 RDBMS Progress, Oracle and SQL Server in relationship with Big Brother/Big Data

2 Dmitri Levin Work with Progress since 1992 Work with Oracle since 2003 MS SQL Server – not much Microsoft Certified Professional (SQL-2012) Oracle Certified Associate (11g) Progress – not certified PUG Challenge Americas 20142

3 Relational Databases Big Data / NoSQL 3PUG Challenge Americas 2014 ( humongous )

4 NoSQL Types PUG Challenge Americas Key-value storeAmazon DynamoDB, Oracle NoSQL Column StoreCassandra, Hbase, BigTable Document databasesMongoDB (JSON) Graph storesNeo4j, HyperGraphDB

5 BigData ≈ Kind of “proutil db –C load –i” PUG Challenge Americas A top speed load No durability

6 RDBMSBigData RelationalYesNo Basic unitRowDocument 6PUG Challenge Americas 2014 SchemaYesNo

7 PUG Challenge Americas 2014 RDBMSNoSQL RowDocument { “name” : “Dmitri”, “last name” : “levin”, “date of birth” : 04/13/64 } Document { “name” : “Dmitri”, “name” : “John” } 7

8 PUG Challenge Americas 2014 RDBMSNoSQL RowDocument TableCollection Collection of Documents { “name” : “Dmitri”, “lname” : “levin”, “dob” : 04/13/64 } { “name” : “John”, “lname” : “Doe”} { “foo” : 3 } 8

9 PUG Challenge Americas 2014 RDBMSNoSQL Database TableCollection RowDocument ColumnField=key-value pair Index Primary Key_id field 9

10 PUG Challenge Americas 2014 Database Table Row Database Collection Document 10 Table Row Collection Document RDBMSNoSQL

11 ScalingUpOut $$ (NoSQL) 11PUG Challenge Americas 2014 RDBMSBigData RelationalYesNo Basic unitRowDocument SchemaYesNo

12 Shard PUG Challenge Americas PartitioningSharding Partition_1 Partition_2 Shard_1Shard_2

13 DR with Sharding PUG Challenge Americas Shard_2 Shard_1 Shard_3 Shard_2 AB C

14 RDBMSBigData RelationalYesNo Basic unitRowDocument SchemaYesNo ScalingUpOut NormalizationYesNo Referential IntegrityYesNo Transactions/DurabilityYesNo Row LocksYesNo JoinsYesNo $$ (NoSQL) 14PUG Challenge Americas 2014

15 15 Examples ProgressmongoDB Create Customer. Assign name = "Lift Line Skiing" country = “USA” address = “276 North Street” city = ” Boston” state = ” MA” postal-Code = db.customer.insert( {name: "Lift Line Skiing", country: “USA”, address: “276 North Street” City:” Boston” State:” MA” Postal-Code:02114} );

16 PUG Challenge Americas Examples ProgressmongoDB For each Customer no-lock: Display Cust-Num name country address city state Postal-Code. db.customer.find(); 1 Lift Line Skiing USA 276 North Street Boston MA { _id: ObjectID("509a8fb2f3f4948bd2f983a0"), name: "Lift Line Skiing", country: “USA”, address: “276 North Street” City: ”Boston” State: ”MA” Postal-Code: 02114} Find first customer no-lock.db.customer.findOne();

17 PUG Challenge Americas Update db.customer.update({Cust-Num: 1}, {new-document}); Delete db.customer.remove({Cust-Num: 1}); Delete everything db.customer.remove(); Examples

18 PUG Challenge Americas db.customer.find({Cust-Num: 1}); {“cust-num”: 1, “name” : “Dmitri”} Update db.customer.update({Cust-Num: 1}, {‘$Set’ {‘Age’: 50}}); {“cust-num”: 1, “name” : “Dmitri”, “age”: 50} Examples

19 PUG Challenge Americas CRUD More Examples Create Read Update Delete

20 Where it is used PUG Challenge Americas Healthcare Retail Security (NSA) Emergency Management (FAA) Social Media

21 PUG Challenge Americas

22 PUG Challenge Americas NewSQLRDBMSNoSQL ???OracleMongoDB

23 PUG Challenge Americas NewSQL General Purpose In-memory Databases MongoDB

24 PUG Challenge Americas That is all about NO SQL

25 Progress, Oracle and SQL Server

26 Instance PUG Challenge Americas Shared memory APW BIW AIW WDOG Background Processes Sports.db Sports.bi Sports.lg

27 PUG Challenge Americas 2014 Progress v10Oracle11gMS SQL Server Instance Database Schema 27

28 PUG Challenge Americas System Databases User Databases

29 PUG Challenge Americas 2014 Progress v11Oracle12cMS SQL Server InstanceContainer DBInstance Database Schema Plugable DB Schema Tenant Backup 29

30 Physical Structure (data files) PUG Challenge Americas 2014 ProgressOracleMS SQL Server Database Filesports.dbControl File(s)control01.ctlN/A, master db Structure filesports.stN/A System Areasports.d1System Tablespace system.dbfPrimary datafile.mdf D Filesarea.dDatafilestablespace.dbfSecondary datafile.ndf Before-Image File + After- Image File sports.b1 + sports.a1 Undo tablespace + Redo Log undotbs.dbf + redo01.log Log files.ldf Copy of After- Image File sports.date _time_etc Archive Logsports.date_time _etc Log Filesports.lgAlert Logalert_sports.log Parameter Filesports.pfpfile (or spfile)initsports.ora 30

31 PUG Challenge Americas SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

32 Progress = _DbStatus-LastTran (Last Transaction Number) or promon 7 PUG Challenge Americas SQL Server = LCN (Log Change Number) Oracle = SCN (System Change Number)

33 PUG Challenge Americas Last Transaction Number

34 PUG Challenge Americas 2014 rfutil db-name -C roll forward [ endtime yyyy:mm:dd:hh:mm:ss | endtrans transaction-number ] SQL> RECOVER DATABASE UNTIL TIME sysdate-1; SQL> RECOVER DATABASE UNTIL SCN ; 34 Progress _DbStatus-LastTran Oracle SCN SQL Server LCN RESTORE LOG db_name FROM DISK = 'C:\file.TRN' WITH RECOVERY, STOPATMARK = 'lsn:lsn_number' RESTORE LOG db_name FROM DISK = 'C:\file.TRN' WITH RECOVERY, STOPAT = 'Mar 23, :31:00 PM'

35 Physical Structure (data files) PUG Challenge Americas 2014 ProgressOracleMS SQL Server Database Filesports.dbControl File(s)control01.ctlN/A, master db Structure filesports.stN/A System Areasports.d1System Tablespace system.dbfPrimary datafile.mdf D Filesarea.dDatafilestablespace.dbfSecondary datafile.ndf Before-Image File + After- Image File sports.b1 + sports.a1 Undo tablespace + Redo Log undotbs.dbf + redo01.log Log files.ldf Copy of After- Image File sports.date _time_etc Archive Logsports.date_time _etc Log Filesports.lgAlert Logalert_sports.logError Log (ERRORLOG) Parameter Filesports.pfpfile (or spfile)initsports.oraRegistry 35

36 PUG Challenge Americas mdf,.ldf.mdf,.ndf,.ldf

37 Physical Structure (data files) PUG Challenge Americas 2014 ProgressOracleMS SQL Server Database Filesports.dbControl File(s)control01.ctlN/A, master db Structure filesports.stN/A System Areasports.d1System Tablespace system.dbfPrimary datafile.mdf D Filesarea.dDatafilestablespace.dbfSecondary datafile.ndf Before-Image File + After- Image File sports.b1 + sports.a1 Undo tablespace + Redo Log undotbs.dbf + redo01.log Log files.ldf Copy of After- Image File sports.date _time_etc Archive Logsports.date_time _etc Log Filesports.lgAlert Logalert_sports.logError Log (ERRORLOG) Parameter Filesports.pfpfile (or spfile)initsports.oraRegistry 37

38 PUG Challenge Americas 2014 ProgressOracleMS SQL Server InstanceContainer DBInstance Database Before-image After-image Redo Log Undo Tablespace Transaction Log 38

39 PUG Challenge Americas 2014 ProgressOracle MS SQL Server With After-images W/O After-images ARCHIVELOG Mode NOARCHIVELOG Mode 39 FULL Recovery Model SIMPLE Recovery Model Bulk-logged Recovery Model PROD DEV

40 Physical Structure (data files) PUG Challenge Americas 2014 ProgressOracleMS SQL Server Database Filesports.dbControl File(s)control01.ctlN/A, master db Structure filesports.stN/A System Areasports.d1System Tablespace system.dbfPrimary datafile.mdf D Filesarea.dDatafilestablespace.dbfSecondary datafile.ndf Before-Image File + After- Image File sports.b1 + sports.a1 Undo tablespace + Redo Log undotbs.dbf + redo01.log Log files.ldf Copy of After- Image File sports.date _time_etc Archive Logsports.date_time _etc Log Filesports.lgAlert Logalert_sports.logError Log (ERRORLOG) Parameter Filesports.pfpfile (or spfile)initsports.oraRegistry 40

41 PUG Challenge Americas

42 PUG Challenge Americas 2014 OEM parameters 42

43 PUG Challenge Americas

44 PUG Challenge Americas 2014 ProgressOracleMS SQL Server AreaTablespaceFilegroup System AreaSystem TablespacePrimary Filegroup ObjectSegmentN/A Cluster 8,64,512 Extent system managed Extent 8 pages Block 1,2,4 or 8K Block 2,4,8,16,32 or 64K Page 8K Logical Structure 44

45 Background Processes/Threads PUG Challenge Americas 2014 ProgressOracledescriptionSQL Server threads APWDBWnDatabase WriterLazywriter BIW, AIWLGWRLog Writer AIMGTARCnArchive ProcessN/A WDOGPMONProcess MonitorSQLOS SMONSystem MonitorDatabase Cleanup Database Shrinking CKPTCheckpoint processDatabase Checkpoint Many other …. 80 at least 45

46 PUG Challenge Americas Progress: ps –ef | grep db_name| grep _mprshut

47 Oracle: ps –ef | grep ora

48 PUG Challenge Americas Oracle: select * from v$bgprocess;

49 PUG Challenge Americas SQL Server: select * from sys.dm_os_workers;

50 Meta-schema and VST PUG Challenge Americas 2014 Progress TableOracle ViewSQL Server _AreaDBA_TABLESPACESsys.filegroups _AreaExtentDBA_DATA_FILESsys.master_files _StorageObjectDBA_OBJECTSsys.objects _FileDBA_TABLESsys.tables _FieldDBA_TAB_COLUMNSsys.columns _IndexDBA_INDEXESsys.indexes _Index-fieldDBA_IND_COLUMNSsys.index_columns _SequenceDBA_SEQUENCESsys.sequences Progress Meta-schema tables -80 < _file-number < 0 Progress VST _file-number <

51 VST/ Dynamic Performance/Management Views PUG Challenge Americas 2014 ProgressOracleSQL Server Virtual System TablesDynamic Performance Views Or V$ ( Vee dollar) Views Dynamic Management Views _Connectv$session, v$processsys.dm_exec_sessions, sys.dm_exec_connections _DbStatusv$instance, v$sysstatsys.dm_os_performance_counters _Transv$transactionsys.dm_tran_active_transactions _Lockv$locksys.dm_tran_locks _Latchv$latchsys.dm_os_latch_stats _AreaStatusv$tablespacesys.data_spaces _Filelistv$datafilesys.dm_db_file_space_usage _Startup (some)v$parametersys.dm_server_registry 51

52 PUG Challenge Americas 2014 ProgressOracleMS SQL Server 52 Supplied Test Databases Sports2000HRAdventureWorks2012

53 PUG Challenge Americas Partitioning Types ProgressOracleMS SQL Server List Range Hash Sub-partitioningComposite

54 PUG Challenge Americas Data Protection Backup Replication Clustering Flashback

55 Backup PUG Challenge Americas 2014 Progress and SQL Server – simpleOracle RMAN – More complicated probkup sports file_name BACKUP DATABASE AdventureWorks TO DISK file_name WITH FORMAT; All databases : Online and Offline (Hot and Cold) All databases: Complete and Incremental/Differential Oracle and SQL Servercould be Full and Partial (some tablespaces or filegroups) SQL Server BACKUP LOG AdventureWorks TO DISK Log backup 55

56 Compressed Backup PUG Challenge Americas GB Progress DB makes about 750 GB probkup 1.4 TB Oracle DB makes either 1.2 TB regular backup or 250 GB RMAN compressed backup (BZIP2 is default). Compressed backup could be done in SQL Server. 56

57 Replication PUG Challenge Americas OE ReplicationSynchronous Asynchronous SourceTarget Oracle 12c Far Sync DB

58 Server 1 Memory Apw, Biw, Aiw, Wdog Server 2Server 1 Memory DBWn, LGWR ARCn, SMON Server 2 Memory DBWn, LGWR ARCn, SMON Active - PassiveActive – Active DB 58PUG Challenge Americas 2014 ProgressOracle RAC

59 Server 1 Server 2 Memory Apw, Biw, Aiw, Wdog Server 1Server 2 Memory DBWn, LGWR ARCn, SMON 59PUG Challenge Americas 2014 Cluster db 2 ProgressOracle RAC

60 Flashback PUG Challenge Americas 065 Progress and Oracle 60 Flashback Database Flashback Table Flashback Drop Flashback Query Flashback Version Query Flashback Transaction Query

61 PUG Challenge Americas 2014 Oracle Flashback DB: SQL> flashback database to timestamp sysdate-1; SQL> flashback database to SCN ; Oracle Flashback Query: SQL> select * from table_name as of timestamp systimestamp - interval ‘30' minute; 61 SQL Server -- Create database snapshot CREATE DATABASE AdventureWorks_dbss1ON ( NAME = AdventureWorks_Data, FILENAME = 'C:\AdventureWorks_data_1.ss' ) AS SNAPSHOT OF AdventureWorks; GO Flashback Database

62 PUG Challenge Americas 2014 Connecting to a database 62 ProgressClient Server -db db_name -H host -S service Shared memory -db /full_path/db-name OracleListener MS SQL ServerLogin, Password Windows credentials

63 PUG Challenge Americas

64 PUG Challenge Americas

65 PUG Challenge Americas H host –S service1 -H host –S service2 S Host:port:SID SID Listener Port 1521 SID2 Connecting to a database Host:port:SID2 65

66 Shutdown Unconditional Shutdown Emergency Shutdown Shutdown Normal Shutdown Transactional Shutdown Immediate Shutdown Abort PUG Challenge Americas

67 Startup PUG Challenge Americas 2014 Closed Nomount mode Mount mode Open  Prorest  Restoreinit*.ora.ctl Shared Memory Background Proc 67

68 PUG Challenge Americas 2014 Questions Web pagewww.proora.com 68


Download ppt "RDBMS Progress, Oracle and SQL Server in relationship with Big Brother/Big Data."

Similar presentations


Ads by Google