If you want to merge files into one file. You can use copy command. For example, you have a directory as name testdir and 10 csv files in testdir. Open cmd prompt. C:> copy file1.csv+file2.csv+file3.csv commonfile.csv
How to Add Standby Logfile in Oracle
If you want to use real-time apply Oracle Data Guard, you have to add standby logfile to standby database. Show Logfiles Before Add SQL> select * from gv$logfile; INST_ID GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE 1 3 ONLINE +DATA/testdb/onlinelog/group_3.14134123 NO 1 1 ONLINE +DATA/testdb/onlinelog/group_1.35116731 NO 1 2 ONLINE +DATA/testdb/onlinelog/group_2.32513245 NO 1 4 ONLINE +DATA/testdb/onlinelog/group_4.12255335 NO 1…
Python Commands and Functions
Take value from user. input(“Enter a number : “) raw_input(“Enter a character : “) Counters range(100) # write from 0 to 100 range(100,200) # write from 100 to 200 range(100,200,2) # write from 100 to 200 as 2 by 2 len(“Fatih”) # character count result 5 File and Directory Operations listdir(“/home”/) # list all file…
Mail Send With Python
Mail Send Function | File name : sender.py import string import smtplib from email.mime.text import MIMEText def mailSend(subject,content): mailserver = “192.168.5.2” # Mail Server IP Address mail = MIMEText(content) mail[“From”] = “fromaddress@example.com” mail[“To”] = “toaddress@example.com” mail[“Subject”] = subject gonder = smtplib.SMTP(mailserver) gonder.sendmail(mailfrom,mailto,mail.as_string()) gonder.quit() Notification Example for Disk Status Check | File name : diskcheck.py from…
Oracle Data Pump (expdp and impdp) in Oracle
Oracle Data Pump is faster and more flexible alternative to the “exp” and “imp” backup system used in previous Oracle versions. impdp and expdp commands use Oracle Directory for processing of backups. Create Directory CONN SYS AS SYSDBA CREATE OR REPLACE DIRECTORY dirname AS ‘/u01/backup/’; GRANT READ, WRITE ON DIRECTORY dirname TO backupuser; Tables Export…
Random Character Generator in Oracle
Oracle dbms_random package can generate random characters in character, numeric or alphanumeric formats. dbms_random.value(Parameter, Value) U – Upper case L – Lower case A – Alphanumeric X – Alphanumeric with upper case alphabets. P – Printable characters only. Create Random Characters SQL> select dbms_random.random value from dual; Value : 531879542 SQL> select dbms_random.value from dual;…
Python Programing Language Structure
Python supports multiple programming paradigms, including object-oriented, imperative and functional programming styles. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl. Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts….
Oracle Data File Occupancy in Oracle
Size of Oracle Data Files can be max 32 GB. If you are not chech data files sizes, The system can give an error when size of data files arrive max extent. You can solve this problem with adding a new data file in tablespace. But this state is not a good. You have to…
Oracle ASM Disks Occupancy in Oracle
If you want to show Oracle ASM Disks occupancy, you can use dictionary views. You can use below command for result. ASM Disk Occupancy Query SQL> select name, 100-trunc(100*free_mb/total_mb) occupancy, trunc((total_mb-free_mb)/1024) used, total_mb/1024 total from v$asm_diskgroup;
Oracle Data Guard Timeliness Status in Oracle
If you use Oracle Data Guard, you have to check timeliness status every time. The below query will give to timeliness status. The differences between results have to be 1-2 when you use real time apply Data Guard. Otherwise, your Data Guard is not real time and has a problem. Timeliness Status Query SQL> SELECT…