Tuesday, December 1, 2020

server’s logs | unmounted during shutdown & remounted during boot

 Filesystems are unmounted during shutdown and remounted during boot. 

 fuser -cux /abc

URL 

ibm information 

Monday, November 16, 2020

shutdown -Fr Reboot

 r

use the command "w" to see who's logged in before rebooting

101 command PDF

linux 37 essential command 

 vtmenu HMC information 

Reboot 

Procedure for rebooting the server:

  • Login as the “root” user. You must have password for the root user.
  • At the “#” prompt, type in the following command:
    shutdown -Fr

Procedure for shutting down the server:

  • Login as the “root” user. You must have password for the root user.
  • At the “#” prompt, type in the following command:
    shutdown -F

lsvg -l rootvg

  1. Disks, Volumes and File Systems
  2. Command

    Description

    lsvg

    Displays information about volume groups.

    lsvg rootvg

    Display information about rootvg.

    lsvg -p rootvg

    Display physical volumes.

    lsvg -l rootvg

    Display logical volumes.

    Mkvg

    Create a new volume group, using the physical volumes

    extendvg

    Adds physical volumes to a volume group.

    Reducevg

    Remove physical volumes from a volume group. When all physical volumes removed from the volume group, the group is deleted.

    Command

    Description

    Lspv

    Displays information about a physical volume within a vg.

    lspv hdisk0

    Display information about physical volume hdisk0.

    varyonvg datavg

    Activates volume group.

    varyonvg datavg

    Deactivates volume goup.

    exportvg datavg

    Removes the definition of the volume group datavg from the system.

    importvg

    Imports a volume group definition from a set of physical volumes.

Unix Group Name 

WWPN

patching 

Friday, November 13, 2020

user management passwd steps

1 ) use smitty to change password,
 2) use smitty to reset failed login count 
3) then use smitty to unlock account

chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s tuser1

chuser "account_locked=false" tuser1


 chuser account_locked=false

passwd user !Connie1@Dch1596!Qza5sbx

 !Active1  !Active4

ssh tusernum@dch1596za5sbx

lsuser -a unsuccessful_login_count <userid>

chsec -f /etc/security/lastlog -a unsuccessful_login_count=0 -s <userid>

Tuesday, November 10, 2020

AIX - bash_64

lsgroup testgrp1

 ls -l /bin | grep bash

Video  

Tuesday, November 3, 2020

add 10G on multiple servers , 1 x 50GB SAN disk

1 - login and run chfs -a size=+10G

2 -  df -g 

 How To Expand A Filesystem in AIX (df, lsvg, chfs)

chfs -a size=+10G 

VG LV Scalable VG (mkvg -S) 

AN120 AIX II

minimum, desired, maximum

add 1 x 50GB SAN disk sever0 and sever1

Add disks to the following hosts & add them to the respective VGs:

sever0 (8GB to vgxxx03)

sever1 (17Gb to vgxxx03)

 lparstat -i |grep -i mem

Online Memory                              : 4096 MB

Maximum Memory                             : 8192 MB

Minimum Memory                             : 2048 MB

Memory Mode                                : Dedicated

Total I/O Memory Entitlement               : -

Variable Memory Capacity Weight            : -

Memory Pool ID                             : -

Physical Memory in the Pool                : -

Unallocated Variable Memory Capacity Weight: -

Unallocated I/O Memory entitlement         : -

Memory Group ID of LPAR                    : -

Desired Memory                             : 4096 MB

Target Memory Expansion Factor             : -

Target Memory Expansion Size               : -

Storage Area Network 

Virtual I/O (VIO)

Central Electronics Complex (CEC)

volume groups (VG)

(Advanced Interactive eXecutive)  a series of proprietary Unix operating systems.

Monday, January 13, 2014

No valid Oracle Clients found :...at least one 32-bit client ...

We got the challenges: "No valid Oracle clients found. You need at least one 32-bit client properly configured." After research, https://support.software.dell.com/kb/SOL71545 ********************************************** ORACLE CLIENT SOFTWARE INSTALLATION NOTES: - Download ‘directly’ to your “DESKTOP” location (and run it from there too). This can avoid many potential download and installation problems. - Ensure that your Windows User has Administrator Rights before installing an Oracle Client (or Toad). - Toad for Oracle 11.5.1 and lower supports 32-bit Oracle Clients only. - The above 32-bit client will work on a 64-bit Windows OS’s. - During the Oracle Client installation, choose “Full” or “Administrator” installation type (this is not automatically selected). - Ensure you apply or copy over your TNSNAMES.ORA file (this file usually comes from your company). The default location for this file in 10g and 11g is: 10g - C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\ 11g - C:\app\\product\11.2.0\client_1\NETWORK\ADMIN\ NOTE: After installing the new client, ensure you select it in Toad’s / SQL Navigator’s login screen | under “Connect Using:” / “Oracle Home/Client:” (ensure you are NOT connected to any database for this setting to be available). ================================================================== It does work.

