All posts by mrculp

goldengate make user


CREATE USER

create tablespace gg_data datafile '/u01/app/oracle/oradata/srcxxt01/gg_data.dbf' size 1024M;

create user ogguser identified by ogg
default tablespace gg_data temporary tablespace temp
quota unlimited on gg_data;
grant select any table to ogguser ;
grant select any transaction to ogguser ;
grant select any dictionary to ogguser ;
grant flashback  any table to ogguser ;
grant execute on dbms_flashback to ogguser ;
grant create session, alter session to ogguser ;
grant connect,resource to ogguser ;
grant alter any table to ogguser ;
grant alter system to ogguser ;
grant execute on sys.dbms_internal_clkm to ogguser ;
exec dbms_goldengate_auth.grant_admin_privilege('ogguser');






create user testrep identified by testrep
default tablespace users temporary tablespace temp;

grant connect to testrep;
alter user testrep default role connect;
grant create session to testrep;
grant resource to testrep;
alter user testrep quota unlimited on users;



truncate table stress1;
truncate table stress2;
truncate table stress3;
truncate table stress4;
truncate table stress5;
truncate table stress6;
truncate table stress7;




make_testrep_objects.sql

DROP TABLE STRESS1 CASCADE CONSTRAINTS ;

CREATE TABLE STRESS1 (
  FIELD1   VARCHAR2 (10)  NOT NULL,
  FIELD2   VARCHAR2 (10)  NOT NULL,
  FIELD3   VARCHAR2 (10)  NOT NULL,
  NUM1     NUMBER        NOT NULL,
  NUM2     NUMBER,
  DATE1    DATE,
  FIELD4   VARCHAR2 (20),
  FIELD5   VARCHAR2 (20),
  FIELD6   VARCHAR2 (20),
  NUM3     NUMBER,
  NUM4     NUMBER,
  FIELD7   VARCHAR2 (20),
  FIELD14  VARCHAR2 (20),
  FIELD8   VARCHAR2 (20),
  FIELD9   VARCHAR2 (20),
  FIELD10  VARCHAR2 (20),
  FIELD11  VARCHAR2 (20),
  FIELD12  VARCHAR2 (20),
  FIELD13  VARCHAR2 (20),
  DATE2    DATE,
  DATE3    DATE,
  NUM5     NUMBER,
  NUM6     NUMBER,
  NUM7     NUMBER,
  NUM8     NUMBER,
  NUM9     NUMBER,
  NUM10    NUMBER,
  NUM11    NUMBER,
  FIELD15  VARCHAR2 (20),
  CONSTRAINT STRESS1_PK
  PRIMARY KEY ( NUM1, FIELD1, FIELD2, FIELD3 )
    USING INDEX
     TABLESPACE USERS PCTFREE 10
     STORAGE ( INITIAL 128K NEXT 128K PCTINCREASE 0 ))
 TABLESPACE USERS
   PCTFREE 10   PCTUSED 40
   INITRANS 1   MAXTRANS 255
 STORAGE (
   INITIAL 2M NEXT 2M PCTINCREASE 0
   MINEXTENTS 1 MAXEXTENTS 4096 )
   NOCACHE;


drop sequence stress1_seq;


create sequence stress1_seq start with 1
increment by 1;


DROP TABLE STRESS2 CASCADE CONSTRAINTS ;


