Friday, July 10, 2020

Getting error while starting VirtualBox- Driver is probably stuck stopping/starting. Try 'sc.exe query vboxdrv'



Driver is probably stuck stopping/starting. Try 'sc.exe query vboxdrv' to get more information about its state. Rebooting may actually help.


go to below location


C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv

VBoxDrv.inf








click on install and start the machine .

This work in my case





Monday, June 22, 2020

Goldengate 19c micro-service Installation on linux


Goldengate Installation on Linux



Goldengate Software version: 19c
Database version: 12c

Download Goldengate software  
check certification matrix before install

unzip Goldengate software 

We have to create a folder as below for installation

create directory
--------------------
mkdir ogg
mkdir ogg123_ma    ///OGG Home
mkdir ogg123_sm   /////Service Manager Home
mkdir ogg123_deploy  ////Deploymwent home


prepare a database for golden gate 

Enable supplemental logging
-------------------------------

SQL> alter database add supplemental log data;

Database altered.

Enable Force Logging
----------------------

SQL> alter database force logging;

Database altered.

Enable Goldengate replication
-------------------------------

SQL> show parameter enable_gol

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication        boolean     FALSE
SQL>
SQL> alter system set enable_goldengate_replication=TRUE scope=both;

System altered.

Enable Archivelog
-----------------------

SQL> startup mount
ORACLE instance started.

Total System Global Area 1442840576 bytes
Fixed Size                  8620752 bytes
Variable Size             486540592 bytes
Database Buffers          939524096 bytes
Redo Buffers                8155136 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL>  select SUPPLEMENTAL_LOG_DATA_MIN,FORCE_LOGGING,log_mode ,cdb from v$database;

SUPPLEME FORCE_LOGGING                           LOG_MODE     CDB
-------- --------------------------------------- ------------ ---
YES      YES                                     ARCHIVELOG   NO

SQL>


Create Goldengate user and assign privilege
------------------------------------------------

create user ggadmin identified by ggadmin ;

exec dbms_goldengate_auth.grant_admin_privilege('ggadmin');
exec dbms_streams_auth.grant_admin_privilege('ggadmin');
grant insert on system.logmnr_restart_ckpt$ to ggadmin;
grant update on streams$_capture_process to ggadmin;
grant become user to ggadmin;
grant create session,connect,resource,alter system  to ggadmin;
grant select any table to ggadmin;
grant connect, resource to ggadmin;
grant select any dictionary, select any table to ggadmin;
grant create table to ggadmin;
grant flashback any table to ggadmin;
grant execute on dbms_flashback to ggadmin;
grant execute on utl_file to ggadmin;
grant create any table to ggadmin;
grant insert any table to ggadmin;
grant update any table to ggadmin;
grant delete any table to ggadmin;
grant drop any table to ggadmin;
grant alter any table to ggadmin;
grant alter system to ggadmin;
grant lock any table to ggadmin;
grant select any transaction to ggadmin;
alter user ggadmin quota unlimited on users;
alter user ggadmin quota unlimited on users;
exec dbms_goldengate_auth.grant_admin_privilege('ggadmin','*', grant_optional_privileges=>'*');
grant select on "_dba_apply_progress" to ggadmin;
grant select any dictionary to ggadmin;



Do entry in /etc/hosts file

192.168.43.53         ggnode1.localdomain ggnode1
192.168.43.239 ggnode2.localdomain ggnode2











Wednesday, June 17, 2020

How to extend Linux file system after increasing my EBS volume on my EC2 instance



How to extend Linux file system after increasing my EBS volume on my EC2 instance


[root@anurag ~]#
[root@anurag ~]#
[root@anurag ~]# lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0  10G  0 disk
├─xvda1 202:1    0   1M  0 part
└─xvda2 202:2    0  10G  0 part /
xvdb    202:16   0  20G  0 disk /u01/oracle
xvdc    202:32   0  20G  0 disk /u01/oradata
xvdd    202:48   0   8G  0 disk /u01/FRA
[root@anurag ~]#
[root@anurag ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G   17M  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/xvda2       10G  4.3G  5.7G  44% /
/dev/xvdc       7.9G  5.8G  1.7G  78% /u01/oradata
/dev/xvdd       7.9G  1.5G  6.0G  20% /u01/FRA
/dev/xvdb       7.9G  7.4G     0 100% /u01/oracle
tmpfs           378M     0  378M   0% /run/user/1002
tmpfs           378M     0  378M   0% /run/user/1000
[root@anurag ~]#
[root@anurag ~]#
[root@anurag ~]# resize2fs /dev/xvdb
resize2fs 1.45.4 (23-Sep-2019)
Filesystem at /dev/xvdb is mounted on /u01/oracle; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 3
The filesystem on /dev/xvdb is now 5242880 (4k) blocks long.

[root@anurag ~]#
[root@anurag ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G   17M  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/xvda2       10G  4.3G  5.7G  44% /
/dev/xvdc       7.9G  5.8G  1.7G  78% /u01/oradata
/dev/xvdd       7.9G  1.5G  6.0G  20% /u01/FRA
/dev/xvdb        20G  7.5G   12G  40% /u01/oracle
tmpfs           378M     0  378M   0% /run/user/1002
tmpfs           378M     0  378M   0% /run/user/1000
[root@anurag ~]#
[root@anurag ~]# resize2fs /dev/xvdc
resize2fs 1.45.4 (23-Sep-2019)
Filesystem at /dev/xvdc is mounted on /u01/oradata; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 3
The filesystem on /dev/xvdc is now 5242880 (4k) blocks long.

[root@anurag ~]#
[root@anurag ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G   17M  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/xvda2       10G  4.3G  5.7G  44% /
/dev/xvdc        20G  5.8G   14G  31% /u01/oradata
/dev/xvdd       7.9G  1.5G  6.0G  20% /u01/FRA
/dev/xvdb        20G  7.5G   12G  40% /u01/oracle
tmpfs           378M     0  378M   0% /run/user/1002
tmpfs           378M     0  378M   0% /run/user/1000
[root@anurag ~]#
[root@anurag ~]#

Wednesday, June 10, 2020

How to check DML operations oracle


check dml operations oracle



SQL> exec dbms_stats.gather_table_stats(ownname=>'TEST',tabname=>'TEST_1')

PL/SQL procedure successfully completed.

SQL> exec DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO;

SQL>
SQL>
SQL> select table_name,inserts,updates,deletes,truncated,timestamp from sys.dba_tab_modifications where table_owner='TEST' and table_name= 'TEST_1'
  2  ;

no rows selected

SQL>
SQL> insert  into test.test_1 select * from dba_objects;

73824 rows created.

SQL> /

73824 rows created.

SQL> commit;

Commit complete.

SQL> select table_name,inserts,updates,deletes,truncated,timestamp from sys.dba_tab_modifications where table_owner='TEST' and table_name= 'TEST_1';

TABLE_NAME                        INSERTS    UPDATES    DELETES TRU TIMESTAMP
------------------------------ ---------- ---------- ---------- --- ---------
TEST_1                             147648          0          0 NO

SQL>