Search This Blog

Total Pageviews

Wednesday, 25 February 2026

postgres : create table periodic_table




test=> \c test postgres
Password for user postgres:
You are now connected to database "test" as user "postgres".

test=# SELECT current_user;
 current_user
--------------
 postgres
(1 row)

test=# GRANT CREATE ON SCHEMA public TO vihaan;
GRANT
test=# \c test vihaan
Password for user vihaan:
You are now connected to database "test" as user "vihaan".


test=> CREATE TABLE periodic_table (
test(>     "AtomicNumber" integer NOT NULL,
test(>     "Element" text,
test(>     "Symbol" text,
test(>     "AtomicMass" numeric,
test(>     "NumberOfNeutrons" integer,
test(>     "NumberOfProtons" integer,
test(>     "NumberOfElectrons" integer,
test(>     "Period" integer,
test(>     "Group" integer,
test(>     "Phase" text,
test(>     "Radioactive" boolean,
test(>     "Natural" boolean,
test(>     "Metal" boolean,
test(>     "Nonmetal" boolean,
test(>     "Metalloid" boolean,
test(>     "Type" text,
test(>     "AtomicRadius" numeric,
test(>     "Electronegativity" numeric,
test(>     "FirstIonization" numeric,
test(>     "Density" numeric,
test(>     "MeltingPoint" numeric,
test(>     "BoilingPoint" numeric,
test(>     "NumberOfIsotopes" integer,
test(>     "Discoverer" text,
test(>     "Year" integer,
test(>     "SpecificHeat" numeric,
test(>     "NumberOfShells" integer,
test(>     "NumberOfValence" integer
test(> );


CREATE TABLE
test=> \dn+ public
                                       List of schemas
  Name  |       Owner       |           Access privileges            |      Description
--------+-------------------+----------------------------------------+------------------------
 public | pg_database_owner | pg_database_owner=UC/pg_database_owner+| standard public schema
        |                   | =U/pg_database_owner                  +|
        |                   | vihaan=C/pg_database_owner             |
(1 row)






CREATE TABLE periodic_table (
    "AtomicNumber" integer NOT NULL,
    "Element" text,
    "Symbol" text,
    "AtomicMass" numeric,
    "NumberOfNeutrons" integer,
    "NumberOfProtons" integer,
    "NumberOfElectrons" integer,
    "Period" integer,
    "Group" integer,
    "Phase" text,
    "Radioactive" boolean,
    "Natural" boolean,
    "Metal" boolean,
    "Nonmetal" boolean,
    "Metalloid" boolean,
    "Type" text,
    "AtomicRadius" numeric,
    "Electronegativity" numeric,
    "FirstIonization" numeric,
    "Density" numeric,
    "MeltingPoint" numeric,
    "BoilingPoint" numeric,
    "NumberOfIsotopes" integer,
    "Discoverer" text,
    "Year" integer,
    "SpecificHeat" numeric,
    "NumberOfShells" integer,
    "NumberOfValence" integer
);



COPY periodic_table ("AtomicNumber", "Element", "Symbol", "AtomicMass", "NumberOfNeutrons", "NumberOfProtons", "NumberOfElectrons", "Period", "Group", "Phase", "Radioactive", "Natural", "Metal", "Nonmetal", "Metalloid", "Type", "AtomicRadius", "Electronegativity", "FirstIonization", "Density", "MeltingPoint", "BoilingPoint", "NumberOfIsotopes", "Discoverer", "Year", "SpecificHeat", "NumberOfShells", "NumberOfValence") FROM stdin;
1	Hydrogen	H	1.007	0	1	1	1	1	gas	\N	t	\N	t	\N	Nonmetal	0.79	2.2	13.5984	0.0000899	14.175	20.28	3	Cavendish	1766	14.304	1	1
2	Helium	He	4.002	2	2	2	1	18	gas	\N	t	\N	t	\N	Noble Gas	0.49	\N	24.5874	0.000179	\N	4.22	5	Janssen	1868	5.193	1	\N
3	Lithium	Li	6.941	4	3	3	2	1	solid	\N	t	t	\N	\N	Alkali Metal	2.1	0.98	5.3917	0.534	453.85	1615	5	Arfvedson	1817	3.582	2	1
4	Beryllium	Be	9.012	5	4	4	2	2	solid	\N	t	t	\N	\N	Alkaline Earth Metal	1.4	1.57	9.3227	1.85	1560.15	2742	6	Vaulquelin	1798	1.825	2	2
5	Boron	B	10.811	6	5	5	2	13	solid	\N	t	\N	\N	t	Metalloid	1.2	2.04	8.298	2.34	2573.15	4200	6	Gay-Lussac	1808	1.026	2	3
6	Carbon	C	12.011	6	6	6	2	14	solid	\N	t	\N	t	\N	Nonmetal	0.91	2.55	11.2603	2.27	3948.15	4300	7	Prehistoric	\N	0.709	2	4
7	Nitrogen	N	14.007	7	7	7	2	15	gas	\N	t	\N	t	\N	Nonmetal	0.75	3.04	14.5341	0.00125	63.29	77.36	8	Rutherford	1772	1.04	2	5
8	Oxygen	O	15.999	8	8	8	2	16	gas	\N	t	\N	t	\N	Nonmetal	0.65	3.44	13.6181	0.00143	50.5	90.2	8	Priestley/Scheele	1774	0.918	2	6
9	Fluorine	F	18.998	10	9	9	2	17	gas	\N	t	\N	t	\N	Halogen	0.57	3.98	17.4228	0.00170	53.63	85.03	6	Moissan	1886	0.824	2	7
10	Neon	Ne	20.18	10	10	10	2	18	gas	\N	t	\N	t	\N	Noble Gas	0.51	\N	21.5645	0.000900	24.703	27.07	8	Ramsay and Travers	1898	1.03	2	8
11	Sodium	Na	22.99	12	11	11	3	1	solid	\N	t	t	\N	\N	Alkali Metal	2.2	0.93	5.1391	0.971	371.15	1156	7	Davy	1807	1.228	3	1
12	Magnesium	Mg	24.305	12	12	12	3	2	solid	\N	t	t	\N	\N	Alkaline Earth Metal	1.7	1.31	7.6462	1.74	923.15	1363	8	Black	1755	1.023	3	2
13	Aluminum	Al	26.982	14	13	13	3	13	solid	\N	t	t	\N	\N	Metal	1.8	1.61	5.9858	2.70	933.4	2792	8	Wshler	1827	0.897	3	3
14	Silicon	Si	28.086	14	14	14	3	14	solid	\N	t	\N	\N	t	Metalloid	1.5	1.9	8.1517	2.33	1683.15	3538	8	Berzelius	1824	0.705	3	4
15	Phosphorus	P	30.974	16	15	15	3	15	solid	\N	t	\N	t	\N	Nonmetal	1.2	2.19	10.4867	1.82	317.25	553	7	BranBrand	1669	0.769	3	5
16	Sulfur	S	32.065	16	16	16	3	16	solid	\N	t	\N	t	\N	Nonmetal	1.1	2.58	10.36	2.07	388.51	717.8	10	Prehistoric	\N	0.71	3	6
17	Chlorine	Cl	35.453	18	17	17	3	17	gas	\N	t	\N	t	\N	Halogen	0.97	3.16	12.9676	0.00321	172.31	239.11	11	Scheele	1774	0.479	3	7
18	Argon	Ar	39.948	22	18	18	3	18	gas	\N	t	\N	t	\N	Noble Gas	0.88	\N	15.7596	0.00178	83.96	87.3	8	Rayleigh and Ramsay	1894	0.52	3	8
19	Potassium	K	39.098	20	19	19	4	1	solid	\N	t	t	\N	\N	Alkali Metal	2.8	0.82	4.3407	0.862	336.5	1032	10	Davy	1807	0.757	4	1
20	Calcium	Ca	40.078	20	20	20	4	2	solid	\N	t	t	\N	\N	Alkaline Earth Metal	2.2	1	6.1132	1.54	1112.15	1757	14	Davy	1808	0.647	4	2
21	Scandium	Sc	44.956	24	21	21	4	3	solid	\N	t	t	\N	\N	Transition Metal	2.1	1.36	6.5615	2.99	1812.15	3109	15	Nilson	1878	0.568	4	\N
22	Titanium	Ti	47.867	26	22	22	4	4	solid	\N	t	t	\N	\N	Transition Metal	2	1.54	6.8281	4.54	1933.15	3560	9	Gregor	1791	0.523	4	\N
23	Vanadium	V	50.942	28	23	23	4	5	solid	\N	t	t	\N	\N	Transition Metal	1.9	1.63	6.7462	6.11	2175.15	3680	9	   del Rio	1801	0.489	4	\N
24	Chromium	Cr	51.996	28	24	24	4	6	solid	\N	t	t	\N	\N	Transition Metal	1.9	1.66	6.7665	7.15	2130.15	2944	9	Vauquelin	1797	0.449	4	\N
25	Manganese	Mn	54.938	30	25	25	4	7	solid	\N	t	t	\N	\N	Transition Metal	1.8	1.55	7.434	7.44	1519.15	2334	11	Gahn, Scheele	1774	0.479	4	\N
26	Iron	Fe	55.845	30	26	26	4	8	solid	\N	t	t	\N	\N	Transition Metal	1.7	1.83	7.9024	7.87	1808.15	3134	10	Prehistoric	\N	0.449	4	\N
27	Cobalt	Co	58.933	32	27	27	4	9	solid	\N	t	t	\N	\N	Transition Metal	1.7	1.88	7.881	8.86	1768.15	3200	14	Brandt	1735	0.421	4	\N
28	Nickel	Ni	58.693	31	28	28	4	10	solid	\N	t	t	\N	\N	Transition Metal	1.6	1.91	7.6398	8.91	1726.15	3186	11	Cronstedt	1751	0.444	4	\N
29	Copper	Cu	63.546	35	29	29	4	11	solid	\N	t	t	\N	\N	Transition Metal	1.6	1.9	7.7264	8.96	1357.75	2835	11	Prehistoric	\N	0.385	4	\N
30	Zinc	Zn	65.38	35	30	30	4	12	solid	\N	t	t	\N	\N	Transition Metal	1.5	1.65	9.3942	7.13	692.88	1180	15	Prehistoric	\N	0.388	4	\N
31	Gallium	Ga	69.723	39	31	31	4	13	solid	\N	t	t	\N	\N	Metal	1.8	1.81	5.9993	5.91	302.91	2477	14	de Boisbaudran	1875	0.371	4	3
32	Germanium	Ge	72.64	41	32	32	4	14	solid	\N	t	\N	\N	t	Metalloid	1.5	2.01	7.8994	5.32	1211.45	3106	17	Winkler	1886	0.32	4	4
33	Arsenic	As	74.922	42	33	33	4	15	solid	\N	t	\N	\N	t	Metalloid	1.3	2.18	9.7886	5.78	1090.15	887	14	Albertus Magnus	1250	0.329	4	5
34	Selenium	Se	78.96	45	34	34	4	16	solid	\N	t	\N	t	\N	Nonmetal	1.2	2.55	9.7524	4.81	494.15	958	20	Berzelius	1817	0.321	4	6
35	Bromine	Br	79.904	45	35	35	4	17	liq	\N	t	\N	t	\N	Halogen	1.1	2.96	11.8138	3.12	266.05	332	19	Balard	1826	0.474	4	7
36	Krypton	Kr	83.798	48	36	36	4	18	gas	\N	t	\N	t	\N	Noble Gas	1	\N	13.9996	0.00373	115.93	119.93	23	Ramsay and Travers	1898	0.248	4	8
37	Rubidium	Rb	85.468	48	37	37	5	1	solid	\N	t	t	\N	\N	Alkali Metal	3	0.82	4.1771	1.53	312.79	961	20	Bunsen and Kirchoff	1861	0.363	5	1
38	Strontium	Sr	87.62	50	38	38	5	2	solid	\N	t	t	\N	\N	Alkaline Earth Metal	2.5	0.95	5.6949	2.64	1042.15	1655	18	Davy	1808	0.301	5	2
39	Yttrium	Y	88.906	50	39	39	5	3	solid	\N	t	t	\N	\N	Transition Metal	2.3	1.22	6.2173	4.47	1799.15	3609	21	Gadolin	1794	0.298	5	\N
40	Zirconium	Zr	91.224	51	40	40	5	4	solid	\N	t	t	\N	\N	Transition Metal	2.2	1.33	6.6339	6.51	2125.15	4682	20	Klaproth	1789	0.278	5	\N
41	Niobium	Nb	92.906	52	41	41	5	5	solid	\N	t	t	\N	\N	Transition Metal	2.1	1.6	6.7589	8.57	2741.15	5017	24	Hatchett	1801	0.265	5	\N
42	Molybdenum	Mo	95.96	54	42	42	5	6	solid	\N	t	t	\N	\N	Transition Metal	2	2.16	7.0924	10.2	2890.15	4912	20	Scheele	1778	0.251	5	\N
43	Technetium	Tc	98	55	43	43	5	7	artificial	t	\N	t	\N	\N	Transition Metal	2	1.9	7.28	11.5	2473.15	5150	23	Perrier and Segr 	1937	\N	5	\N
44	Ruthenium	Ru	101.07	57	44	44	5	8	solid	\N	t	t	\N	\N	Transition Metal	1.9	2.2	7.3605	12.4	2523.15	4423	16	Klaus	1844	0.238	5	\N
45	Rhodium	Rh	102.906	58	45	45	5	9	solid	\N	t	t	\N	\N	Transition Metal	1.8	2.28	7.4589	12.4	2239.15	3968	20	Wollaston	1803	0.243	5	\N
46	Palladium	Pd	106.42	60	46	46	5	10	solid	\N	t	t	\N	\N	Transition Metal	1.8	2.2	8.3369	12.0	1825.15	3236	21	Wollaston	1803	0.244	5	\N
47	Silver	Ag	107.868	61	47	47	5	11	solid	\N	t	t	\N	\N	Transition Metal	1.8	1.93	7.5762	10.5	1234.15	2435	27	Prehistoric	\N	0.235	5	\N
48	Cadmium	Cd	112.411	64	48	48	5	12	solid	\N	t	t	\N	\N	Transition Metal	1.7	1.69	8.9938	8.69	594.33	1040	22	Stromeyer	1817	0.232	5	\N
49	Indium	In	114.818	66	49	49	5	13	solid	\N	t	t	\N	\N	Metal	2	1.78	5.7864	7.31	429.91	2345	34	Reich and Richter	1863	0.233	5	3
50	Tin	Sn	118.71	69	50	50	5	14	solid	\N	t	t	\N	\N	Metal	1.7	1.96	7.3439	7.29	505.21	2875	28	Prehistoric	\N	0.228	5	4
51	Antimony	Sb	121.76	71	51	51	5	15	solid	\N	t	\N	\N	t	Metalloid	1.5	2.05	8.6084	6.69	904.05	1860	29	Early historic times	\N	0.207	5	5
52	Tellurium	Te	127.6	76	52	52	5	16	solid	\N	t	\N	\N	t	Metalloid	1.4	2.1	9.0096	6.23	722.8	1261	29	von Reichenstein	1782	0.202	5	6
53	Iodine	I	126.904	74	53	53	5	17	solid	\N	t	\N	t	\N	Halogen	1.3	2.66	10.4513	4.93	386.65	457.4	24	Courtois	1811	0.214	5	7
54	Xenon	Xe	131.293	77	54	54	5	18	gas	\N	t	\N	t	\N	Noble Gas	1.2	\N	12.1298	0.00589	161.45	165.03	31	Ramsay and Travers	1898	0.158	5	8
55	Cesium	Cs	132.905	78	55	55	6	1	solid	\N	t	t	\N	\N	Alkali Metal	3.3	0.79	3.8939	1.87	301.7	944	22	Bunsen and Kirchoff	1860	0.242	6	1
56	Barium	Ba	137.327	81	56	56	6	2	solid	\N	t	t	\N	\N	Alkaline Earth Metal	2.8	0.89	5.2117	3.59	1002.15	2170	25	Davy	1808	0.204	6	2
57	Lanthanum	La	138.905	82	57	57	6	3	solid	\N	t	t	\N	\N	Lanthanide	2.7	1.1	5.5769	6.15	1193.15	3737	19	Mosander	1839	0.195	6	\N
58	Cerium	Ce	140.116	82	58	58	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.7	1.12	5.5387	6.77	1071.15	3716	19	Berzelius	1803	0.192	6	\N
59	Praseodymium	Pr	140.908	82	59	59	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.7	1.13	5.473	6.77	1204.15	3793	15	von Welsbach	1885	0.193	6	\N
60	Neodymium	Nd	144.242	84	60	60	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.6	1.14	5.525	7.01	1289.15	3347	16	von Welsbach	1885	0.19	6	\N
61	Promethium	Pm	145	84	61	61	6	\N	artificial	t	\N	t	\N	\N	Lanthanide	2.6	1.13	5.582	7.26	1204.15	3273	14	Marinsky et al.	1945	\N	6	\N
62	Samarium	Sm	150.36	88	62	62	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.6	1.17	5.6437	7.52	1345.15	2067	17	Boisbaudran	1879	0.197	6	\N
63	Europium	Eu	151.964	89	63	63	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.6	1.2	5.6704	5.24	1095.15	1802	21	Demarcay	1901	0.182	6	\N
64	Gadolinium	Gd	157.25	93	64	64	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.5	1.2	6.1501	7.90	1585.15	3546	17	de Marignac	1880	0.236	6	\N
65	Terbium	Tb	158.925	94	65	65	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.5	1.2	5.8638	8.23	1630.15	3503	24	Mosander	1843	0.182	6	\N
66	Dysprosium	Dy	162.5	97	66	66	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.5	1.22	5.9389	8.55	1680.15	2840	21	de Boisbaudran	1886	0.17	6	\N
67	Holmium	Ho	164.93	98	67	67	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.5	1.23	6.0215	8.80	1743.15	2993	29	Delafontaine and Soret	1878	0.165	6	\N
68	Erbium	Er	167.259	99	68	68	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.5	1.24	6.1077	9.07	1795.15	3503	16	Mosander	1843	0.168	6	\N
69	Thulium	Tm	168.934	100	69	69	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.4	1.25	6.1843	9.32	1818.15	2223	18	Cleve	1879	0.16	6	\N
70	Ytterbium	Yb	173.054	103	70	70	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.4	1.1	6.2542	6.97	1097.15	1469	16	Marignac	1878	0.155	6	\N
71	Lutetium	Lu	174.967	104	71	71	6	\N	solid	\N	t	t	\N	\N	Lanthanide	2.3	1.27	5.4259	9.84	1936.15	3675	22	Urbain/ von Welsbach	1907	0.154	6	\N
72	Hafnium	Hf	178.49	106	72	72	6	4	solid	\N	t	t	\N	\N	Transition Metal	2.2	1.3	6.8251	13.3	2500.15	4876	17	Coster and von Hevesy	1923	0.144	6	\N
73	Tantalum	Ta	180.948	108	73	73	6	5	solid	\N	t	t	\N	\N	Transition Metal	2.1	1.5	7.5496	16.7	3269.15	5731	19	Ekeberg	1801	0.14	6	\N
74	Tungsten	W	183.84	110	74	74	6	6	solid	\N	t	t	\N	\N	Transition Metal	2	2.36	7.864	19.3	3680.15	5828	22	J. and F. d'Elhuyar	1783	0.132	6	\N
75	Rhenium	Re	186.207	111	75	75	6	7	solid	\N	t	t	\N	\N	Transition Metal	2	1.9	7.8335	21.0	3453.15	5869	21	Noddack, Berg, and Tacke	1925	0.137	6	\N
76	Osmium	Os	190.23	114	76	76	6	8	solid	\N	t	t	\N	\N	Transition Metal	1.9	2.2	8.4382	22.6	3300.15	5285	19	Tennant	1803	0.13	6	\N
77	Iridium	Ir	192.217	115	77	77	6	9	solid	\N	t	t	\N	\N	Transition Metal	1.9	2.2	8.967	22.6	2716.15	4701	25	Tennant	1804	0.131	6	\N
78	Platinum	Pt	195.084	117	78	78	6	10	solid	\N	t	t	\N	\N	Transition Metal	1.8	2.28	8.9587	21.5	2045.15	4098	32	Ulloa/Wood	1735	0.133	6	\N
79	Gold	Au	196.967	118	79	79	6	11	solid	\N	t	t	\N	\N	Transition Metal	1.8	2.54	9.2255	19.3	1337.73	3129	21	Prehistoric	\N	0.129	6	\N
80	Mercury	Hg	200.59	121	80	80	6	12	liq	\N	t	t	\N	\N	Transition Metal	1.8	2	10.4375	13.5	234.43	630	26	Prehistoric	\N	0.14	6	\N
81	Thallium	Tl	204.383	123	81	81	6	13	solid	\N	t	t	\N	\N	Metal	2.1	2.04	6.1082	11.9	577.15	1746	28	Crookes	1861	0.129	6	3
82	Lead	Pb	207.2	125	82	82	6	14	solid	\N	t	t	\N	\N	Metal	1.8	2.33	7.4167	11.3	600.75	2022	29	Prehistoric	\N	0.129	6	4
83	Bismuth	Bi	208.98	126	83	83	6	15	solid	\N	t	t	\N	\N	Metal	1.6	2.02	7.2856	9.81	544.67	1837	19	Geoffroy the Younger	1753	0.122	6	5
84	Polonium	Po	210	126	84	84	6	16	solid	t	t	\N	\N	t	Metalloid	1.5	2	8.417	9.32	527.15	1235	34	Curie	1898	\N	6	6
85	Astatine	At	210	125	85	85	6	17	solid	t	t	\N	t	\N	Halogen	1.4	2.2	9.3	7.00	575.15	610	21	Corson et al.	1940	\N	6	7
86	Radon	Rn	222	136	86	86	6	18	gas	t	t	t	\N	\N	Noble Gas	1.3	\N	10.7485	0.00973	202.15	211.3	20	Dorn	1900	0.094	6	8
87	Francium	Fr	223	136	87	87	7	1	solid	t	t	t	\N	\N	Alkaline Metal	\N	0.7	4.0727	1.87	300.15	950	21	Perey	1939	\N	7	1
88	Radium	Ra	226	138	88	88	7	2	solid	t	t	t	\N	\N	Alkaline Earth Metal	\N	0.9	5.2784	5.50	973.15	2010	15	Pierre and Marie Curie	1898	\N	7	2
89	Actinium	Ac	227	138	89	89	7	3	solid	t	t	t	\N	\N	Actinide	\N	1.1	5.17	10.1	1323.15	3471	11	Debierne/Giesel	1899	0.12	7	\N
90	Thorium	Th	232.038	142	90	90	7	\N	solid	t	t	t	\N	\N	Actinide	\N	1.3	6.3067	11.7	2028.15	5061	12	Berzelius	1828	0.113	7	\N
91	Protactinium	Pa	231.036	140	91	91	7	\N	solid	t	t	t	\N	\N	Actinide	\N	1.5	5.89	15.4	1873.15	4300	14	Hahn and Meitner	1917	\N	7	\N
92	Uranium	U	238.029	146	92	92	7	\N	solid	t	t	t	\N	\N	Actinide	\N	1.38	6.1941	19.0	1405.15	4404	15	Peligot	1841	0.116	7	\N
93	Neptunium	Np	237	144	93	93	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.36	6.2657	20.5	913.15	4273	153	McMillan and Abelson	1940	\N	7	\N
94	Plutonium	Pu	244	150	94	94	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.28	6.0262	19.8	913.15	3501	163	Seaborg et al.	1940	\N	7	\N
95	Americium	Am	243	148	95	95	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.3	5.9738	13.7	1267.15	2880	133	Seaborg et al.	1944	\N	7	\N
96	Curium	Cm	247	151	96	96	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.3	5.9915	13.5	1340.15	3383	133	Seaborg et al.	1944	\N	7	\N
97	Berkelium	Bk	247	150	97	97	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.3	6.1979	14.8	1259.15	983	83	Seaborg et al.	1949	\N	7	\N
98	Californium	Cf	251	153	98	98	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.3	6.2817	15.1	1925.15	1173	123	Seaborg et al.	1950	\N	7	\N
99	Einsteinium	Es	252	153	99	99	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.3	6.42	13.5	1133.15	\N	123	Ghiorso et al.	1952	\N	7	\N
100	Fermium	Fm	257	157	100	100	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.3	6.5	\N	\N	\N	103	Ghiorso et al.	1953	\N	7	\N
101	Mendelevium	Md	258	157	101	101	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.3	6.58	\N	\N	\N	33	Ghiorso et al.	1955	\N	7	\N
102	Nobelium	No	259	157	102	102	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	1.3	6.65	\N	\N	\N	73	Ghiorso et al.	1958	\N	7	\N
103	Lawrencium	Lr	262	159	103	103	7	\N	artificial	t	\N	t	\N	\N	Actinide	\N	\N	\N	\N	\N	\N	203	Ghiorso et al.	1961	\N	7	\N
104	Rutherfordium	Rf	261	157	104	104	7	4	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	18.1	\N	\N	\N	Ghiorso et al.	1969	\N	7	\N
105	Dubnium	Db	262	157	105	105	7	5	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	39.0	\N	\N	\N	Ghiorso et al.	1970	\N	7	\N
106	Seaborgium	Sg	266	160	106	106	7	6	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	35.0	\N	\N	\N	Ghiorso et al.	1974	\N	7	\N
107	Bohrium	Bh	264	157	107	107	7	7	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	37.0	\N	\N	\N	Armbruster and M nzenberg	1981	\N	7	\N
108	Hassium	Hs	267	159	108	108	7	8	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	41.0	\N	\N	\N	Armbruster and M nzenberg	1983	\N	7	\N
109	Meitnerium	Mt	268	159	109	109	7	9	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	35.0	\N	\N	\N	GSI, Darmstadt, West Germany	1982	\N	7	\N
110	Darmstadtium 	Ds 	271	161	110	110	7	10	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	\N	\N	\N	\N	\N	1994	\N	7	\N
111	Roentgenium 	Rg 	272	161	111	111	7	11	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	\N	\N	\N	\N	\N	1994	\N	7	\N
112	Copernicium 	Cn 	285	173	112	112	7	12	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	\N	\N	\N	\N	\N	1996	\N	7	\N
113	Nihonium	Nh	284	171	113	113	7	13	artificial	t	\N	t	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	2004	\N	7	3
114	Flerovium	Fl	289	175	114	114	7	14	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	\N	\N	\N	\N	\N	1999	\N	7	4
115	Moscovium	Mc	288	173	115	115	7	15	artificial	t	\N	t	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	2010	\N	7	5
116	Livermorium	Lv	292	176	116	116	7	16	artificial	t	\N	t	\N	\N	Transactinide	\N	\N	\N	\N	\N	\N	\N	\N	2000	\N	7	6
117	Tennessine	Ts	295	178	117	117	7	17	artificial	t	\N	\N	t	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	2010	\N	7	7
118	Oganesson	Og	294	176	118	118	7	18	artificial	t	\N	\N	t	\N	Noble Gas	\N	\N	\N	\N	\N	\N	\N	\N	2006	\N	7	8
\.


copy data !!!
[root@localhost tmp]# vi periodic_table.tsv
[root@localhost tmp]# pwd
/tmp
[root@localhost tmp]# chmod 777 periodic_table.tsv



test=> \copy periodic_table FROM '/tmp/periodic_table.tsv' WITH (FORMAT csv, DELIMITER E'\t', NULL '\N');
COPY 118
test=> SELECT COUNT(*) FROM periodic_table;
 count
-------
   118
(1 row)

test=> SELECT "AtomicNumber", "Element", "Symbol"
test-> FROM periodic_table
test-> ORDER BY "AtomicNumber"
test-> LIMIT 5;
 AtomicNumber |  Element  | Symbol
--------------+-----------+--------
            1 | Hydrogen  | H
            2 | Helium    | He
            3 | Lithium   | Li
            4 | Beryllium | Be
            5 | Boron     | B
(5 rows)

test=> ALTER TABLE periodic_table
test-> ADD PRIMARY KEY ("AtomicNumber");
ALTER TABLE
test=>


test=> SELECT
test->   COUNT(*) FILTER (WHERE "Metal" = true)     AS metals,
test->   COUNT(*) FILTER (WHERE "Nonmetal" = true)  AS nonmetals,
test->   COUNT(*) FILTER (WHERE "Metalloid" = true) AS metalloids
test-> FROM periodic_table;
 metals | nonmetals | metalloids
--------+-----------+------------
     92 |        19 |          7
(1 row)

Tuesday, 24 February 2026

postgres how to install pg_top



https://dl.marmotte.net/rpms/redhat/el8/x86_64/libbsd-0.9.1-4.el8/

https://ftp.postgresql.org/pub/repos/yum/common/redhat/rhel-8.2-x86_64/


[root@localhost ~]# yum install pg_top
Last metadata expiration check: 0:38:49 ago on Tue 24 Feb 2026 06:50:29 AM UTC.
Error:
 Problem: cannot install the best candidate for the job
  - nothing provides libbsd.so.0()(64bit) needed by pg_top-4.1.2-42PGDG.rhel8.x86_64 from pgdg-common
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

[root@localhost ~]#  dnf install epel-release
Last metadata expiration check: 0:40:19 ago on Tue 24 Feb 2026 06:50:29 AM UTC.
Dependencies resolved.
================================================================================================================================================================================
 Package                                          Architecture                    Version                                      Repository                                  Size
================================================================================================================================================================================
Installing:
 oracle-epel-release-el8                          x86_64                          1.0-5.el8                                    ol8_baseos_latest                           15 k
Installing dependencies:
 yum-utils                                        noarch                          4.0.21-25.0.1.el8                            ol8_baseos_latest                           75 k

Transaction Summary
================================================================================================================================================================================
Install  2 Packages

Total download size: 90 k
Installed size: 41 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): oracle-epel-release-el8-1.0-5.el8.x86_64.rpm                                                                                             163 kB/s |  15 kB     00:00
(2/2): yum-utils-4.0.21-25.0.1.el8.noarch.rpm                                                                                                   732 kB/s |  75 kB     00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                           707 kB/s |  90 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                        1/1
  Installing       : yum-utils-4.0.21-25.0.1.el8.noarch                                                                                                                     1/2
  Installing       : oracle-epel-release-el8-1.0-5.el8.x86_64                                                                                                               2/2
  Running scriptlet: oracle-epel-release-el8-1.0-5.el8.x86_64                                                                                                               2/2
  Verifying        : oracle-epel-release-el8-1.0-5.el8.x86_64                                                                                                               1/2
  Verifying        : yum-utils-4.0.21-25.0.1.el8.noarch                                                                                                                     2/2

Installed:
  oracle-epel-release-el8-1.0-5.el8.x86_64                                                  yum-utils-4.0.21-25.0.1.el8.noarch

Complete!
[root@localhost ~]#  dnf install pg_top
Oracle Linux 8 EPEL Packages for Development (x86_64)                    [      ===                                                           ] ---  B/s |   0  B     --:-- ETA


Oracle Linux 8 EPEL Packages for Development (x86_64)                                                                                           0.0  B/s |   0  B     07:58
Errors during downloading metadata for repository 'ol8_developer_EPEL':
  - Curl error (7): Couldn't connect to server for https://yum.us-phoenix-1.oci.oraclecloud.com/repo/OracleLinux/OL8/developer/EPEL/x86_64/repodata/repomd.xml [Failed to connect to yum.us-phoenix-1.oci.oraclecloud.com port 443: Connection timed out]
Error: Failed to download metadata for repo 'ol8_developer_EPEL': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# cd /root/



[root@localhost ~]# ls -ltr
total 204
-rw-------. 1 root root   5142 Oct 20 13:41 anaconda-ks.cfg
-rw-------. 1 root root   4948 Oct 20 13:45 ks-post.log
-rw-------. 1 root root   5432 Oct 20 13:45 original-ks.cfg
-rw-r--r--. 1 root root    128 Oct 20 14:49 log2947
-rw-r--r--. 1 root root    281 Oct 20 14:53 log2894
-rw-r--r--. 1 root root  63444 Feb 24 07:38 pg_top-4.1.2-42PGDG.rhel8.x86_64.rpm
-rw-r--r--. 1 root root 106984 Feb 24 08:16 libbsd-0.9.1-4.el8.x86_64.rpm

[root@localhost ~]# yum -y localinstall /root/libbsd-0.9.1-4.el8.x86_64.rpm
Oracle Linux 8 EPEL Packages for Development (x86_64)                                                                                           0.0  B/s |   0  B     07:58
Errors during downloading metadata for repository 'ol8_developer_EPEL':
  - Curl error (7): Couldn't connect to server for https://yum.us-phoenix-1.oci.oraclecloud.com/repo/OracleLinux/OL8/developer/EPEL/x86_64/repodata/repomd.xml [Failed to connect to yum.us-phoenix-1.oci.oraclecloud.com port 443: Connection timed out]
Error: Failed to download metadata for repo 'ol8_developer_EPEL': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried


[root@localhost ~]# yum config-manager --disable ol8_developer_EPEL
[root@localhost ~]# yum -y localinstall /root/libbsd-0.9.1-4.el8.x86_64.rpm
^COracle Linux 8 EPEL Modular Packages for Development (x86_64)            [                                 ===                                ] ---  B/s |   0  B     --:-- ETOracle Linux 8 EPEL Modular Packages for Development (x86_64)                                                                                   0.0  B/s |   0  B     00:12
Error: Failed to download metadata for repo 'ol8_developer_EPEL_modular': Librepo was interrupted by a signal



[root@localhost ~]# rpm -ivh /root/libbsd-0.9.1-4.el8.x86_64.rpm
warning: /root/libbsd-0.9.1-4.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID e755cc63: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:libbsd-0.9.1-4.el8               ################################# [100%]


[root@localhost ~]# rpm -ivh /root/pg_top-4.1.2-42PGDG.rhel8.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:pg_top-4.1.2-42PGDG.rhel8        ################################# [100%]




[root@localhost ~]# pg_top --version
pg_top 4.1.2
[root@localhost ~]#


[root@localhost ~]# ps -ef|grep -i postgres
postgres    1080       1  0 05:38 ?        00:00:01 /usr/pgsql-17/bin/postgres -D /var/lib/pgsql/17/data/
postgres    1131    1080  0 05:38 ?        00:00:00 postgres: logger
postgres    1143    1080  0 05:38 ?        00:00:00 postgres: checkpointer
postgres    1144    1080  0 05:38 ?        00:00:00 postgres: background writer
postgres    1158    1080  0 05:38 ?        00:00:00 postgres: walwriter
postgres    1159    1080  0 05:38 ?        00:00:00 postgres: autovacuum launcher
postgres    1160    1080  0 05:38 ?        00:00:00 postgres: logical replication launcher
root        9513    3877  0 08:33 pts/2    00:00:00 grep --color=auto -i postgres
[root@localhost ~]#



 pg_top -h localhost -p 5432 -U postgres -d postgres

output ---



 pg_top -h localhost -p 5432 -U postgres -d postgres



[root@localhost ~]# pg_top -W -U postgres -d postgres  <<<< this will prompt passwd
Password:


[root@localhost ~]# export PGPASSWORD='postgres'
[root@localhost ~]# pg_top -W -U postgres -d postgres
Password:


[root@localhost ~]# pg_top -h localhost -p 5432 -U postgres -d postgres


output ---

last pid:  9909;  load avg:  0.61,  0.65,  0.64;       up 0+03:07:42                                                                                                   08:45:01
6 processes: 5 other background task(s), 1 active
CPU states:  3.2% user,  0.0% nice,  4.5% system, 91.6% idle,  0.7% iowait
Memory: 3706M used, 202M free, 0K shared, 4K buffers, 1922M cached
DB activity:   0 tps,  0 rollbs/s,   0 buffer r/s, 100 hit%,      3 row r/s,    0 row w/s
DB I/O:     0 reads/s,     1 KB/s,     3 writes/s,    29 KB/s
Swap: 775M used, 3321M free, 24M cached, 0K in, 0K out

    PID USERNAME    SIZE   RES STATE   XTIME  QTIME  %CPU LOCKS COMMAND
   9904 postgres    492M   18M active   0:00   0:00   0.2     8 postgres: postgres postgres [local] idle
   1143             489M 6580K          0:00   0:00   0.0     0 postgres: checkpointer
   1158             489M 8704K          0:00   0:00   0.0     0 postgres: walwriter
   1144             489M 4980K          0:00   0:00   0.0     0 postgres: background writer
   1159             490M 7476K          0:00   0:00   0.0     0 postgres: autovacuum launcher
   1160 postgres    490M 7732K          0:00   0:00   0.0     0 postgres: logical replication launcher






Monday, 23 February 2026

Postgres Create database with tablespace

alert log for postgres !!!! [root@localhost log]# pwd /var/lib/pgsql/17/data/log [root@localhost log]# locate postgresql*.log /var/lib/pgsql/17/data/log/postgresql-Fri.log /var/lib/pgsql/17/data/log/postgresql-Mon.log [root@localhost log]# tail -100f /var/lib/pgsql/17/data/log/postgresql-Mon.log Filename What it does pg_hba.conf Controls who can log in (the one we edited to fix your "Peer" error). postgresql.conf Controls how the server runs (memory, ports, logging, etc.). pg_ident.conf Maps Operating System users to Database users.

mkdir -p /var/lib/pgsql/tablespaces/salesspace
chmod 700 /var/lib/pgsql/tablespaces/salesspace

[root@localhost ~]# ls -ld /var/lib/pgsql/tablespaces/salesspace
drwx------. 2 postgres postgres 6 Feb 23 08:10 /var/lib/pgsql/tablespaces/salesspace


[root@localhost ~]#

show data_directory;

CREATE TABLESPACE salesspace
  OWNER salesapp
  LOCATION '/var/lib/pgsql/tablespaces/salesspace';

REVOKE ALL ON TABLESPACE salesspace FROM PUBLIC;
GRANT CREATE ON TABLESPACE salesspace TO salesapp;
 

select * from pg_tablespace;

select spcname
      ,pg_tablespace_location(oid) 
from   pg_tablespace;

select spcname ,pg_tablespace_location(oid) from pg_tablespace;

CREATE ROLE salesapp
  LOGIN
  PASSWORD 'salesapp';

CREATE DATABASE sales OWNER salesapp TABLESPACE salesspace;



postgres=# \db
                      List of tablespaces
    Name    |  Owner   |               Location
------------+----------+---------------------------------------
 pg_default | postgres |
 pg_global  | postgres |
 salesspace | salesapp | /var/lib/pgsql/tablespaces/salesspace
(3 rows)



postgres=# SELECT spcname, spcowner::regrole, pg_tablespace_location(oid) FROM pg_tablespace;
  spcname   | spcowner |        pg_tablespace_location
------------+----------+---------------------------------------
 pg_default | postgres |
 pg_global  | postgres |
 salesspace | salesapp | /var/lib/pgsql/tablespaces/salesspace
(3 rows)


If only salesapp should use this tablespace:

ALTER ROLE salesapp SET default_tablespace = salesspace;





postgres=# \c sales
You are now connected to database "sales" as user "postgres".


sales=# \l sales
                                                 List of databases
 Name  |  Owner   | Encoding | Locale Provider |   Collate   |    Ctype    | Locale | ICU Rules | Access privileges
-------+----------+----------+-----------------+-------------+-------------+--------+-----------+-------------------
 sales | salesapp | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           |
(1 row)






sales=# GRANT CONNECT ON DATABASE sales TO salesapp;
GRANT
sales=# GRANT USAGE, CREATE ON SCHEMA public TO salesapp;
GRANT
sales=# GRANT CREATE ON TABLESPACE salesspace TO salesapp;
GRANT




sales=# CREATE TABLE orders (
sales(#     order_id   bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
sales(#     order_date date NOT NULL,
sales(#     amount     numeric(12,2) NOT NULL
sales(# )
sales-# TABLESPACE salesspace;
CREATE TABLE



sales=# ALTER TABLE orders OWNER TO salesapp;
ALTER TABLE


sales=# \d+ orders
                                                         Table "public.orders"
   Column   |     Type      | Collation | Nullable |           Default            | Storage | Compression | Stats target | Description
------------+---------------+-----------+----------+------------------------------+---------+-------------+--------------+-------------
 order_id   | bigint        |           | not null | generated always as identity | plain   |             |              |
 order_date | date          |           | not null |                              | plain   |             |              |
 amount     | numeric(12,2) |           | not null |                              | main    |             |              |
Indexes:
    "orders_pkey" PRIMARY KEY, btree (order_id)
Access method: heap





SELECT
    tablename,
    tableowner,
    tablespace
FROM pg_tables
WHERE tablename = 'orders';



sales=# SELECT
sales-#     tablename,
sales-#     tableowner,
sales-#     tablespace
sales-# FROM pg_tables
sales-# WHERE tablename = 'orders';
 tablename | tableowner | tablespace
-----------+------------+------------
 orders    | salesapp   |
(1 row)






postgres=# select * from pg_tables where schemaname ='public' limit 10;
 schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers | rowsecurity
------------+-----------+------------+------------+------------+----------+-------------+-------------
(0 rows)




postgres=# select oid,datname,dattablespace from pg_database order by oid;
  oid  |  datname  | dattablespace
-------+-----------+---------------
     1 | template1 |          1663
     4 | template0 |          1663
     5 | postgres  |          1663
 16387 | test      |          1663
 16390 | sales     |         16389
(5 rows)

postgres=# select * from pg_tablespace;
  oid  |  spcname   | spcowner |        spcacl         | spcoptions
-------+------------+----------+-----------------------+------------
  1663 | pg_default |       10 |                       |
  1664 | pg_global  |       10 |                       |
 16389 | salesspace |    16388 | {salesapp=C/salesapp} |
(3 rows)

postgres=#



SELECT 
    spcname AS tablespace_name, 
    pg_tablespace_location(oid) AS physical_path 
FROM pg_tablespace;

 tablespace_name |             physical_path
-----------------+---------------------------------------
 pg_default      |
 pg_global       |
 salesspace      | /var/lib/pgsql/tablespaces/salesspace
(3 rows)

postgres=#




SELECT 
    spcname AS tablespace,
    pg_size_pretty(pg_tablespace_size(spcname)) AS used_space,
    pg_tablespace_location(oid) AS physical_path
FROM pg_tablespace
WHERE spcname NOT LIKE 'pg_%';


tablespace | used_space |             physical_path
------------+------------+---------------------------------------
 salesspace | 7790 kB    | /var/lib/pgsql/tablespaces/salesspace
(1 row)





[postgres@localhost ~]$ psql -U salesapp -d sales
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL:  Peer authentication failed for user "salesapp"



[root@localhost ~]# tail -100f /var/lib/pgsql/17/data/pg_hba.conf

# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            scram-sha-256
host    replication     all             ::1/128                 scram-sha-256
host    all    all    192.168.1.188/32    md5
local   all     all             peer


tail -10 /var/lib/pgsql/17/data/pg_ident.conf
# This file is read on server startup and when the postmaster receives
# a SIGHUP signal.  If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect.  You can
# use "pg_ctl reload" to do that.

# Put your actual configuration here
# ----------------------------------

# MAPNAME       SYSTEM-USERNAME         PG-USERNAME
sales_admins    postgres           salesapp   <<<<<< add this 
[root@localhost ~]#




[root@localhost ~]# grep "^local" /var/lib/pgsql/17/data/pg_hba.conf
local   all             all                                     peer  <<<< commented this line
local   replication     all                                     peer
local   all             all                                     scram-sha-256

[root@localhost ~]# vi /var/lib/pgsql/17/data/pg_hba.conf

[root@localhost ~]# grep "^local" /var/lib/pgsql/17/data/pg_hba.conf
local   replication     all                                     peer
local   all             all                                     scram-sha-256




to load config !!!

 psql -c "SELECT pg_reload_conf();"
 pg_reload_conf
----------------
 t
(1 row)



now able to connect !!!

[postgres@localhost ~]$ psql -U salesapp -d sales
Password for user salesapp:
psql (17.8)
Type "help" for help.




or 
[postgres@localhost ~]$ psql -U salesapp -d sales -h 127.0.0.1
Password for user salesapp:
psql (17.8)
Type "help" for help.




A Few Quick Navigation Tips:
\l: List all databases.

\dt: List all tables in the current database.

\du: List all users/roles and their permissions.

\q: Exit the psql prompt.




[postgres@localhost ~]$ psql -U postgres
Password for user postgres:
psql (17.8)
Type "help" for help.


SELECT spcname AS "Name",
  pg_catalog.pg_get_userbyid(spcowner) AS "Owner",
  pg_catalog.pg_tablespace_location(oid) AS "Location"
FROM pg_catalog.pg_tablespace
ORDER BY 1;



    Name    |  Owner   |               Location
------------+----------+---------------------------------------
 pg_default | postgres |
 pg_global  | postgres |
 salesspace | salesapp | /var/lib/pgsql/tablespaces/salesspace
(3 rows)



select relname,reltablespace from pg_class where reltablespace in(select
oid from pg_tablespace where spcname not in ('pg_default','pg_global'));

            ^
postgres=# select relname,reltablespace from pg_class where reltablespace in(select
postgres(# oid from pg_tablespace where spcname not in ('pg_default','pg_global'));
 relname | reltablespace
---------+---------------
(0 rows)




postgres=# select * from pg_tablespace;
  oid  |  spcname   | spcowner |        spcacl         | spcoptions
-------+------------+----------+-----------------------+------------
  1663 | pg_default |       10 |                       |
  1664 | pg_global  |       10 |                       |
 16389 | salesspace |    16388 | {salesapp=C/salesapp} |
(3 rows)


SELECT 
    spcname AS tablespace_name,
    pg_catalog.pg_get_userbyid(spcowner) AS owner,
    pg_catalog.pg_tablespace_location(oid) AS location,
    pg_size_pretty(pg_tablespace_size(oid)) AS size
FROM pg_tablespace;




postgres=# SELECT schemaname, tablename, tableowner
postgres-# FROM pg_tables
postgres-# WHERE tablespace = 'salesspace';
 schemaname | tablename | tableowner
------------+-----------+------------
(0 rows)

postgres=#






psql -U salesapp -d sales





ASM Diskgroup (+DATA)
   ↓
ACFS filesystem
   ↓
/acfs/pgsql/salesspace
   ↓
PostgreSQL tablespace


| Storage type | Supported |
| ------------ | --------- |
| ext4 / xfs   | ✅ Yes     |
| LVM          | ✅ Yes     |
| SAN          | ✅ Yes     |
| NFS (tuned)  | ✅ Yes     |
| ASM direct   | ❌ No      |
| ASM via ACFS | ✅ Yes     |

How to install telnet




[root@localhost ~]# rpm -qa|grep telnet



[root@localhost ~]# yum install telnet telnet-server
Last metadata expiration check: 0:08:21 ago on Mon 23 Feb 2026 07:49:23 AM UTC.
Dependencies resolved.
=====================================================================================================================================================================
 Package                                  Architecture                      Version                                   Repository                                Size
=====================================================================================================================================================================
Installing:
 telnet                                   x86_64                            1:0.17-76.el8                             ol8_appstream                             72 k
 telnet-server                            x86_64                            1:0.17-76.el8                             ol8_appstream                             48 k

Transaction Summary
=====================================================================================================================================================================
Install  2 Packages

Total download size: 120 k
Installed size: 175 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): telnet-server-0.17-76.el8.x86_64.rpm                                                                                          478 kB/s |  48 kB     00:00
(2/2): telnet-0.17-76.el8.x86_64.rpm                                                                                                 604 kB/s |  72 kB     00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                935 kB/s | 120 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                             1/1
  Installing       : telnet-server-1:0.17-76.el8.x86_64                                                                                                          1/2
  Running scriptlet: telnet-server-1:0.17-76.el8.x86_64                                                                                                          1/2
  Installing       : telnet-1:0.17-76.el8.x86_64                                                                                                                 2/2
  Running scriptlet: telnet-1:0.17-76.el8.x86_64                                                                                                                 2/2
  Verifying        : telnet-1:0.17-76.el8.x86_64                                                                                                                 1/2
  Verifying        : telnet-server-1:0.17-76.el8.x86_64                                                                                                          2/2

Installed:
  telnet-1:0.17-76.el8.x86_64                                                   telnet-server-1:0.17-76.el8.x86_64

Complete!
[root@localhost ~]# rpm -qa|grep telnet
telnet-0.17-76.el8.x86_64
telnet-server-0.17-76.el8.x86_64



[root@localhost ~]#

Wednesday, 18 February 2026

Oracle 19c Restore Point Replication From Primary To Standby


Oracle 19c Restore Point Replication From Primary To Standby >>>> GUARANTEE_FLASHBACK_DATABASE=NO <<<<< ---- don't rely on it



SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production




SQL> def
DEFINE _DATE           = "18-FEB-26" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcl" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1903000000" (CHAR)



create restore point grp_test guarantee flashback database;

Restore point created.



create restore point grp_test guarantee flashback database;

-- on prim 


set linesize 300 
col NAME for a30
col GUARANTEE_FLASHBACK_DATABASE for a30
col time for a30
col REPLICATED for a14
select NAME,SCN, GUARANTEE_FLASHBACK_DATABASE, TIME,  REPLICATED from v$restore_point;


NAME                                  SCN GUARANTEE_FLASHBACK_DATABASE   TIME                           REPLICATED
------------------------------ ---------- ------------------------------ ------------------------------ --------------
GRP_TEST                          2538078 YES                            18-FEB-26 04.11.46.000000000   NO


SELECT NAME, SCN, TIME, DATABASE_INCARNATION#, GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE FROM V$RESTORE_POINT;


NAME                                  SCN TIME                           DATABASE_INCARNATION# GUARANTEE_FLASHBACK_DATABASE   STORAGE_SIZE
------------------------------ ---------- ------------------------------ --------------------- ------------------------------ ------------
GRP_TEST                          2538078 18-FEB-26 04.11.46.000000000                       2 YES                               209715200




-- standby   GUARANTEE_FLASHBACK_DATABASE NO!!!! IMP
set linesize 300 
col NAME for a30
col GUARANTEE_FLASHBACK_DATABASE for a30
col time for a30
col REPLICATED for a14
select NAME,SCN, GUARANTEE_FLASHBACK_DATABASE, TIME,  REPLICATED from v$restore_point;


NAME                                  SCN GUARANTEE_FLASHBACK_DATABASE   TIME                           REPLICATED  ---<<<<<
------------------------------ ---------- ------------------------------ ------------------------------ --------------
GRP_TEST_PRIMARY                  2538078 NO                             18-FEB-26 04.11.46.000000000   YES  ------<<<<<<<<<<<<<<<<<<<<<<<


 SELECT NAME, SCN, TIME, DATABASE_INCARNATION#, GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE FROM V$RESTORE_POINT;

NAME                                  SCN TIME                           DATABASE_INCARNATION# GUARANTEE_FLASHBACK_DATABASE   STORAGE_SIZE
------------------------------ ---------- ------------------------------ --------------------- ------------------------------ ------------
GRP_TEST_PRIMARY                  2538078 18-FEB-26 04.11.46.000000000                       2 NO                                        0




to drop 

DROP RESTORE POINT GRP_TEST;

Restore point dropped.


Monday, 9 February 2026

Control file info

<

  
 alter session set tracefile_identifier='control';

 alter database backup controlfile to trace;
  
 alter database backup controlfile to trace noresetlogs;
  
  
 Generate the trace file of control file.


alter database backup controlfile to trace as '/tmp/control.txt' ;

grep "CREATE CONTROLFILE" *
	
col name for a60	
select v.*, round(block_size*file_size_blks/1024/1024, 2) MB from v$controlfile v;
	  
select v.*, round(record_size*records_total/1024/1024, 2) MB from v$controlfile_record_section v 
order by MB desc;
 
 set linesize 300
col DISPLAY_VALUE for a20
col DEFAULT_VALUE for a20
col DESCRIPTION for a20 
col VALUE for a15
col UPDATE_COMMENT for a20
col NAME for a30
  
select * from v$parameter where name = 'control_file_record_keep_time';


Wednesday, 28 January 2026

Oracle download 26ai and install on CentOS Stream release 9



Oracle 26ai

Oracle AI Database 26ai for Linux x86-64 on-premises platforms



Patch 39088031 - Oracle Grid Infrastructure Release Update 23.26.2.0.0

GI RELEASE UPDATE 23.26.2.0.0 (GOLD IMAGE) (Patch)
Linux x86-64
American English
Oracle Grid Infrastructure (GI) Gold Images and patch number 39099896 refer 
to pre-patched, master copies of an Oracle Grid Infrastructure installation. Instead of manually re-applying base updates and subsequent patches every time you provision a new node or database home, you can extract a customized gold image directly
from an existing working environment. [1, 2]

DATABASE RELEASE UPDATE 23.26.2.0.0 (Patch)
Linux x86-64
American English
39099680 db gold image
39093711 classic



Download ----
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#db_ee

-rw-r--r--. 1 oracle oinstall 2406058543 Jan 28 12:54 LINUX.X64_2326100_db_home.zip


[root@centos9 ~]# cat /etc/redhat-release
CentOS Stream release 9

[root@centos9 ~]# uname -r
5.14.0-654.el9.x86_64


install rpm 

dnf install -y \
  bc \
  binutils \
  compat-openssl11 \
  elfutils-libelf \
  fontconfig \
  glibc \
  glibc-devel \
  glibc-headers \
  ksh \
  libaio \
  libasan \
  liblsan \
  libX11 \
  libXau \
  libXi \
  libXrender \
  libXtst \
  libxcrypt-compat \
  libgcc \
  libibverbs \
  librdmacm \
  libstdc++ \
  libxcb \
  libvirt-libs \
  make \
  policycoreutils \
  policycoreutils-python-utils \
  smartmontools \
  sysstat



Last metadata expiration check: 0:25:02 ago on Wed 28 Jan 2026 09:43:16 AM GMT.
Package bc-1.07.1-14.el9.x86_64 is already installed.
Package binutils-2.35.2-69.el9.x86_64 is already installed.
Package elfutils-libelf-0.194-1.el9.x86_64 is already installed.
Package fontconfig-2.14.0-2.el9.x86_64 is already installed.
Package glibc-2.34-245.el9.x86_64 is already installed.
Package libaio-0.3.111-13.el9.x86_64 is already installed.
Package libX11-1.8.12-1.el9.x86_64 is already installed.
Package libXau-1.0.9-8.el9.x86_64 is already installed.
Package libXi-1.7.10-8.el9.x86_64 is already installed.
Package libXrender-0.9.10-16.el9.x86_64 is already installed.
Package libXtst-1.2.3-16.el9.x86_64 is already installed.
Package libxcrypt-compat-4.4.18-3.el9.x86_64 is already installed.
Package libgcc-11.5.0-14.el9.x86_64 is already installed.
Package libibverbs-57.0-2.el9.x86_64 is already installed.
Package libstdc++-11.5.0-14.el9.x86_64 is already installed.
Package libxcb-1.13.1-9.el9.x86_64 is already installed.
Package policycoreutils-3.6-3.el9.x86_64 is already installed.
Package policycoreutils-python-utils-3.6-3.el9.noarch is already installed.
Package smartmontools-1:7.2-9.el9.x86_64 is already installed.
Dependencies resolved.
=====================================================================================================================================================================
 Package                                             Architecture                  Version                                    Repository                        Size
=====================================================================================================================================================================
Installing:
 compat-openssl11                                    x86_64                        1:1.1.1k-5.el9.1                           appstream                        1.5 M
 glibc-devel                                         x86_64                        2.34-245.el9                               appstream                         37 k
 glibc-headers                                       x86_64                        2.34-245.el9                               appstream                        546 k
 ksh                                                 x86_64                        3:1.0.6-14.el9                             appstream                        876 k
 libasan                                             x86_64                        11.5.0-14.el9                              appstream                        407 k
 liblsan                                             x86_64                        11.5.0-14.el9                              appstream                        184 k
 librdmacm                                           x86_64                        61.0-2.el9                                 baseos                            73 k
 libvirt-libs                                        x86_64                        11.10.0-2.el9                              appstream                        5.5 M
 make                                                x86_64                        1:4.3-8.el9                                baseos                           536 k
 sysstat                                             x86_64                        12.5.4-9.el9                               appstream                        482 k
Upgrading:
 libibverbs                                          x86_64                        61.0-2.el9                                 baseos                           480 k
 policycoreutils                                     x86_64                        3.6-4.el9                                  baseos                           238 k
 policycoreutils-python-utils                        noarch                        3.6-4.el9                                  appstream                         75 k
 python3-policycoreutils                             noarch                        3.6-4.el9                                  appstream                        2.1 M
Installing dependencies:
 kernel-headers                                      x86_64                        5.14.0-665.el9                             appstream                        2.4 M
 libxcrypt-devel                                     x86_64                        4.4.18-3.el9                               appstream                         29 k
 lm_sensors-libs                                     x86_64                        3.6.0-10.el9                               appstream                         42 k
 pcp-conf                                            x86_64                        6.3.7-6.el9                                appstream                         31 k
 pcp-libs                                            x86_64                        6.3.7-6.el9                                appstream                        647 k

Transaction Summary
=====================================================================================================================================================================
Install  15 Packages
Upgrade   4 Packages

Total download size: 16 M
Downloading Packages:
(1/19): compat-openssl11-1.1.1k-5.el9.1.x86_64.rpm                                                                                   2.2 MB/s | 1.5 MB     00:00
(2/19): librdmacm-61.0-2.el9.x86_64.rpm                                                                                              111 kB/s |  73 kB     00:00
(3/19): make-4.3-8.el9.x86_64.rpm                                                                                                    814 kB/s | 536 kB     00:00
(4/19): glibc-devel-2.34-245.el9.x86_64.rpm                                                                                          174 kB/s |  37 kB     00:00
(5/19): ksh-1.0.6-14.el9.x86_64.rpm                                                                                                  2.8 MB/s | 876 kB     00:00
(6/19): kernel-headers-5.14.0-665.el9.x86_64.rpm                                                                                     4.4 MB/s | 2.4 MB     00:00
(7/19): glibc-headers-2.34-245.el9.x86_64.rpm                                                                                        944 kB/s | 546 kB     00:00
(8/19): liblsan-11.5.0-14.el9.x86_64.rpm                                                                                             1.3 MB/s | 184 kB     00:00
(9/19): libasan-11.5.0-14.el9.x86_64.rpm                                                                                             2.2 MB/s | 407 kB     00:00
(10/19): lm_sensors-libs-3.6.0-10.el9.x86_64.rpm                                                                                     220 kB/s |  42 kB     00:00
(11/19): libxcrypt-devel-4.4.18-3.el9.x86_64.rpm                                                                                     118 kB/s |  29 kB     00:00
(12/19): pcp-conf-6.3.7-6.el9.x86_64.rpm                                                                                             694 kB/s |  31 kB     00:00
(13/19): pcp-libs-6.3.7-6.el9.x86_64.rpm                                                                                             3.6 MB/s | 647 kB     00:00
(14/19): sysstat-12.5.4-9.el9.x86_64.rpm                                                                                             2.6 MB/s | 482 kB     00:00
(15/19): policycoreutils-3.6-4.el9.x86_64.rpm                                                                                        1.3 MB/s | 238 kB     00:00
(16/19): policycoreutils-python-utils-3.6-4.el9.noarch.rpm                                                                           696 kB/s |  75 kB     00:00
(17/19): libibverbs-61.0-2.el9.x86_64.rpm                                                                                            1.1 MB/s | 480 kB     00:00
(18/19): libvirt-libs-11.10.0-2.el9.x86_64.rpm                                                                                       5.5 MB/s | 5.5 MB     00:00
(19/19): python3-policycoreutils-3.6-4.el9.noarch.rpm                                                                                6.3 MB/s | 2.1 MB     00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                4.0 MB/s |  16 MB     00:03
CentOS Stream 9 - BaseOS                                                                                                             1.6 MB/s | 1.6 kB     00:00
Importing GPG key 0x8483C65D:
 Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
 Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                             1/1
  Upgrading        : policycoreutils-3.6-4.el9.x86_64                                                                                                           1/23
  Running scriptlet: policycoreutils-3.6-4.el9.x86_64                                                                                                           1/23
  Upgrading        : python3-policycoreutils-3.6-4.el9.noarch                                                                                                   2/23
  Upgrading        : libibverbs-61.0-2.el9.x86_64                                                                                                               3/23
  Installing       : pcp-conf-6.3.7-6.el9.x86_64                                                                                                                4/23
  Installing       : pcp-libs-6.3.7-6.el9.x86_64                                                                                                                5/23
  Installing       : lm_sensors-libs-3.6.0-10.el9.x86_64                                                                                                        6/23
  Installing       : kernel-headers-5.14.0-665.el9.x86_64                                                                                                       7/23
  Installing       : glibc-headers-2.34-245.el9.x86_64                                                                                                          8/23
  Installing       : libxcrypt-devel-4.4.18-3.el9.x86_64                                                                                                        9/23
  Installing       : glibc-devel-2.34-245.el9.x86_64                                                                                                           10/23
  Installing       : sysstat-12.5.4-9.el9.x86_64                                                                                                               11/23
  Running scriptlet: sysstat-12.5.4-9.el9.x86_64                                                                                                               11/23
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /usr/lib/systemd/system/sysstat.service.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-collect.timer → /usr/lib/systemd/system/sysstat-collect.timer.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-summary.timer → /usr/lib/systemd/system/sysstat-summary.timer.

  Installing       : librdmacm-61.0-2.el9.x86_64                                                                                                               12/23
  Upgrading        : policycoreutils-python-utils-3.6-4.el9.noarch                                                                                             13/23
  Installing       : libvirt-libs-11.10.0-2.el9.x86_64                                                                                                         14/23
  Installing       : liblsan-11.5.0-14.el9.x86_64                                                                                                              15/23
  Installing       : libasan-11.5.0-14.el9.x86_64                                                                                                              16/23
  Installing       : ksh-3:1.0.6-14.el9.x86_64                                                                                                                 17/23
  Running scriptlet: ksh-3:1.0.6-14.el9.x86_64                                                                                                                 17/23
  Installing       : compat-openssl11-1:1.1.1k-5.el9.1.x86_64                                                                                                  18/23
  Installing       : make-1:4.3-8.el9.x86_64                                                                                                                   19/23
  Cleanup          : policycoreutils-python-utils-3.6-3.el9.noarch                                                                                             20/23
  Cleanup          : python3-policycoreutils-3.6-3.el9.noarch                                                                                                  21/23
  Running scriptlet: policycoreutils-3.6-3.el9.x86_64                                                                                                          22/23
  Cleanup          : policycoreutils-3.6-3.el9.x86_64                                                                                                          22/23
  Cleanup          : libibverbs-57.0-2.el9.x86_64                                                                                                              23/23
  Running scriptlet: libibverbs-57.0-2.el9.x86_64                                                                                                              23/23
  Verifying        : librdmacm-61.0-2.el9.x86_64                                                                                                                1/23
  Verifying        : make-1:4.3-8.el9.x86_64                                                                                                                    2/23
  Verifying        : compat-openssl11-1:1.1.1k-5.el9.1.x86_64                                                                                                   3/23
  Verifying        : glibc-devel-2.34-245.el9.x86_64                                                                                                            4/23
  Verifying        : glibc-headers-2.34-245.el9.x86_64                                                                                                          5/23
  Verifying        : kernel-headers-5.14.0-665.el9.x86_64                                                                                                       6/23
  Verifying        : ksh-3:1.0.6-14.el9.x86_64                                                                                                                  7/23
  Verifying        : libasan-11.5.0-14.el9.x86_64                                                                                                               8/23
  Verifying        : liblsan-11.5.0-14.el9.x86_64                                                                                                               9/23
  Verifying        : libvirt-libs-11.10.0-2.el9.x86_64                                                                                                         10/23
  Verifying        : libxcrypt-devel-4.4.18-3.el9.x86_64                                                                                                       11/23
  Verifying        : lm_sensors-libs-3.6.0-10.el9.x86_64                                                                                                       12/23
  Verifying        : pcp-conf-6.3.7-6.el9.x86_64                                                                                                               13/23
  Verifying        : pcp-libs-6.3.7-6.el9.x86_64                                                                                                               14/23
  Verifying        : sysstat-12.5.4-9.el9.x86_64                                                                                                               15/23
  Verifying        : libibverbs-61.0-2.el9.x86_64                                                                                                              16/23
  Verifying        : libibverbs-57.0-2.el9.x86_64                                                                                                              17/23
  Verifying        : policycoreutils-3.6-4.el9.x86_64                                                                                                          18/23
  Verifying        : policycoreutils-3.6-3.el9.x86_64                                                                                                          19/23
  Verifying        : policycoreutils-python-utils-3.6-4.el9.noarch                                                                                             20/23
  Verifying        : policycoreutils-python-utils-3.6-3.el9.noarch                                                                                             21/23
  Verifying        : python3-policycoreutils-3.6-4.el9.noarch                                                                                                  22/23
  Verifying        : python3-policycoreutils-3.6-3.el9.noarch                                                                                                  23/23

Upgraded:
  libibverbs-61.0-2.el9.x86_64    policycoreutils-3.6-4.el9.x86_64    policycoreutils-python-utils-3.6-4.el9.noarch    python3-policycoreutils-3.6-4.el9.noarch
Installed:
  compat-openssl11-1:1.1.1k-5.el9.1.x86_64    glibc-devel-2.34-245.el9.x86_64        glibc-headers-2.34-245.el9.x86_64      kernel-headers-5.14.0-665.el9.x86_64
  ksh-3:1.0.6-14.el9.x86_64                   libasan-11.5.0-14.el9.x86_64           liblsan-11.5.0-14.el9.x86_64           librdmacm-61.0-2.el9.x86_64
  libvirt-libs-11.10.0-2.el9.x86_64           libxcrypt-devel-4.4.18-3.el9.x86_64    lm_sensors-libs-3.6.0-10.el9.x86_64    make-1:4.3-8.el9.x86_64
  pcp-conf-6.3.7-6.el9.x86_64                 pcp-libs-6.3.7-6.el9.x86_64            sysstat-12.5.4-9.el9.x86_64

Complete!


[root@centos9 ~]# yum install nfs-utils-2.5.4
Last metadata expiration check: 0:07:11 ago on Wed 28 Jan 2026 01:30:17 PM GMT.
Dependencies resolved.
============================================================================================================
 Package                      Architecture         Version                       Repository            Size
============================================================================================================
Installing:
 nfs-utils                    x86_64               1:2.5.4-41.el9                baseos               460 k
Installing dependencies:
 gssproxy                     x86_64               0.8.4-7.el9                   baseos               110 k
 libev                        x86_64               4.33-6.el9                    baseos                52 k
 libnfsidmap                  x86_64               1:2.5.4-41.el9                baseos                62 k
 libverto-libev               x86_64               0.3.2-3.el9                   baseos                14 k
 rpcbind                      x86_64               1.2.6-7.el9                   baseos                58 k
 sssd-nfs-idmap               x86_64               2.9.7-5.el9                   baseos                37 k

Transaction Summary
============================================================================================================
Install  7 Packages

Total download size: 793 k
Installed size: 1.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): libnfsidmap-2.5.4-41.el9.x86_64.rpm                                  147 kB/s |  62 kB     00:00
(2/7): gssproxy-0.8.4-7.el9.x86_64.rpm                                      253 kB/s | 110 kB     00:00
(3/7): libev-4.33-6.el9.x86_64.rpm                                          115 kB/s |  52 kB     00:00
(4/7): libverto-libev-0.3.2-3.el9.x86_64.rpm                                111 kB/s |  14 kB     00:00
(5/7): rpcbind-1.2.6-7.el9.x86_64.rpm                                       330 kB/s |  58 kB     00:00
(6/7): sssd-nfs-idmap-2.9.7-5.el9.x86_64.rpm                                202 kB/s |  37 kB     00:00
(7/7): nfs-utils-2.5.4-41.el9.x86_64.rpm                                    1.0 MB/s | 460 kB     00:00
------------------------------------------------------------------------------------------------------------
Total                                                                       554 kB/s | 793 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                    1/1
  Installing       : libnfsidmap-1:2.5.4-41.el9.x86_64                                                  1/7
  Running scriptlet: rpcbind-1.2.6-7.el9.x86_64                                                         2/7
  Installing       : rpcbind-1.2.6-7.el9.x86_64                                                         2/7
  Running scriptlet: rpcbind-1.2.6-7.el9.x86_64                                                         2/7
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service → /usr/lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket → /usr/lib/systemd/system/rpcbind.socket.

  Installing       : libev-4.33-6.el9.x86_64                                                            3/7
  Installing       : libverto-libev-0.3.2-3.el9.x86_64                                                  4/7
  Installing       : gssproxy-0.8.4-7.el9.x86_64                                                        5/7
  Running scriptlet: gssproxy-0.8.4-7.el9.x86_64                                                        5/7
  Running scriptlet: nfs-utils-1:2.5.4-41.el9.x86_64                                                    6/7
  Installing       : nfs-utils-1:2.5.4-41.el9.x86_64                                                    6/7
  Running scriptlet: nfs-utils-1:2.5.4-41.el9.x86_64                                                    6/7
  Installing       : sssd-nfs-idmap-2.9.7-5.el9.x86_64                                                  7/7
  Running scriptlet: sssd-nfs-idmap-2.9.7-5.el9.x86_64                                                  7/7
  Verifying        : gssproxy-0.8.4-7.el9.x86_64                                                        1/7
  Verifying        : libev-4.33-6.el9.x86_64                                                            2/7
  Verifying        : libnfsidmap-1:2.5.4-41.el9.x86_64                                                  3/7
  Verifying        : libverto-libev-0.3.2-3.el9.x86_64                                                  4/7
  Verifying        : nfs-utils-1:2.5.4-41.el9.x86_64                                                    5/7
  Verifying        : rpcbind-1.2.6-7.el9.x86_64                                                         6/7
  Verifying        : sssd-nfs-idmap-2.9.7-5.el9.x86_64                                                  7/7

Installed:
  gssproxy-0.8.4-7.el9.x86_64         libev-4.33-6.el9.x86_64           libnfsidmap-1:2.5.4-41.el9.x86_64
  libverto-libev-0.3.2-3.el9.x86_64   nfs-utils-1:2.5.4-41.el9.x86_64   rpcbind-1.2.6-7.el9.x86_64
  sssd-nfs-idmap-2.9.7-5.el9.x86_64

Complete!
[root@centos9 ~]#


Create group 
groupadd -g 54320 oper
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 backupdba
groupadd -g 54324 dgdba
groupadd -g 54325 kmdba
groupadd -g 54326 racdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin


Group Purposes:

oinstall: Oracle Inventory group (primary)
dba: Database Administrator (SYSDBA)
oper: Database Operator (SYSOPER)
backupdba: Backup and Recovery (SYSBACKUP)
dgdba: Data Guard (SYSDG)
kmdba: Encryption Key Management (SYSKM)
racdba: Real Application Clusters



useradd -u 54321 -g oinstall -G dba,backupdba,dgdba,kmdba,racdba,oper,asmdba oracle




 useradd -u 54321 -g oinstall -G dba,backupdba,dgdba,kmdba,racdba,oper,asmdba oracle



[root@centos9 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.

[root@centos9 ~]#



[root@centos9 ~]# id -a oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54320(oper),54322(dba),54323(backupdba),54324(dgdba),54325(kmdba),54326(racdba),54327(asmdba)
[root@centos9 ~]#




tee -a /etc/security/limits.conf << 'EOF'
# Oracle Database resource limits
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 28835840
oracle hard memlock 28835840
EOF


===
check the values 

cat /etc/security/limits.conf

# Oracle Database resource limits
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 28835840
oracle hard memlock 28835840


[root@centos9 /]# pwd
/



[root@centos9 ~]# mkdir -p /u01/app/oracle/product/23.26.0/db_1


chown -R oracle:oinstall /u01
chmod -R 775 /u01

cd /home/oracle/

SQL> !ls -ltr /home/oracle

-rw-r--r--. 1 oracle oinstall 2406058543 Jan 28 12:54 LINUX.X64_2326100_db_home.zip
-rw-r--r--. 1 oracle oinstall      19862 Jan 28 13:40 dbca26.rsp


    
[root@centos9 ~]# cd /u01/app/oracle/product/23.26.0/db_1


unzip -q /home/oracle/LINUX.X64_2326100_db_home.zip


[oracle@centos9 db_1]$ ./runInstaller &






/u01/app/oracle/product/23.26.0/db_1/root.sh6.0/db_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/23.26.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.




Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO


SQL> !echo $ORACLE_HOME
/u01/app/oracle/product/23.26.0/db_1

[oracle@centos9 admin]$ pwd
/u01/app/oracle/product/23.26.0/db_1/network/admin
[oracle@centos9 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/23.26.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = centos9.lan)(PORT = 1521))


ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = centos9.lan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

[oracle@centos9 admin]$


SQL> show parameter local

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
local_listener                       string      LISTENER_ORCL
parallel_force_local                 boolean     FALSE
SQL> !tnsping LISTENER_ORCL

TNS Ping Utility for Linux: Version 23.26.1.0.0 - Production on 28-JAN-2026 14:14:18

Copyright (c) 1997, 2026, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/23.26.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (ADDRESS = (PROTOCOL = TCP)(HOST = centos9.lan)(PORT = 1521))
OK (10 msec)

SQL>



*********************************************************************************
-rw-r--r--. 1 oracle oinstall      19862 Jan 28 13:40 dbca26.rsp
[root@centos9 oracle]# cat dbca26.rsp
####################################################################
## Copyright(c) Oracle Corporation 1998,2025. All rights reserved.##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.                                                        ##
##                                                                ##
## IMPORTANT NOTE: This file contains plain text passwords and    ##
## should be secured to have read permission only by oracle user  ##
## or db administrator who owns this installation.                ##
##                                                                ##
####################################################################

#------------------------------------------------------------------------------
# Do not change the following system generated value.
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v23.0.0

#-------------------------------------------------------------------------------
# Specify the installation option.
# It can be one of the following:
#   - INSTALL_DB_SWONLY
#   - INSTALL_DB_AND_CONFIG
#
# Deprecated: oracle.install.option
#-------------------------------------------------------------------------------
installOption=INSTALL_DB_AND_CONFIG

#-------------------------------------------------------------------------------
# Specify the Unix group to be set for the inventory directory.
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall

#-------------------------------------------------------------------------------
# Specify the location which holds the inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/u01/app/oraInventory


#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Base.
#-------------------------------------------------------------------------------
ORACLE_BASE=/u01/app/oracle

#-------------------------------------------------------------------------------
# Specify the installation edition of the component.
#
# The value should contain only one of these choices.

#   - EE     : Enterprise Edition
#
# Deprecated: oracle.install.db.InstallEdition
#-------------------------------------------------------------------------------
installEdition=EE

###############################################################################
#                                                                             #
# PRIVILEGED OPERATING SYSTEM GROUPS                                          #
# ------------------------------------------                                  #
# Provide values for the OS groups to which SYSDBA and SYSOPER privileges     #
# needs to be granted. If the install is being performed as a member of the   #
# group "dba", then that will be used unless specified otherwise below.       #
#                                                                             #
# The value to be specified for OSDBA and OSOPER group is only for UNIX based #
# Operating System.                                                           #
#                                                                             #
###############################################################################
#------------------------------------------------------------------------------
# The OSDBA is the OS group which is to be granted SYSDBA privileges.
#
# Deprecated: oracle.install.db.OSDBA_GROUP
#-------------------------------------------------------------------------------
OSDBA=dba

#------------------------------------------------------------------------------
# The OSOPER is the OS group which is to be granted SYSOPER privileges.
# The value to be specified for OSOPER group is optional.
#
# Deprecated: oracle.install.db.OSOPER_GROUP
#------------------------------------------------------------------------------
OSOPER=

#------------------------------------------------------------------------------
# The OSBACKUPDBA is the OS group which is to be granted SYSBACKUP privileges.
#
# Deprecated: oracle.install.db.OSBACKUPDBA_GROUP
#------------------------------------------------------------------------------
OSBACKUPDBA=backupdba

#------------------------------------------------------------------------------
# The OSDGDBA is the OS group which is to be granted SYSDG privileges.
#
# Deprecated: oracle.install.db.OSDGDBA_GROUP
#------------------------------------------------------------------------------
OSDGDBA=dgdba

#------------------------------------------------------------------------------
# The OSKMDBA is the OS group which is to be granted SYSKM privileges.
#
# Deprecated: oracle.install.db.OSKMDBA_GROUP
#------------------------------------------------------------------------------
OSKMDBA=kmdba

#------------------------------------------------------------------------------
# The OSRACDBA is the OS group which is to be granted SYSRAC privileges.
#
# Deprecated: oracle.install.db.OSRACDBA_GROUP
#------------------------------------------------------------------------------
OSRACDBA=racdba

################################################################################
#                                                                              #
#                      Root script execution configuration                     #
#                                                                              #
################################################################################
#-------------------------------------------------------------------------------------------------------
# Specify the root script execution mode.
#
#   - true  : To run the root script automatically by using the appropriate configuration methods.
#   - false : To run the root script manually.
#
# If this option is selected, password should be specified on the console.
#
# Deprecated: oracle.install.db.rootconfig.executeRootScript
#-------------------------------------------------------------------------------------------------------
executeRootScript=

#--------------------------------------------------------------------------------------
# Specify the configuration method to be used for automatic root script execution.
#
# Following are the possible choices:
#   - ROOT
#   - SUDO
#
# Deprecated: oracle.install.db.rootconfig.configMethod
#--------------------------------------------------------------------------------------
configMethod=

#--------------------------------------------------------------------------------------
# Specify the absolute path of the sudo program.
#
# Applicable only when SUDO configuration method was chosen.
#
# Deprecated: oracle.install.db.rootconfig.sudoPath
#--------------------------------------------------------------------------------------
sudoPath=

#--------------------------------------------------------------------------------------
# Specify the name of the user who is in the sudoers list.
# Applicable only when SUDO configuration method was chosen.
# Note:For Single Instance database installations,the sudo user name must be the username of the user installing the database.
#
# Deprecated: oracle.install.db.rootconfig.sudoUserName
#--------------------------------------------------------------------------------------
sudoUserName=

###############################################################################
#                                                                             #
#                               Grid Options                                  #
#                                                                             #
###############################################################################
#------------------------------------------------------------------------------
# Value is required only if the specified install option is INSTALL_DB_SWONLY
#
# Specify the cluster nodes to deploy Enterprise Edition Real Application
# Cluster Database Oracle Home software.
#
# Example : clusterNodes=node1,node2
#
# Deprecated: oracle.install.db.CLUSTER_NODES
#------------------------------------------------------------------------------
clusterNodes=

###############################################################################
#                                                                             #
#                        Database Configuration Options                       #
#                                                                             #
###############################################################################
#-------------------------------------------------------------------------------
# Specify the type of database to create.
# It can be one of the following:
#   - GENERAL_PURPOSE
#   - DATA_WAREHOUSE
# GENERAL_PURPOSE: A starter database designed for general purpose use or transaction-heavy applications.
# DATA_WAREHOUSE : A starter database optimized for data warehousing applications.
#
# Deprecated: oracle.install.db.config.starterdb.type
#-------------------------------------------------------------------------------
dbType=GENERAL_PURPOSE

#-------------------------------------------------------------------------------
# Specify the Starter Database Global Database Name.
#
# Deprecated: oracle.install.db.config.starterdb.globalDBName
#-------------------------------------------------------------------------------
gdbName=orcl

#-------------------------------------------------------------------------------
# Specify the Starter Database SID.
#
# Deprecated: oracle.install.db.config.starterdb.SID
#-------------------------------------------------------------------------------
dbSID=orcl

#-------------------------------------------------------------------------------
# Specify the Pluggable Database name for the pluggable database in Container Database.
#
# Deprecated: oracle.install.db.config.PDBName
#-------------------------------------------------------------------------------
pdbName=orclpdb

#-------------------------------------------------------------------------------
# Specify the Starter Database character set.
#
#  One of the following
#  AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2,
#  EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257,
#  BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6,
#  AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8,
#  IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE,
#  KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950,
#  ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258
#
# Deprecated: oracle.install.db.config.starterdb.characterSet
#-------------------------------------------------------------------------------
charSet=AL32UTF8

#------------------------------------------------------------------------------
# This variable should be set to true if Automatic Memory Management
# in Database is desired.
# If Automatic Memory Management is not desired, and memory allocation
# is to be done manually, then set it to false.
#
# Deprecated: oracle.install.db.config.starterdb.memoryOption
#------------------------------------------------------------------------------
enableAutoMemoryManagement=false

#-------------------------------------------------------------------------------
# Specify the total memory allocation for the database. Value(in MB) should be
# at least 256 MB, and should not exceed the total physical memory available
# on the system.
# Example: memoryLimit=512
#
# Deprecated: oracle.install.db.config.starterdb.memoryLimit
#-------------------------------------------------------------------------------
memoryLimit=7778

###############################################################################
#                                                                             #
# Passwords can be supplied for the following four system accounts in the     #
# starter database:                                                           #
#   SYS                                                                       #
#   SYSTEM                                                                    #
#   DBSNMP (used by Enterprise Manager)                                       #
#   PDBADMIN                                                                  #
#                                                                             #
# Same password can be used for all accounts (not recommended)                #
# or different passwords for each account can be provided (recommended)       #
#                                                                             #
###############################################################################
#------------------------------------------------------------------------------
# This variable holds the password that is to be used for all schemas in the
# starter database.
#
# Deprecated: oracle.install.db.config.starterdb.password.ALL
#-------------------------------------------------------------------------------
allSchemaPassword=

#-------------------------------------------------------------------------------
# Specify the SYS password for the starter database.
#
# Deprecated: oracle.install.db.config.starterdb.password.SYS
#-------------------------------------------------------------------------------
sysPassword=

#-------------------------------------------------------------------------------
# Specify the SYSTEM password for the starter database.
#
# Deprecated: oracle.install.db.config.starterdb.password.SYSTEM
#-------------------------------------------------------------------------------
systemPassword=

#-------------------------------------------------------------------------------
# Specify the DBSNMP password for the starter database.
# Applicable only when managementOption=CLOUD_CONTROL
#
# Deprecated: oracle.install.db.config.starterdb.password.DBSNMP
#-------------------------------------------------------------------------------
dbsnmpPassword=

#-------------------------------------------------------------------------------
# Specify the PDBADMIN password required for creation of Pluggable Database in the Container Database.
#
# Deprecated: oracle.install.db.config.starterdb.password.PDBADMIN
#-------------------------------------------------------------------------------
pdbadminPassword=

#-------------------------------------------------------------------------------
# Specify the management option to use for managing the database.
# Options are:
# 1. CLOUD_CONTROL - If you want to manage your database with Enterprise Manager Cloud Control.
# 2. NONE   -If you do not want to manage your database with Enterprise Manager Cloud Control.
#
# Deprecated: oracle.install.db.config.starterdb.managementOption
#-------------------------------------------------------------------------------
managementOption=DEFAULT

#-------------------------------------------------------------------------------
# Specify the OMS host to connect to Cloud Control.
# Applicable only when managementOption=CLOUD_CONTROL
#
# Deprecated: oracle.install.db.config.starterdb.omsHost
#-------------------------------------------------------------------------------
omsHost=

#-------------------------------------------------------------------------------
# Specify the OMS port to connect to Cloud Control.
# Applicable only when managementOption=CLOUD_CONTROL
#
# Deprecated: oracle.install.db.config.starterdb.omsPort
#-------------------------------------------------------------------------------
omsPort=0

#-------------------------------------------------------------------------------
# Specify the EM Admin user name to use to connect to Cloud Control.
# Applicable only when managementOption=CLOUD_CONTROL
#
# Deprecated: oracle.install.db.config.starterdb.emAdminUser
#-------------------------------------------------------------------------------
emAdminUser=

#-------------------------------------------------------------------------------
# Specify the EM Admin password to use to connect to Cloud Control.
# Applicable only when managementOption=CLOUD_CONTROL
#
# Deprecated: oracle.install.db.config.starterdb.emAdminPassword
#-------------------------------------------------------------------------------
emAdminPassword=

###############################################################################
#                                                                             #
# SPECIFY RECOVERY OPTIONS                                                        #
# ------------------------------------                                            #
# Recovery options for the database can be mentioned using the entries below  #
#                                                                             #
###############################################################################
#------------------------------------------------------------------------------
# This variable is to be set to false if database recovery is not required. Else
# this can be set to true.
#
# Deprecated: oracle.install.db.config.starterdb.enableRecovery
#-------------------------------------------------------------------------------
enableRecovery=false

#-------------------------------------------------------------------------------
# Specify the type of storage to use for the database.
# It can be one of the following:
#   - FILE_SYSTEM_STORAGE
#   - ASM_STORAGE
#
# Deprecated: oracle.install.db.config.starterdb.storageType
#-------------------------------------------------------------------------------
storageType=FILE_SYSTEM_STORAGE

#-------------------------------------------------------------------------------
# Specify the database file location which is a directory for datafiles, control
# files, redo logs.
#
# Applicable only when storageType=FILE_SYSTEM_STORAGE
#
# Deprecated: oracle.install.db.config.starterdb.fileSystemStorage.dataLocation
#-------------------------------------------------------------------------------
dataLocation=/u01/app/oracle/oradata

#-------------------------------------------------------------------------------
# Specify the recovery location.
#
# Applicable only when storageType=FILE_SYSTEM_STORAGE
#
# Deprecated: oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation
#-------------------------------------------------------------------------------
recoveryLocation=

#-------------------------------------------------------------------------------
# Specify the existing ASM disk groups to be used for storage.
#
# Applicable only when storageType=ASM_STORAGE
#
# Deprecated: oracle.install.db.config.asm.diskGroup
#-------------------------------------------------------------------------------
diskGroup=

#-------------------------------------------------------------------------------
# Specify the password for ASMSNMP user of the ASM instance.
#
# Applicable only when storageType=ASM_STORAGE
#
# Deprecated: oracle.install.db.config.asm.ASMSNMPPassword
#-------------------------------------------------------------------------------
asmsnmpPassword=[root@centos9 oracle]#








======================

Version                   TNSLSNR for Linux: Version 23.26.1.0.0 - Production
SQL> !lsnrctl start

LSNRCTL for Linux: Version 23.26.1.0.0 - Production on 02-MAR-2026 12:36:11

Copyright (c) 1991, 2026, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/23.26.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 23.26.1.0.0 - Production
System parameter file is /u01/app/oracle/product/23.26.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/centos9/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos9.lan)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))



Oracle DBA

anuj blog Archive