CREATE TABLE STRESS2 (
  FIELD1   VARCHAR2 (10)  NOT NULL,
  FIELD2   VARCHAR2 (10)  NOT NULL,
  FIELD3   VARCHAR2 (10)  NOT NULL,
  NUM1     NUMBER        NOT NULL,
  NUM2     NUMBER,
  DATE1    DATE,
  FIELD4   VARCHAR2 (20),
  FIELD5   VARCHAR2 (20),
  FIELD6   VARCHAR2 (20),
  NUM3     NUMBER,
  NUM4     NUMBER,
  FIELD7   VARCHAR2 (20),
  FIELD14  VARCHAR2 (20),
  FIELD8   VARCHAR2 (20),
  FIELD9   VARCHAR2 (20),
  FIELD10  VARCHAR2 (20),
  FIELD11  VARCHAR2 (20),
  FIELD12  VARCHAR2 (20),
  FIELD13  VARCHAR2 (20),
  DATE2    DATE,
  DATE3    DATE,
  NUM5     NUMBER,
  NUM6     NUMBER,
  NUM7     NUMBER,
  NUM8     NUMBER,
  NUM9     NUMBER,
  NUM10    NUMBER,
  NUM11    NUMBER,
  FIELD15  VARCHAR2 (20),
  CONSTRAINT STRESS2_PK
  PRIMARY KEY ( NUM1, FIELD1, FIELD2, FIELD3 )
    USING INDEX
     TABLESPACE USERS PCTFREE 10
     STORAGE ( INITIAL 128K NEXT 128K PCTINCREASE 0 ))
 TABLESPACE USERS
   PCTFREE 10   PCTUSED 40
   INITRANS 1   MAXTRANS 255
 STORAGE (
   INITIAL 2M NEXT 2M PCTINCREASE 0
   MINEXTENTS 1 MAXEXTENTS 4096 )
   NOCACHE;

drop sequence stress2_seq;



create sequence stress2_seq start with 1
increment by 1;


DROP TABLE STRESS3 CASCADE CONSTRAINTS ;

CREATE TABLE STRESS3 (
  FIELD1   VARCHAR2 (10)  NOT NULL,
  FIELD2   VARCHAR2 (10)  NOT NULL,
  FIELD3   VARCHAR2 (10)  NOT NULL,
  NUM1     NUMBER        NOT NULL,
  NUM2     NUMBER,
  DATE1    DATE,
  FIELD4   VARCHAR2 (20),
  FIELD5   VARCHAR2 (20),
  FIELD6   VARCHAR2 (20),
  NUM3     NUMBER,
  NUM4     NUMBER,
  FIELD7   VARCHAR2 (20),
  FIELD14  VARCHAR2 (20),
  FIELD8   VARCHAR2 (20),
  FIELD9   VARCHAR2 (20),
  FIELD10  VARCHAR2 (20),
  FIELD11  VARCHAR2 (20),
  FIELD12  VARCHAR2 (20),
  FIELD13  VARCHAR2 (20),
  DATE2    DATE,
  DATE3    DATE,
  NUM5     NUMBER,
  NUM6     NUMBER,
  NUM7     NUMBER,
  NUM8     NUMBER,
  NUM9     NUMBER,
  NUM10    NUMBER,
  NUM11    NUMBER,
  FIELD15  VARCHAR2 (20),
  CONSTRAINT STRESS3_PK
  PRIMARY KEY ( NUM1, FIELD1, FIELD2, FIELD3 )
    USING INDEX
     TABLESPACE USERS PCTFREE 10
     STORAGE ( INITIAL 128K NEXT 128K PCTINCREASE 0 ))
 TABLESPACE USERS
   PCTFREE 10   PCTUSED 40
   INITRANS 1   MAXTRANS 255
 STORAGE (
   INITIAL 2M NEXT 2M PCTINCREASE 0
   MINEXTENTS 1 MAXEXTENTS 4096 )
   NOCACHE;

drop sequence stress3_seq;

create sequence stress3_seq start with 1
increment by 1;


DROP TABLE STRESS4 CASCADE CONSTRAINTS ;

