Generally there
would be a number of post counter with blogger archive widget. If you don’t want
to show the number of posts against each month/year you can use the following
method to hide the counter.
How to Hide / Remove ‘Subscribe to: Post Comments (Atom)‘ From the New Blogger Interface 2013
Subscribe to: Post Comments (Atom) is the link for subscribing the atom feeds from the blog
posts. It generally comes under the each and every blog post. It is consumes
some space under each and every post and it is not relevant for the blogs much.
You can follow the below method to remove / hide this Subscribe to: Post Comments (Atom) link.
Shell Script to Execute Oracle Sql Script in Crontab for a Specified SID
For general shell
script to execute SQL statements does not require the environment as those
required parameter might be set already for the sessions. But when it comes to Crontab
job, script will run independently from other sessions and it needs all the required
parameter to be set inside the script.
What are the
required parameters to run a SQL in a Crontab shell script?
How to Automate / Schedule Oracle Gather Table Statistics Job through Crontab?
Step 1: Create a shell script to accept a
sql file and execute against a particular database. Make necessary changes to
the ORACLE_SID, ORACLE_BASE, ORACLE_HOME parameters.
$ vi sql.sh
export ORACLE_SID=transprd
export
ORACLE_BASE=/u00/app/oracle
export
ORACLE_HOME=/u00/app/oracle/product/11.2.0.3/db_1
export
SQL Loader bad file vs Discard File: Difference and Examples
BAD File
contains the records which are rejected either by SQL Loader or by the database
because of the bad formatting or data type mismatch.
DISCARD file is
to store the records that are neither inserted into table nor rejected as bad. This is an optional parameter with
SQL Loader and by default name would be .dsc.
Oracle SQL Loader Bad file (.bad) Parameter Example
The BAD parameter specifies the name of bad
file created by SQL*Loader to store the records that rejected during the insert
process because of the data type mismatch or improper format. If the file name
is not specified, by default the SQL*Loader will take the .bad
as the file name. If you specify the bad file name with parameter bad then it
will override the default file name. See some examples below.
Shell Script: 3 Methods to Find Out Nth Word in a String
Here is my test
string - This is a temporary change to complete the export. I wanted to find
out nth word from the string. I have
specified the nth word in red color below
$
mystring="This is a temporary change to complete the export"
Method 1 – awk – 4th
word
Shell Script: Different Method to Find Out Number of Characters in a String
To count total number of characters in a
string
Count
total number of
$
mystring="This is my test string"
$
echo "${#mystring}"
22
$
expr length "$mystring"
22
Shell Script to Print Only First / Last Words in all Lines of a Text File
I have a text file and I wanted to print
only first and last words of the file.
My sample input file is with following data
$ cat dat
MONTH YYYY WK Mo Tu We Th Fr Sa Su
01-JAN 2013 01 01 02 03 04 05 06
01-JAN 2013 02 07 08
09 10 11 12 13
01-JAN 2013 03 14 15
16 17 18 19 20
Data Guard / Standby: ORA-01156: recovery or flashback in progress may need access to files
Error Description:
In standby or Data guard the clear logfile group, drop logfile group commands are failing with following error.
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 1;
ALTER DATABASE CLEAR LOGFILE GROUP 1
*
ERROR at line 1:
How to see / Check the Step by Step Execution of a Shell Script for Debugging?
It is very important have the step by step execution feature for debugging for any kind of programming language. Using this feature you can see the variable values which are getting assigned during the script execution. In shell script you can use the –x option to see the step by step execution. See an example here.
I have a sample program here.
How to Set / Unset Default Value for Command Line Arguments For a shell script?
While doing shell scripting you will use command line arguments to pass the values to the program. The program has to verify the value of the command line arguments whether it is having proper values assigned before further execution. Otherwise you can assign a default value for the parameter or argument if applicable.
Syntax:
Shell Script to Repeat the Execution of Command / Job Based on Time Interval Periodically
Suppose if you are copying some huge files from server to another server and you wanted to see the progress in size, number you can use these scripts. These scripts will run periodically according to the sleep commands.
Using yes Command
Data guard / Stand by: What are the Steps to Move Datafiles / Logfiles to Different Location?
Primary database Steps
1. Confirm your primary database instance where you wanted to perform the activity
SQL> select name from v$database;
NAME
---------
TRANPRD
Data Guard / Standby: ORA-01624: log %s needed for crash recovery of instance %s (thread %s)
Error Description:
Drop redo log group in data guard database is giving following error.
SQL> alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance TRANPRD_STANDBY (thread 1)
ORA-00312: online log 1 thread 1:
Fix DGMGRL: Warning: ORA-16826: apply service state is inconsistent with the DelayMins property
Error Description:
Show configuration command shows following warning in DGMGRL.
DGMGRL> show configuration
Configuration - PRDCONFIG
Protection Mode: MaxAvailability
Databases: