Thursday, December 3, 2020
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
Monday, November 16, 2020
shutdown -Fr Reboot
r
use the command "w" to see who's logged in before rebooting
vtmenu HMC information
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
- Disks, Volumes and File Systems
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. |
Friday, November 13, 2020
user management passwd steps
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>
chuser account_locked=true <userid>
infoDoc
Thursday, November 12, 2020
Tuesday, November 10, 2020
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)
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 : -
Central Electronics Complex (CEC)
(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 ...
Thursday, October 21, 2010
data redundancy
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
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)
)
After 2:30 PM
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 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
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
P 26: Filtering Grouped Data within a Subquery
Database Transformation service (DTS)
Suquery run before outer query : P28
vision of 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
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
************************************************
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
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)