CREATE TABLE STRESS4 (
  FIELD1   VARCHAR2 (10)  NOT NULL,
  FIELD2   VARCHAR2 (10)  NOT NULL,
  FIELD3   VARCHAR2 (10)  NOT NULL,
  NUM1     NUMBER        NOT NULL,
  NUM2     NUMBER,
  DATE1    DATE,
  FIELD4   VARCHAR2 (20),
  FIELD5   VARCHAR2 (20),
  FIELD6   VARCHAR2 (20),
  NUM3     NUMBER,
  NUM4     NUMBER,
  FIELD7   VARCHAR2 (20),
  FIELD14  VARCHAR2 (20),
  FIELD8   VARCHAR2 (20),
  FIELD9   VARCHAR2 (20),
  FIELD10  VARCHAR2 (20),
  FIELD11  VARCHAR2 (20),
  FIELD12  VARCHAR2 (20),
  FIELD13  VARCHAR2 (20),
  DATE2    DATE,
  DATE3    DATE,
  NUM5     NUMBER,
  NUM6     NUMBER,
  NUM7     NUMBER,
  NUM8     NUMBER,
  NUM9     NUMBER,
  NUM10    NUMBER,
  NUM11    NUMBER,
  FIELD15  VARCHAR2 (20),
  CONSTRAINT STRESS4_PK
  PRIMARY KEY ( NUM1, FIELD1, FIELD2, FIELD3 )
    USING INDEX
     TABLESPACE USERS PCTFREE 10
     STORAGE ( INITIAL 128K NEXT 128K PCTINCREASE 0 ))
 TABLESPACE USERS
   PCTFREE 10   PCTUSED 40
   INITRANS 1   MAXTRANS 255
 STORAGE (
   INITIAL 2M NEXT 2M PCTINCREASE 0
   MINEXTENTS 1 MAXEXTENTS 4096 )
   NOCACHE;


drop sequence stress4_seq;

create sequence stress4_seq start with 1
increment by 1;



DROP TABLE STRESS5 CASCADE CONSTRAINTS ;

CREATE TABLE STRESS5 (
  FIELD1   VARCHAR2 (10)  NOT NULL,
  FIELD2   VARCHAR2 (10)  NOT NULL,
  FIELD3   VARCHAR2 (10)  NOT NULL,
  NUM1     NUMBER        NOT NULL,
  NUM2     NUMBER,
  DATE1    DATE,
  FIELD4   VARCHAR2 (20),
  FIELD5   VARCHAR2 (20),
  FIELD6   VARCHAR2 (20),
  NUM3     NUMBER,
  NUM4     NUMBER,
  FIELD7   VARCHAR2 (20),
  FIELD14  VARCHAR2 (20),
  FIELD8   VARCHAR2 (20),
  FIELD9   VARCHAR2 (20),
  FIELD10  VARCHAR2 (20),
  FIELD11  VARCHAR2 (20),
  FIELD12  VARCHAR2 (20),
  FIELD13  VARCHAR2 (20),
  DATE2    DATE,
  DATE3    DATE,
  NUM5     NUMBER,
  NUM6     NUMBER,
  NUM7     NUMBER,
  NUM8     NUMBER,
  NUM9     NUMBER,
  NUM10    NUMBER,
  NUM11    NUMBER,
  FIELD15  VARCHAR2 (20),
  CONSTRAINT STRESS5_PK
  PRIMARY KEY ( NUM1, FIELD1, FIELD2, FIELD3 )
    USING INDEX
     TABLESPACE USERS PCTFREE 10
     STORAGE ( INITIAL 128K NEXT 128K PCTINCREASE 0 ))
 TABLESPACE USERS
   PCTFREE 10   PCTUSED 40
   INITRANS 1   MAXTRANS 255
 STORAGE (
   INITIAL 2M NEXT 2M PCTINCREASE 0
   MINEXTENTS 1 MAXEXTENTS 4096 )
   NOCACHE;

drop sequence stress5_seq;


create sequence stress5_seq start with 1
increment by 1;


DROP TABLE STRESS6 CASCADE CONSTRAINTS ;
                                                                               265,1         42%
