Sunday, August 23, 2015

To install subversion client in ubuntu

To install subversion client in ubuntu

  1. Install the subversion commandline tool using sudo apt-get install subversion.
  2. Use the client by typing the command svn command [options] [args].
  3. Do not do anything else. The server will not start and you can happily use the client without the server. You will also not have GUI access.
The subversion package
includes the Subversion client (svn), repository administration tools (svnadminsvnlook) and a network server (svnserve).
Installing the whole packages (including both server and client) might seem like a lot of overhead, but it is the most easily maintainable solution. You easily get future updates, security releases and more. Also if ever one of your users desperately needs a subversion server, it is only a few commands away.
Use svn --version for the modules included:
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme
and use svn --help for more information. The available commands illustrate that the subversion package is the way to go.
   add
   blame (praise, annotate, ann)
   cat
   changelist (cl)
   checkout (co)
   cleanup
   ...

Sunday, August 16, 2015

Installing Oracle client libraries on Ubuntu

The latest RPM files can be downloaded from Oracle instant client download section.
The three minimal RPMs required are “Basic”“SQLPlus” and the “SDK”.
In case of Ubuntu 14.04 LTS, Intel on 64-bit we will need to download the files mentioned below:
  • oracle-instantclient12.1-basic-*.x86_64.rpm
  • oracle-instantclient12.1-sqlplus-*.x86_64.rpm
  • oracle-instantclient12.1-devel-*.x86_64.rpm
Note: The asterisk (*) would be the latest version available for download.
Convert and Install
The RPM filess need to be converted from .rpm to .deb, you’ll need to use the commandline tool alien. I the tool is not already installed it needs to be installed as shown bellow:
Now convert and install the packages in this order:
Now test the client libs using the sqlplus commandline tool. Use either sqlplus or sqlplus64 depending on your platform:
Replace the connection string with the appropriate parameters.
If you get an error message “missing libaio.so.1 file”, run:
If you get an error message “sqlplus64: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory”, then you need to add it to the system library list. To do so you need to locate the Oracle liberaries path, which would be something like:
/usr/lib/oracle/12.1/client64/lib/
Now, add this path to the system library list. CREATE and ADD the line to a NEW file:
Add inside the path:
/usr/lib/oracle/12.1/client64/lib/
Run now the dynamic linker run-time bindings utility:
For any further errors or issues while trying to run sqlplus, please refer the Ubuntu help page.

Wednesday, August 5, 2015

Parameters File in Oracle

A Parameter is a key Value Pair
i.e db_block_size, db_name each contain a value in a files.

Types of parameter:

tns.ora parameter files: There are some parameters related to network. This file maps the net services to connect with network.

Listener.ora Parameter: is a file tells on which port to be connected for accessing DB.

Database parameters: its known as init.ora. It consists the parameters that required to start the database. Normally init.ora file reside with the name concating with the Site Identifier Name(SID). If the database SID is XE. then the init file name is initXE.ora. If we check this file we will get some parameters which suggest how the database will be configured.[Its like the blueprint of a home]. It contains some default parameters. But there parameters are the basic parameters must be in this file is Control File, DB_BLOCK_SIZE, DB_NAME. As this file is needed for the start of the database, we can use it as:

startup pfile=initXE.ora


We can change the name of the init.ora file for different types of requirements. Sometimes it makes confusion for multiple existence of the same file. Another problem is as this file is editable using text editor, for any unwanted mistake file may not be  updated with the correct value. Then for the corrupted file, DB wont start up properly. To get rid from such type of problem, starting from the Oracle 9i, Oracle introduces another file called SP file[System Parameter]. It may reside only one copy and another things its a binary file. And you are not able to change it manually. Only oracle can modify it. and for modifying it we next execute command for it. All the parameters are saved in a dynamic performance table named v$parameter. To get the value of a parameter, after connecting to DB through sqlplus, we can execute


desc v$parameter;

in this file we will get more than 250 parameters.

Select value from v$parameter where name='sql_trace'; || or || show parameter sql_trace


We can modify the value of parameter. And for the effecting it we can follow two steps:

alter system set sql_trace=true scope=memory;

using the above query, we are changing the parameter value until the running the database.

scope memory: until the instance will be shutdown
scope sp file: it will preserve the value in the SP file. It will be effected after restartigng the database
scope both: it will effect the change immediately in all places


In two ways we can get back after corruption of SP file. By using the unix command strings, we can get all those key value pairs those can be stored init.ora file. We can start database through it. And after that we can create SP file from it.

Whenever a database start all the non default parameter are put into a file named alert.log From that file we can check those. From that file we can create a (anyname.)ora file, and after starting using this file we can create SP fiel from the init file.

Tuesday, August 4, 2015

File system in Oracle Database

Different types of database files.

1.Parameter Files:  It tells how the instance is configured that how big the SGA. at the start up data base, it uses the parameter file for  configurations. It also tells how my Database process in the DB writer.

2. Data files: This stores all of the data of user. Such as tables, table data are being consisted by Data files. Its a operating system file. Each database must contain at least one datafile.

3. Redo log files:  Its the transaction log of database. When any operation is being performed at database, then a transaction is being created at Redo log files. Using Redo log files we can recover the Database for instance or media failure. It contains all the information for revert back of database.

4. Control Files: It tells the instance where the datafiles and redo log files exist. Instance read the control files information to locate where those files. For the importance of its role, 4 copy of control files are saved. Its called Multiplexing of control files.

5.Temp Files:  For
 the temporary requirement of some operation, instance need some temporary storage. Temp files arrange that space. i.e for order by query processing purpose, it might be needed.


6. Password Files: its used to authenticate users performing administrative [Start up/ Shut down Database]task over network.

7. Trace Files/Alert Log: There are many background process running behind the database. For various purpose to get the status of those process, we can take help of trace files. As for unexpected error or failure, trace file contain the status of those services.