Saturday, June 29, 2013

Oracle Database 12c Release 1

Oracle Database 12cR1 Released ..

URL :  http://www.oracle.com/technetwork/database/enterprise-edition/overview/index.html




The Learn More Page contains the OBE and videos (inclding :  

Oracle Multitenant Architecture )




Friday, June 14, 2013

ssh Password Less Login

Follow the below steps to perform the ssh passwordless login,

1.Login to the Server and run the below to generate the Key pair.

Sri> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sri/.ssh/id_rsa):
Created directory '/home/sri/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sri/.ssh/id_rsa.
Your public key has been saved in /home/sri/.ssh/id_rsa.pub.
The key fingerprint is:
7y:74:10:98:25:06:17:d7:49:b7:u2:46:2i:jc:10:92 sri@beetle
The key's randomart image is:
+--[ RSA 2048]----+
|          ++B=oo=|
|         oE+..+.*|
|        . o  o = |
|         . o  . o|
|        S + .  . |
|         . o     |
|                 |
|                 |
|                 |
+-----------------+

2. The Private Keys gets genenrated .The Public Key gets created in the "/home/sri/.ssh/id_rsa.pub". 

Sri> cat /home/sri/.ssh/id_rsa.pub

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAouNqZ7+sK0P2zjf+y6pM1CY4jCZTD+CVzfjYyiAB7VhpIkn70MiPiNcbbrNCmIr4v+9U64Mm4ioAz9V4WJOhZ6+1/QLMhPpIhZcq7D1wfc26xU/b4moyzzygX8WaNd2D1XRX5JZMEcz/ir4C6wTFG9lL9Y9iKkKK2/sJHYGCDHJemxsw9wY4gH1fvrfdY/1M/rG4OOMrHsp9s6PB+1v+G7lEIHozDkPBDZx0ypSM4YNKZR6ddPt+GpcWU0RlS9X0eMeFljtWawmr1W90p/KeqwxQaVhl6YVZnQw1dJ0T5YUQIEhQcHJdJpbOfkN962D8dGJYGnjnTN2vJw83xoB/CQ== sri@beetle

3.To perform the Login without the Password copy the Public Key content (output is One line ) to the ".ssh/authorized_keys" on the remote System .
   The copy to the remote system can be done using scp or you can use the ssh as below

Sri> ssh remote -l sri "echo ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAouNqZ7+sK0P2zjf+y6pM1CY4jCZTD+CVzfjYyiAB7VhpIkn70MiPiNcbbrNCmIr4v+9U64Mm4ioAz9V4WJOhZ6+1/QLMhPpIhZcq7D1wfc26xU/b4moyzzygX8WaNd2D1XRX5JZMEcz/ir4C6wTFG9lL9Y9iKkKK2/sJHYGCDHJemxsw9wY4gH1fvrfdY/1M/rG4OOMrHsp9s6PB+1v+G7lEIHozDkPBDZx0ypSM4YNKZR6ddPt+GpcWU0RlS9X0eMeFljtWawmr1W90p/KeqwxQaVhl6YVZnQw1dJ0T5YUQIEhQcHJdJpbOfkN962D8dGJYGnjnTN2vJw83xoB/CQ== sri@beetle  >>~/.ssh/authorized_keys"

Enter the password when its prompted and the authorised_keys of Remote system is updated and now you can login without Password to the remote system.

Monday, February 4, 2013

Testing : sh -u : Unbound variable

Today came across a good feature "-u" in shell. This will make the script to error when it comes across a undefined variable. If otherwise ,the undefined variable will expanded to nothing,

Running the script with "-u" option checks for the variables is not defined then throws the error "unbound variable"

Lets do it with a example,


$ cat t.sh
TEST=""
echo "Test"
echo $TEST

Running the script with "-u" option,

$ sh -u t.sh
Test



Now removing the Variable assignment and running the script,

$ cat t.sh
echo "Test"
echo $TEST


$ sh -u t.sh
Test
t.sh: line 5: TEST: unbound variable

Monday, August 27, 2012

MySQL - 3 : Working on the Installed MySQL

Login and check the Database created in the First Post on MySQL -1


  • Go to the MySQL Workbench and find the mysql.exe
  • Login to the MySQL using the below command in the command prompt



C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.42>mysql.exe -u root -p
Enter password: ****
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.5.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

  • Now we can list the default Databases using the command,
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
| world              |
+--------------------+
5 rows in set (0.00 sec)

  • To use a Database and list the tables in the Database use the below commands,
mysql> USE test;
Database changed

mysql> SHOW tables;
Empty set (0.00 sec)

mysql> USE world;
Database changed