begin
  for loop_var in 1..overall loop
     for loop_ins in 1..ins loop
       insert into stress7 values(
       'thisisa','temporary','tablevalue',stress7_seq.nextval,12345,sysdate,
       'newwewil','determine','helloworld',12345,987654,
       '10charvld','11charfld','another1','biggest','smallest',
       'ashortone','dkdksjj',NULL,sysdate-1,sysdate-2,
       12345,23456,34567,45678,56789,98766,56783,
       'thelastone');
   end loop;
   commit;
   end loop;
end;
/

create or replace procedure rock_and_roll
(ins in number default 10, overall in number default 10)
as
 loop_var number(38);
 loop_ins number(38);
 tmpvar varchar2(50);
begin
  for loop_var in 1..overall loop
     for loop_ins in 1..ins loop
       insert into stress1 values(
       'thisisa','temporary','tablevalue',stress1_seq.nextval,12345,sysdate,
       'newwewil','determine','helloworld',12345,987654,
       '10charvld','11charfld','another1','biggest','smallest',
       'ashortone','dkdksjj',NULL,sysdate-1,sysdate-2,
       12345,23456,34567,45678,56789,98766,56783,
       'thelastone');
       insert into stress2 values(
       'thisisa','temporary','tablevalue',stress2_seq.nextval,12345,sysdate,
       'newwewil','determine','helloworld',12345,987654,
       '10charvld','11charfld','another1','biggest','smallest',
       'ashortone','dkdksjj',NULL,sysdate-1,sysdate-2,
       12345,23456,34567,45678,56789,98766,56783,
       'thelastone');
       insert into stress3 values(
       'thisisa','temporary','tablevalue',stress3_seq.nextval,12345,sysdate,
       'newwewil','determine','helloworld',12345,987654,
       '10charvld','11charfld','another1','biggest','smallest',
       'ashortone','dkdksjj',NULL,sysdate-1,sysdate-2,
       12345,23456,34567,45678,56789,98766,56783,
       'thelastone');
       insert into stress4 values(
       'thisisa','temporary','tablevalue',stress4_seq.nextval,12345,sysdate,
       'newwewil','determine','helloworld',12345,987654,
       '10charvld','11charfld','another1','biggest','smallest',
       'ashortone','dkdksjj',NULL,sysdate-1,sysdate-2,
       12345,23456,34567,45678,56789,98766,56783,
       'thelastone');
       insert into stress5 values(
       'thisisa','temporary','tablevalue',stress5_seq.nextval,12345,sysdate,
       'newwewil','determine','helloworld',12345,987654,
       '10charvld','11charfld','another1','biggest','smallest',
       'ashortone','dkdksjj',NULL,sysdate-1,sysdate-2,
       12345,23456,34567,45678,56789,98766,56783,
       'thelastone');
       insert into stress6 values(
       'thisisa','temporary','tablevalue',stress6_seq.nextval,12345,sysdate,
       'newwewil','determine','helloworld',12345,987654,
       '10charvld','11charfld','another1','biggest','smallest',
       'ashortone','dkdksjj',NULL,sysdate-1,sysdate-2,
       12345,23456,34567,45678,56789,98766,56783,
       'thelastone');
       insert into stress7 values(
       'thisisa','temporary','tablevalue',stress7_seq.nextval,12345,sysdate,
       'newwewil','determine','helloworld',12345,987654,
       '10charvld','11charfld','another1','biggest','smallest',
       'ashortone','dkdksjj',NULL,sysdate-1,sysdate-2,
       12345,23456,34567,45678,56789,98766,56783,
       'thelastone');
   end loop;
   commit;
   end loop;
end;
/


gmail encryption and limitations

Default Gmail encryption protects emails as much as possible. Google encrypts emails both when they’re stored (data at rest) and when they’re being sent (data in motion). Like most security-conscious providers, Google uses Transport Layer Security (TLS) to encrypt emails in transit. But TLS depends on both the sender’s and recipient’s email provider, so it won’t work in some situations.

 

Ampercent Encryption for Gmail

