ORA-00210 ORA-00202 - Missing controlfiles (and redologs)
November 8, 2017
Connection Reset using ORACLE JDBC
June 14, 2017
- The JVM tries to list all the files in the /tmp (or alternate tmp directory set by -Djava.io.tmpdir) when SecureRandom.nextBytes(byte[]) is invoked. If the number of files is large the method takes a long time to respond and hence cause the server to timeout
- The method void nextBytes(byte[]) uses /dev/random on Linux and on some machines which lack the random number generating hardware the operation slows down to the extent of bringing the whole login process to a halt. Ultimately the the user encounters SQLException("Io exception: Connection reset")
Change TFA default OSWATCHER parameters
May 26, 2017
By default, after TFA installation OSWATCHER runs with:
> ps -edf | grep -i osw
... /bin/sh ./OSWatcher.sh 30 48 ...
Meaning that a snapshot is made every 30 minutes and kept for 48 hours.
Since this 48 hours seem to be insufficient for a problem detection/analysis so I wanted to double it, but nowhere on tfactl was I able to find any way to change it.
Looking into the file $TFA_BASE/$hostname/tfa_home/ext/oswbb/oswbb.pm
Where $TFA_BASE is the path you specified when install TFA:
Enter a location for installing TFA (/tfa will be appended if not supplied) [/root/tfa]
I found that a file called .osw.prop is being read to get the values for the variables:
my $tool = "oswbb";
my $tfa_base = tfactlshare_get_tfa_base($tfa_home);
..
my $tool_base = catfile($tfa_base, "suptools", "$hostname", $tool, $current_user);
my $osw_prop = catfile($tool_base, ".osw.prop");
..
if ( -f $osw_prop )
{
open(ORF, $osw_prop);
while(
{
if ( ! $interval && /interval=(\d+)/ )
{
$interval = $1;
}
elsif ( ! $hours && /hours=(\d+)/ )
{
$hours = $1;
}
elsif ( ! $zip && /zip=(.*)/ )
The location of the file is not clear since it is given by the function tfactlshare_get_tfa_base, so:
find . -name ".osw.prop"
And the file is found in:
> $TFA_BASE/repository/suptools/$hostname/oswbb/$current_user/.osw.prop
Note: after know this the file is easily found by checking the archive location of the running process:
[root@hostname root]# ps -edf | grep -i osw
root 31662 1 0 20:57 pts/0 00:00:00 /bin/sh ./OSWatcher.sh 30 48 NONE /oracle/products/tfa/repository/suptools/hostname/oswbb/root/archive
Having located the file is just a matter of editing it:
> cat $TFA_BASE/repository/suptools/$hostname/oswbb//$current_user/.osw.prop
interval=30
hours=48
zip=NONE
runuser=oracle
> vi $TFA_BASE/repository/suptools/$hostname/oswbb//$current_user/.osw.prop
> cat $TFA_BASE/repository/suptools/$hostname/oswbb//$current_user/.osw.prop
interval=30
hours=96
zip=NONE
runuser=oracle
> tfactl stop oswbb
> tfactl start oswddb
And now the values are modified.
> ps -edf | grep -i osw
... /bin/sh ./OSWatcher.sh 30 96 ...
I think there should be a easier way to do this: Making this change in a cluster environment we'll need to run it in all nodes of the cluster.
"Pipeculiar" WHILE behavior in ShellScript
December 13, 2013
command | while read var1 var2 ...; do
# process each line, using variables as parsed into $var1, $var2, etc
# (note that this is a subshell: var1, var2 etc will not be available
# after the while loop terminates)
done
user@localhost:[/tmp]$ while read line; do var="$line"; echo "Inside: $var"; done < $FICH
Inside: this is dog
user@localhost:[/tmp]$ echo "Outside: $var"
Outside: this is dog
user@localhost:[/tmp]$
A pipe is there to hook the stdout of one program to the stdin or another one. Two processes, possibly two shells.
When you do redirection (> and <), all you are doing is remapping stdin (or stdout) to a file. reading/writing a file can be done without another process or shell.
[C#] How to calculate multiple DateTime average
September 23, 2011
After googling around I couldn't find any good solution for the problem.
Found a few suggestions of converting a DateTime value into ticks that could work. But given a large enough number of DateTimes there isn't a data type big enough to hold the cumulative value needed to calculate the average, since there are 10.000k ticks in a second.
So, took a little shortcut and used an identical approach with seconds instead:
public DateTime averageDateTime(List
{
double totalSec = 0;
for (int i = 0; i < collection.Count(); i++)
{
TimeSpan ts = collection[i].Subtract(DateTime.MinValue);
totalSec += ts.TotalSeconds;
}
double averageSec = totalSec / collection.Count();
DateTime averageDateTime = DateTime.MinValue.AddSeconds(averageSec);
return averageDateTime;
}
Solved!
Etiquetas: c#
Get Your Site Up and Running!
March 4, 2008
Want to have an online Website? There are just a few things you have to do before going online.
- Your Site
If you are building a website you must have a purpose! Weather it be boost your sales, expose a product or a service, share information of any kind, etc...
So this is the first step, having a purpose.
Also, you should think what you want from having an online website. Specially if it's a commercial website. Set your goals for short and long term.
You already know what your website will be about, now you should define the information it will have. Short simple texts about your business/activity and a few photos are a great starting point.
By now you have the purpose and the stuff you want to have online! Time to start the real deal.
The following topics are not in the correct order (there's no correct order...). If you are an absolute beginner i'll recommend getting in touch with the person/company that will be responsible for the creation of the website first.
- Domain Name
A domain name is pretty much a word that identifies a computer (or for our purpose a website) on the internet. e.g. blogspot.com
Choosing the domain is a critical step because it will be how your site will be known online!
In a perfect world your domain should be the name of your company, but by any reason, that word can be unavailable (some registered it before you) and you'll have to choose another...
You can use Domain Tools to check if a domain is available, or if not, who has it.
After choosing a domain, you have to register it, and for that you need a Domain Name Registrars, someone who will register the domain in your name. Check this list of the ICANN accredited registrars.
- Hosting
At the same time who seek the perfect domain, you can also search for web hosting. Online space where you can store your website. There are plenty of hosting services to choose around.
But the type of hosting you need depend of what kind of site you want.
- Web designer
If you can't build your own site, you'll need some who do it for you. You need a web designer!
It can be a person or a company, it will help you out through the whole process of creating your website.
Personal Note:
I provide all the above services, so if there you have any question ask right away!
Anonymity on Internet
February 24, 2008
As the role of internet in our day-to-day life increases, both at the professional and individual level, there's a factor that is gaining "new" importance, anonymity.
An user must be able to both be completely anonymous, for regular mainly browsing, and on the other hand, be able to complete prove that "he is who he says he is", especially in order to use some services and secure communication.
Off course, there are those who can argue that if the identify of the user is always know, the internet environment would be much safer; Avoiding countless cases of psychological violence, virtual bullies, etc...
Actions that most users wouldn't do if they weren't behind a mask (nickname) that can be changed at will.
But with the creation of such an environment wouldn't we be destroying internet's essence, the last "free world" where anyone can be whatever they want?
We know as a fact that behind this layer of anonymity there are several illegal acts both against people and entities; Society rules still didn't penetrate many online bastions.
But also, what's considered illegal in one region isn't in other. And internet is the tool that provides a world-wide standard in terms of liberty and freedom of speech. Giving many people the possibilities online that they are denied in there own countries.
Bottom line, internet should be boundary free; Being society responsible for equipping users with a moral and ethical code to be used both in the online world and on "real life". Ultimately, internet users are the ones who have to decide what internet will be!