mysql> SHOW tables;
+-----------------+
| Tables_in_world |
+-----------------+
| city            |
| country         |
| countrylanguage |
+-----------------+
3 rows in set (0.00 sec)

mysql> DESCRIBE city;
+-------------+----------+------+-----+---------+----------------+
| Field       | Type     | Null | Key | Default | Extra          |
+-------------+----------+------+-----+---------+----------------+
| ID          | int(11)  | NO   | PRI | NULL    | auto_increment |
| Name        | char(35) | NO   |     |         |                |
| CountryCode | char(3)  | NO   |     |         |                |
| District    | char(20) | NO   |     |         |                |
| Population  | int(11)  | NO   |     | 0       |                |
+-------------+----------+------+-----+---------+----------------+
5 rows in set (0.03 sec)


  • Creating a Database ,table and changing the Storage engine of the created database.
mysql> create database sri;
Query OK, 1 row affected (0.01 sec)

mysql> USE sri;
Database changed
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sri                |
| test               |
| world              |
+--------------------+
6 rows in set (0.00 sec)

mysql> create table test (name varchar(20),age number);
ERROR 1064 (42000): You have an error in your SQL syntax; check
r)' at line 1
mysql> create table test (name varchar(20),age int);
Query OK, 0 rows affected (0.01 sec)

mysql> show tables;
+---------------+
| Tables_in_sri |
+---------------+
| test          |
+---------------+
1 row in set (0.00 sec)

mysql>


mysql> describe test;
+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| name  | varchar(20) | YES  |     | NULL    |       |
| age   | int(11)     | YES  |     | NULL    |       |
+-------+-------------+------+-----+---------+-------+
2 rows in set (0.01 sec)

mysql> alter table test ENGINE = InnoDB;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

  • To View the available Plugins and engines,
mysql> show plugins;
+-----------------------+----------+--------------------+---------+---------+
| Name                  | Status   | Type               | Library | License |
+-----------------------+----------+--------------------+---------+---------+
| binlog                | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| mysql_native_password | ACTIVE   | AUTHENTICATION     | NULL    | GPL     |
| mysql_old_password    | ACTIVE   | AUTHENTICATION     | NULL    | GPL     |
| CSV                   | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| MEMORY                | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| MyISAM                | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| MRG_MYISAM            | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| ARCHIVE               | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| BLACKHOLE             | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| FEDERATED             | DISABLED | STORAGE ENGINE     | NULL    | GPL     |
| InnoDB                | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| INNODB_TRX            | ACTIVE   | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCKS          | ACTIVE   | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCK_WAITS     | ACTIVE   | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP            | ACTIVE   | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP_RESET      | ACTIVE   | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM         | ACTIVE   | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM_RESET   | ACTIVE   | INFORMATION SCHEMA | NULL    | GPL     |
| PERFORMANCE_SCHEMA    | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| partition             | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
+-----------------------+----------+--------------------+---------+---------+
20 rows in set (0.04 sec)




In the next post will see on the structures ...

MySQL - 1 : MySQL Installation


Installing the MySQL in Windows,
Download the MySQL  Software and install it as below,
If you don't have the required softwares for MySQL to run then it will pop up the dialog box and will request you to install.











I have created one more user apart from root and given the role "DB Admin"










Completed the installation of the MySQL in Windows.









Thursday, August 23, 2012

MySQL - 2 : MYSQL Tools Installation


Installing MySQL Tools  in Windows

Download  MySQL  Tools from :  http://dev.mysql.com/downloads/gui-tools/5.0.html

For Windows :


Click on the Downloaded .msi file and follow the screenshot ,


 Accept the Agreement and click on Next 








Wednesday, August 22, 2012

ODI : Reset SUPERVISOR Password

After the Creation of the Master Repository and import of the repository zip from the different ODI Repositroy, the password of the SUPERVISOR gets set to the one of the ZIP file.
So it will pop up the below error while trying to login after the import :


oracle.odi.core.security.BadCredentialsException: Incorrect ODI username or password
at oracle.odi.core.security.SecurityManager.doODIInternalAuthentication(SecurityManager.java:392)
at oracle.odi.core.security.SecurityManager.createAuthentication(SecurityManager.java:260)
at oracle.odi.ui.docking.panes.OdiCnxFactory$1.run(OdiCnxFactory.java:214)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
at java.lang.Thread.run(Thread.java:662)

To reset the password of the SUPERVISOR follow the below steps,

  • Login to the MREP schema in the Database.
  • Select the SNP_USER table to verify the username.
  • Using the encode.sh ,create a encrypted password.
  • Update the SNP_USER Table with the Password generated using the encode.sh for the SUPERVISOR user.
  • Now, login to the ODI GUI .