ORA 257 error


SELECT * FROM V$RECOVERY_FILE_DEST;

NAME            SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
--------------  ----------- ---------- ----------------- ---------------
/mydisk/rcva     5368709120 109240320             256000              28

SQL> show parameter db_recovery


NAME                                 TYPE        VALUE
-------------------------------- ----------- ------------------------------
db_recovery_file_dest                string      /opt/oracle/test01/flash_recovery_area
db_recovery_file_dest_size           big integer 10G

Command for changing db_recovery_file_dest

SQL> alter system set db_recovery_file_dest='/opt/oracle/test01/dbs/arch' scope=both;
System altered.

ifconfig not found

For configuring linux I found that ifconfig did not work, found that on my centos environment (minimal setup) it was easy to simply

yum install net-tools

as long as the yum repos are setup properly you should be able to download this and install

Making a Digitized Signature

Digitized Signature

CREATING A SIGNATURE PNG FILE

  1. Sign your name on a blank sheet of printer paper. Paper quality and type of pen doesn’t really matter, just make sure your signature is straight and not on an angle.
  2. Scan the paper to PDF. With Acrobat Pro DC select File > Create > From Scanner > Color Document.
  3. Press the “Print Screen” button on your keyboard.
  4. Open Microsoft Paint.
  5. Press Ctrl + v on your keyboard to paste the screen shot from step 3.
  6. Click the select tool in Paint.
  7. Drag a rectangle around the signature staying as close as possible to the outer edges of the signature.
  8. Select “Crop”, and the image should be resized to the size of the rectangle in the previous step.
  9. Select “Save As > Png Picture”, name the file “My Signature”, and save it to your desktop.

MAKING THE BACKGROUND TRANSPARENT

  1. Find a free online image converter by Googling “Convert Image To Transparent Background Online” and use the image converter to make the background transparent. When I Googled that, number one was Lunapic (http://www125.lunapic.com/editor/?action=transparent).  The next steps use this particular tool to convert the image to one with a transparent background.
  2. Click “Choose File” and upload the .png file from step 9.
  3. From the Lunapic toolbar, select Edit > Make Transparent.
  4. Click a white part of the image.
  5. Click “Save” and save the new transparent signature to your desktop.

     

    CREATING THE STAMP

    1. Select the stamp menu on the Acrobat Pro comments toolbar menu and select Stamps > Custom Stamps > Create.
    2. Click the “Browse” button in the dialog window, change the file type dropdown to “.png”, browse for and select the transparent signature file from step 14.
    3. Click “Open”.
    4. Click “OK”.
    5. Name the stamp category (something like “My Signatures” or you can select the pre-existing “Sign Here” from the dropdown menu).
    6. Name the stamp.
    7. Click “OK”. You will most likely have to create this stamp twice due to sizing issues.
    8. Open a blank PDF. You can create one by opening the javascript console (ctrl + j) and running the following script:  app.newDoc();  You run the script by placing the cursor anywhere on the line containing the script and pressing ctrl + Enter on your keyboard.
    9. Go back to the stamp menu and select the stamp you just created and stamp the document. You’ll notice that the signature is probably much too large.  Resize it by dragging one of the corners inward.
    10. When you have the signature stamp to the correct size, save the PDF to your desktop.
    11. Repeat steps 15 through 21 EXCEPT, use the PDF file created in the previous step as the file from which you will create the stamp. This will create the stamp the correct size so you don’t have to resize it every time you apply it.

Lunapic Editor

dbca troubleshooting fun

Looking at Oracle 18c
After getting the database code trees installed I went on to the dbca creation

I saw there was a log directory for dbca creations

/u01/app/oracle/cfgtoollogs/dbca

The logs are listed in groups of (2)
starting with trace and silent

many failed attempts, but this is a good place to start to get the problems solved.
Currently we have a situation that the create failed due to ASM checks

Not sure why this is occurring as the ASM disks are up and available