Thursday, October 21, 2010

data redundancy

some data are stored twice, or that some data can be derived from other data.

We have same issue for data redundancy.

SELECT P.P_USER_ID, COUNT(*)
FROM PURPOSE P
GROUP BY P.P_USER_ID
HAVING COUNT(*) > 1;

Example linkK

http://www.devx.com/gethelpon/10minutesolution/16597/1954

Thursday, October 7, 2010

Wednesday, February 24, 2010

Data integrity, constraints

Data integrity, constraints
p60,61,67
FGAC : role based on User, Tables
Column-level Primary Key Constraints
CREATE TABLE table
(
Columname1 datatype(sizevalue) [CONSTRAINT constrainname] PRIMARY KEY,
Columname2datatype(sizevalue),
Columname3datatype(sizevalue)
)

Table-level Primary Key Constraints
CREATE TABLE table
(
Columname1 datatype(sizevalue),
Columname2datatype(sizevalue),
Columname3datatype(sizevalue)
[CONSTRAINT constrainname] PRIMARY KEY (Columname1)

)

Info

After 2:30 PM

Normalization
Different topic different table: No information overloading
Index: easy to find
Store procedure: package
Alias, synonyms: easy to call
View : several commands
Domain

create Table suppliers
(supno char(5) not null,
supname varchar (10),
supaddres varchar(40)
)

Update, Delete,

Update, Delete,

UPDATE customers
SET repid = 'E01'
WHERE repid is null

SELECT * FROM customers WHERE referredby is null

DELETE FROM customers WHERE referredby is null

Manipulating Table Data

Manipulating Table Data
P35 & P38: INSERT INTO

SELECT * FROM titles WHERE partnum = 39906

INSERT INTO titles (partnum, bktitle, devcost, slprice, pubdate)
VALUES('39906', 'VC++ HELLO WORLD', NULL, 50, '1999-06-01')

One table to another Table
INSERT INTO customers (custnum, custname, address, city,state,zipcode)
select custnum, custname, address, city,state,zipcode from potential_customers
where state ='ca'

1 PM

After 2 Query: Sub Query and Correlated Query
P 26: Filtering Grouped Data within a Subquery
Database Transformation service (DTS)
Suquery run before outer query : P28

vision of Scenario

^^^^^^^^^^^^^Scenario^^^^^^^^^^^^^^^^
The sales manager at a bookstore has been instructed by the top management to encourage high quantity purchasers to achieve the sales targets for the year. From the data on the sales made in the past, the manager has identified that the maximum quantity purchased by a customers who have bought 500 books in a single purchase. The manager also wants you to add the names of the books sold. The data required to generate the output is available in the customers, sales, and titles tables. Refer to the table structures in Appendix A for a description of the table columns.
^^^^^^^^^^^^^Topic D: ^^^^^^^^^^^^^^^^

SELECT partnum, bktitle, custname, address FROM titles, customers
WHERE 500 IN
(SELECT qty FROM sales
WHERE sales.partnum = titles.partnum
AND sales.custnum = customers.custnum)

Topic D: EXISTS

^^^^^^^^^^^^^Topic D: EXISTS^^^^^^^^^^^^^^^^
SELECT partnum, bktitle FROM titles
WHERE EXISTS
(SELECT * FROM sales
WHERE qty>200 AND sales.partnum = titles.partnum)
?????????????????????My curious?????????????????????
SELECT partnum, bktitle FROM titles
WHERE EXISTS
(SELECT * FROM sales
WHERE qty>200 AND sales.partnum = titles.partnum)

SELECT distinct bktitle, sales.qty FROM titles, sales
WHERE EXISTS
(SELECT * FROM sales
WHERE qty>200 AND sales.partnum = titles.partnum)
and sales.partnum = titles.partnum

After 11 AM

Distinct: 4
************************************************
select distinct (sales.repid), fname, lname FROM slspers, sales
WHERE qty > ANY
(SELECT SUM (qty) FROM sales GROUP BY repid)
AND sales.repid = slspers.repid

Without Distinct: 7
************************************************
select (sales.repid), fname, lname, qty FROM slspers, sales
WHERE qty > ANY
(SELECT SUM (qty) FROM sales GROUP BY repid)
AND sales.repid = slspers.repid

>>>>>>>>>> Lisa Ryan<<<<<<<<<

Lisa Prefer to understand
select distinct sales.repid, fname, lname FROM slspers, sales
WHERE sales.repid = slspers.repid AND
qty > ANY
(SELECT SUM (qty) FROM sales GROUP BY repid)

Sold Books

Have been sold: 55
select partnum, bktitle from titles
where partnum in ( select partnum from sales)
Haven’t been sold: 37
select partnum, bktitle from titles
where partnum not in ( select partnum from sales)