SQL Date time Functions (Command)

select sysdate from dual; select to_char(sysdate,’MM’) pdate from dual; select to_char(sysdate,’MM-DD’) pdate from dual; select to_char(sysdate,’MM-DD-YYYY’) pdate from dual; select to_char(sysdate,’MM-DD-YYYY HH24′) pdate from dual; select to_char(sysdate,’MM-DD-YYYY HH24:MI’) pdate from dual; select to_char(sysdate,’MM-DD-YYYY HH24:MI:SS’) pdate from dual; select CURRENT_DATE from dual;

SQL Command for Character Functions Returning Character Values

SELECT INITCAP(‘the soap bangladesh’) “Capitals” FROM DUAL; SELECT LOWER(‘MR. SCOTT MCMILLAN’) “Lowercase” FROM DUAL; SELECT UPPER(‘asraf’) “Uppercase” FROM dual; select concat(‘Jewel’,’ Asraf’) from dual; SELECT SUBSTR(‘MR.JEWEL’,4,5) FROM DUAL; SELECT length(‘MR.JEWEL’) FROM DUAL; SELECT instr(‘MR.JEWEL’,’.’) FROM DUAL; select LPAD(121331, 12, ‘0’) “LPAD” from dual; select lpad(sal,6,’0′) from emp; select RPAD(121331, 12, ‘0’) “LPAD” from dual; select rpad(ename,20,’-Oracle Student’) from emp; SELECT […]

SQL Command Single-Row Functions

SELECT ABS(-15) “Absolute” FROM DUAL; Absolute ———- 15 select ceil(268651.1) from dual; SELECT FLOOR(15.9) “Floor” FROM DUAl; SELECT ROUND(15.193,2) “Round” FROM DUAL; SELECT MOD(11,4) “Modulus” FROM DUAL; SELECT TRUNC(15.79,1) “Truncate” from dual; SELECT ceil(15.197) “ceil”,FLOOR(15.197)”FLOOR”, ROUND(15.197,2) “Round”,MOD(15.197,2) “Modulus” ,TRUNC(15.197,2) “Truncate” FROM DUAL;

Enable syslogd to Accept Remote Messages on Loghosts Only

Is this machine the central log server for your organization? If so, edit the file /etc/sysconfig/syslog. Add or correct the following line: SYSLOGD_OPTIONS=”-m 0 -r -s example.com “ Where example.com is the name of your domain. If the machine is not a log server, edit /etc/sysconfig/syslog, and instead add or correct the line: SYSLOGD_OPTIONS=”-m 0″ By default, RHEL5’s syslog does […]

Send Linux server Logs to a Remote Loghost

Edit /etc/syslog.conf. Add or correct the line: *.*                        @loghost.example.com Where loghost.example.com is the name of your central log server. It is particularly important that logs be stored on the local host in addition to being sent to the loghost, because syslogd uses the UDP protocol to send messages over […]

How to Set Password Expiration Parameters in Linux ?

Edit the file /etc/login.defs to specify password expiration settings for new accounts.Add or correct the following lines: PASS_MAX_DAYS 60 PASS_MIN_DAYS 7 PASS_MIN_LEN 14 PASS_WARN_AGE 7 For each existing human user USER , modify the current expiration settings to match these: # chage -M 60 -m 7 -W 7 USER Users should be forced to change their passwords, in order to […]

How to Recover Mikrotik Admin password ?

Recover Mikrotik Admin password from BACKUP file using Linux Login to your Ubuntu / Linux Machine , Download mikrotik password recovery tool from blew link and compile it by following commands, Password Recovery Tool —————————————————————————————— 1. mkdir /temp 2. cd /temp 3. wget http://manio.skyboo.net/mikrotik/mtpass-0.7.tar.bz2 4. tar jxvf mtpass-0.7.tar.bz2 5. cd mtpass-0.7 6. make ——————————————————————————————–

Create Mikrotik Hotspot Server Step by Step Configuration

In this article I will how to setup Mikrotik Hotspot  Server with different profiles. First we will configure the interface that is connected to WAN. /ip address add address= network= broadcast= interface=ether1 Now we will configure second interface for our Local Network. / ip address add address= network= broadcast= interface=ether2 Next we will setup our DNS server. Goto IP > DNS […]