Posts

Showing posts from August, 2020
Sometimes you detect some proccess running on your machine, and you need to know which port is it using This example is for Red Hat 4.4.7-23, but i think it would work on any linux machine I'm going to tell you some ways to achive that point 1st netstat -ltnp IN below example you can see ip:port in 4th column linked in last column with PID, for example program tnslsnr running under PID 36996 is using 10.94.3.69:1521 socket as you can see below: #/home/oracle> netstat -ltnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:21135 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN - tcp 0 0 10.94.3.66:1521 0.0.0.0:* LISTEN 29937/tnslsnr tcp 0 0 10.94.3.58:1521 0.0.0.0:*

Sybase database occupation

Sybase database occupation script set nocount on declare @pgsize float --select @pgsize = (1048576. / v.low) from master.dbo.spt_values v where v.number = 1 and v.type = 'E' select @pgsize = 1048576 / @@maxpagesize select 'DbName' = substring(d.name, 1, 30), 'Usage' = convert(varchar(15),substring(m.description, 1, 14)), 'Size' = convert(varchar(13),right(space(13) + convert(varchar(10),convert(decimal(10,1), sum(u.size) / @pgsize)),10) + ' Mo'), --'Used' = convert(varchar(13),right(space(10) + convert(varchar(10),convert(numeric(10,1), 'Used' = convert(varchar(13),right(space(10) + convert(varchar(10),convert(decimal(10,1), sum(size - convert(float,curunreservedpgs(d.dbid,u.lstart, u.unreservedpgs))) / @pgsize)),10) + ' Mo'), 'Free' = convert(varc

Create a physical standby database using RMAN DUPLICATE FROM ACTIVE DATABASE

guide on how to create a physical standby database using RMAN DUPLICATE FROM ACTIVE DATABASE command without shutting down the primary and using primary active database files (No need to take a backup) 1. Make the necessary changes to the primary database. a. Enable force logging. b. Creating the password file if one does not exist. c. Create standby redologs. d. Modify the parameter file suitable for Dataguard. 2. Ensure that the sql*net connectivity is working fine. 3. Create the standby database over the network using the active(primary) database files. a. Create the password file b. Create the initialization parameter file for the standby database (auxiliary database) c. Create the necessary mount points or the folders for the database files d. Run the standby creation ON STANDBY by connecting to primary as target database. DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE SPFILE PARAMETER_VALUE_CONVERT '', '' SET DB_FILE_N