My Blog

October 16, 2008

can you take a backup from solaris and use it on windows NT?

Filed under: Oracle — by enotebook @ 10:06 am

I was asked such a question – can you take a backup from solaris and use it on windows NT? Of course, the answer is NO. why?
We can use rman convert only for Os with same endian format. Oracle has a v$ view holding such information.
SQL> select platform_name, endian_format from v$transportable_platform;
PLATFORM_NAME ENDIAN_FORMAT
———————————————————- ————–
Solaris OE (32-bit) Big
Solaris OE (64-bit) Big
Microsoft Windows IA (32-bit) Little
Linux IA (32-bit) Little
AIX-Based Systems (64-bit) Big
HP-UX (64-bit) Big
HP Tru64 UNIX Little
HP-UX IA (64-bit) Big
Linux IA (64-bit) Little
HP Open VMS Little
Microsoft Windows IA (64-bit) Little
IBM zSeries Based Linux Big
Linux 64-bit for AMD Little
Apple Mac OS Big
Microsoft Windows 64-bit for AMD Little
Solaris Operating System (x86) Little
Solaris is big endian and windows is small endian and hence rman convert will not work in this scenario.
Simple summary:
1) Microsoft and linux are little endian,
2) IBM Soalris and Apple are big endian
3) HP tru and open are little endian but 64 bit are BIG endian

Advertisements

October 15, 2008

ORA-07445 with ORA-03113: end-of-file on communication channel

Filed under: Oracle — by enotebook @ 5:21 pm

I was encountering an error when executing a SQL query on a development server, which is ORA-03113: end-of-file on communication channel. After the investigation i found it’s caused by an Oracle bug – bug No. 4517291. Here is the process to solve this problem.

$ tail -n 10 alert_orcl.log
Completed: alter tablespace test add datafile
‘/u01/oradata/orcl/test02.dbf’ size 20M
Wed Oct 15 04:39:49 2008
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_25786.trc:
ORA-07445: exception encountered: core dump
[Address not mapped to object] [0x0] [] []
Wed Oct 15 04:40:14 2008
Thread 1 advanced to log sequence 5
Current log# 1 seq# 5 mem# 0: /u01/oradata/orcl/redo01.log
Wed Oct 15 04:41:24 2008
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_25788.trc:
ORA-07445: exception encountered: core dump
[Address not mapped to object] [0x0] [] []
$ cd ../udump/
$ ls -alth |grep *25788*
-rw-r—– 1 oracle oinstall 2.6M Oct 15 04:41 orcl_ora_25788.trc
$ head -n 100 *25788*
/u01/app/oracle/admin/orcl/udump/orcl_ora_25788.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 –
Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /u01/app/oracle/product/10g/db
System name: Linux
Node name: LinuxOra.andy.com
Release: 2.6.9-55.ELsmp
Version: #1 SMP Fri Apr 20 17:03:35 EDT 2007
Machine: i686
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 19
Unix process pid: 25788, image: oracle@LinuxOra.andy.com]oracle@LinuxOra.andy.com (TNS V1-V3)
*** 2008-10-15 04:41:24.389
*** SERVICE NAME:(SYS$USERS) 2008-10-15 04:41:24.388
*** SESSION ID:(148.278) 2008-10-15 04:41:24.388
Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to
object), addr: 0x0, PC: [0x95450df, evaopn2()+209]
Registers:
%eax: 0x0000065c %ebx: 0xb72cf65c %ecx: 0xb72c8b34
%edx: 0x2bbb0210 %edi: 0x09545081 %esi: 0x00000000
%esp: 0xbfffc130 %ebp: 0xbfffc2ec %eip: 0x095450df
%efl: 0x00210246
evaopn2()+198 (0x95450d4) add $8,%esp
evaopn2()+201 (0x95450d7) mov 0xffffffd8(%ebp),%ebx
evaopn2()+204 (0x95450da) jmp 0x9545072
evaopn2()+206 (0x95450dc) mov 0x28(%edx),%esi
> evaopn2()+209 (0x95450df) mov (%esi),%edi
evaopn2()+211 (0x95450e1) movzw 0x4(%esi),%esi
evaopn2()+215 (0x95450e5) mov (%edi,%ecx),%edi
evaopn2()+218 (0x95450e8) mov %esi,0xfffffff0(%ebp)
evaopn2()+221 (0x95450eb) mov %edi,0xfffffff8(%ebp)
*** 2008-10-15 04:41:24.391
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump
[Address not mapped to object] [0x0] [] []
Current SQL statement for this session:
select * from ( select user_id, displ, created, profile from t where
user_id = 5 and displ in (0,1) order by displ desc, created desc)
where rownum <= 15
—– Call Stack Trace —–
calling call entry argument values
in hex
location type point (? means dubious
value)
——————– ——– ——————– —————-
————
ksedst()+27 call ksedst1() 1 ? 1 ?
ksedmp()+557 call ksedst() 1 ? 8164444 ?
B7488F40 ?

Go to Oracle metalink and search the realated information, i found this article – Doc ID: NOTE:421013.1 Summary Of Bugs Containing ORA- 07445 , then follow the guide to identify the root problem. In the end i downloaded patch p4517291 and apply it, problem got resolved.

Restore database with damaging data files,control files and redo logs

Filed under: Oracle — by enotebook @ 12:06 pm

Think about a scenario – One day your database crashed, all the data files, controls files and redo logs(in case you didn’t multiplex them anyway) are damaged, fortunately you do have all the archived logs on hand and with a backup set of data files that you even don’t know when they have been backed-up, is your database able to be restored? This post does the test and gives you a glance on restoration process of oracle database.

SQL> startup
ORACLE instance started.
Total System Global Area 247463936 bytes
Fixed Size 1218772 bytes
Variable Size 79693612 bytes
Database Buffers 163577856 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.

Ensure database is running on archive mode.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1
SQL> select name from v$tablespace;
NAME
——————————
SYSTEM
UNDOTBS1
SYSAUX
USERS
TEMP
SQL> select name from v$datafile;
NAME
——————————————————————————–
/u01/oradata/orcl/system01.dbf
/u01/oradata/orcl/undotbs01.dbf
/u01/oradata/orcl/sysaux01.dbf
/u01/oradata/orcl/users01.dbf

Have the data files to be backed-up.
SQL> alter tablespace system begin backup;
Tablespace altered.
SQL> alter tablespace undotbs1 begin backup;
Tablespace altered.
SQL> alter tablespace sysaux begin backup;
Tablespace altered.
SQL> alter tablespace users begin backup;
Tablespace altered.
SQL> host
[oracle@LinuxOra oradata]$ cd /u01/oradata/
[oracle@LinuxOra oradata]$ ls
orcl
[oracle@LinuxOra oradata]$ mkdir orclbak
[oracle@LinuxOra oradata]$ cp orcl/* orclbak/
[oracle@LinuxOra oradata]$ exit
exit
SQL> alter tablespace system end backup;
Tablespace altered.
SQL> alter tablespace undotbs1 end backup;
Tablespace altered.
SQL> alter tablespace sysaux end backup;
Tablespace altered.
SQL> alter tablespace users end backup;
Tablespace altered.

Archive the logs
SQL> alter system switch logfile;
System altered.

Database is running and has being accepted lots of user’s transaction. Here we create a tablespace and a table.
SQL> create tablespace test datafile ‘/u01/oradata/orcl/test.dbf’ size 10M;
Tablespace created.
SQL> create table t tablespace test as select * from v$datafile;
Table created.
SQL> select count(*) from t;
COUNT(*)
———-
5

SQL> alter system switch logfile;
System altered.

It’s a good idea to always backup the control file to trace after any changes applied to database structure.
SQL> alter database backup controlfile to trace;
Database altered.

Find out the trace file and see its content, you might need to use it to re-create control file.
SQL> select spid from v$process where addr in (select s.paddr from v$session s, v$mystat m where s.sid = m.sid and rownum < 2);
SPID
————
24697
SQL> shutdown immediate
Database closed.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
[oracle@LinuxOra oradata]$ cd /u01/app/oracle/admin/orcl/udump/
$ ls |grep *24697*
orcl_ora_24697.trc
$ pwd
/u01/app/oracle/admin/orcl/udump
$ more 100 orcl_ora_24697.trc

Control file re-creation scripts
$ cd /u01/oradata
[oracle@LinuxOra oradata]$ touch ctl.sql
[oracle@LinuxOra oradata]$ vi ctl.sql
CREATE CONTROLFILE REUSE DATABASE “ORCL” RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ‘/u01/oradata/orcl/redo01.log’ SIZE 50M,
GROUP 2 ‘/u01/oradata/orcl/redo02.log’ SIZE 50M,
GROUP 3 ‘/u01/oradata/orcl/redo03.log’ SIZE 50M
— STANDBY LOGFILE
DATAFILE
‘/u01/oradata/orcl/system01.dbf’,
‘/u01/oradata/orcl/undotbs01.dbf’,
‘/u01/oradata/orcl/sysaux01.dbf’,
‘/u01/oradata/orcl/users01.dbf’
CHARACTER SET WE8ISO8859P1
;

Simulate damaging data files and control files (move them)
[oracle@LinuxOra oradata]$ ls
ctl.sql orcl orclbak

Lost data files.
[oracle@LinuxOra oradata]$ mv orcl orcl_latest

Restore backed-up data files to specified location.
[oracle@LinuxOra oradata]$ mv orclbak/ orcl
[oracle@LinuxOra oradata]$ ls
ctl.sql orcl orcl_latest
[oracle@LinuxOra oradata]$
[oracle@LinuxOra oradata]$ cd orcl
$ ls
control01.ctl control02.ctl control03.ctl redo01.log redo02.log redo03.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf

Damage control files.
$ mv control01.ctl control01.ctl.latest
$ mv control02.ctl control02.ctl.latest
$ mv control03.ctl control03.ctl.latest
$ ls
control03.ctl.latest redo01.log redo03.log system01.dbf undotbs01.dbf
control02.ctl.latest control01.ctl.latest redo02.log sysaux01.dbf temp01.dbf users01.dbf
$
$ exit
exit

Database cannot be mounted since losing of control files. they can be re-create, content in ctl.sql is from the trace file as showed above.
SQL> @/u01/oradata/ctl.sql;
Control file created.
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01100: database already mounted

After re-creating control files we can open database, but it needs recovery.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: ‘/u01/oradata/orcl/system01.dbf’

SQL> recover database using backup controlfile until cance;
ORA-00277: illegal option to the UNTIL recovery flag CANCE

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 887850 generated at 10/14/2008 14:59:50 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2008_10_14/o1_mf_1_1_%u_.arc
ORA-00280: change 887850 for thread 1 is in sequence #1

Specify log: {=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 887946 generated at 10/14/2008 15:02:30 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2008_10_14/o1_mf_1_2_%u_.arc
ORA-00280: change 887946 for thread 1 is in sequence #2
ORA-00278: log file
‘/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2008_10_14/o1_mf_1_1_4h9v67
29_.arc’ no longer needed for this recovery

ORA-00283: recovery session canceled due to errors
ORA-01244: unnamed datafile(s) added to control file by media recovery
ORA-01110: data file 5: ‘/u01/oradata/orcl/test.dbf’

ORA-01112: media recovery not started

ORA-01111: name for data file 5 is unknown – rename to correct file
ORA-01110: data file 5: ‘/u01/app/oracle/product/10g/db/dbs/UNNAMED00005’
ORA-01157: cannot identify/lock data file 5 – see DBWR trace file
ORA-01111: name for data file 5 is unknown – rename to correct file
ORA-01110: data file 5: ‘/u01/app/oracle/product/10g/db/dbs/UNNAMED00005’

ORA-01112: media recovery not started

After applying all the archived redo logs, we can see test tablespace has been restored, but the file name is incorrect since re-creatation of control file, for continue to restore data
base, oracle writes a UNAMED style filename to describe the data file in control file, rename it to correct file as error message showed.
SQL> alter database create datafile ‘/u01/app/oracle/product/10g/db/dbs/UNNAMED00005’ as ‘/u01/oradata/orcl/test.dbf’ reuse;
Database altered.

Open database with using resetlogs option.
SQL> alter database open resetlogs;
Database altered.
SQL> select count(*) from t
2 ;
COUNT(*)
———-
5

Done.

October 8, 2008

Encountered error when using Mysql ODBC client connects to server

Filed under: Mysql — by enotebook @ 3:50 pm

I actually got this error before while using Mysql ODBC client connects to Mysql server, however i did not note it down at once, so when i face the same problem i even don’t know how to fix it, surely it has been solved after doing some research, here i place a post as note.
Mysql ODBC driver: MySQL ODBC 3.51 Driver
Mysql Server version: MySQL Community Server 5.0.51a
Error message: Client does not support authentication protocol requested by server; consider upgrading MySQL client
MySQL 5.0 uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients, when using an older client to connect the server, you may get with the error message.
To solve the problem, it needs to issue a command to reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program like following:
mysql> SET PASSWORD FOR
-> [email=’some_user’@’some_host’] = OLD_PASSWORD(‘newpwd’);
Alternatively, use UPDATE and FLUSH PRIVILEGES:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD(‘newpwd’)
-> WHERE Host = ‘some_host’ AND User = ‘some_user’;
mysql> FLUSH PRIVILEGES;

Done.

September 25, 2008

Add new diskgroup in oracle rac

Filed under: Oracle — by enotebook @ 8:56 am

Host information – Linux & Oracle
$ uname -a
Linux rac1.andy.com 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
SQL> select * from v$version;
BANNER
—————————————————————-
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Prod
PL/SQL Release 10.2.0.1.0 – Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 – Production
NLSRTL Version 10.2.0.1.0 – Production
SQL>

Use sqlplus to connect ASM instance on node1(rac1). Check the value of instance_type to make sure it’s connecting to ASM instance
$ export ORACLE_SID=+ASM1
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 – Production on Wed Sep 24 16:03:19 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> show parameter instance_type;
NAME TYPE VALUE
———————————— ———– ——————————
instance_type string asm
SQL>

Check the raw devices to determine if they have been detected.
SQL> select path from v$asm_disk;
PATH
——————————————————————————–
/dev/raw/raw5 # detected – this is the newly bounded raw device
/dev/raw/raw4
/dev/raw/raw3
/dev/raw/raw2
4 rows selected.
If there is no newly bounded raw devices detected, try to modify the value of parameter – asm_diskstring, and re-check
SQL> show parameter asm_diskstring
NAME TYPE VALUE
———————————— ———– ——————————
asm_diskstring string
SQL> alter system set asm_diskstring=’/dev/raw/raw*’;
System altered.

Issue the command to create diskgroup
SQL> create diskgroup DG2 external redundancy disk ‘/dev/raw/raw5’;
Diskgroup created.
SQL> select group_number,name,state,total_mb from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TOTAL_MB
———— —————————— ———– ———-
1 DG1 MOUNTED 6134
2 RECOVERYDEST MOUNTED 2047
3 DG2 MOUNTED 3067
SQL>

Diskgroup mounted automatically on this node, but not mounted on node2, need to mount it manually.
$ ssh rac2
Last login: Wed Sep 24 16:00:05 2008 from rac1.andy.com
$ export ORACLE_SID=+ASM2
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 – Production on Wed Sep 24 17:08:31 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select group_number,name,state,total_mb from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TOTAL_MB
———— —————————— ———– ———-
1 DG1 MOUNTED 6134
2 RECOVERYDEST MOUNTED 2047
0 DG2 DISMOUNTED 0
SQL> alter diskgroup DG2 mount;
Diskgroup altered.
SQL> select group_number,name,state,total_mb from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TOTAL_MB
———— —————————— ———– ———-
1 DG1 MOUNTED 6134
2 RECOVERYDEST MOUNTED 2047
3 DG2 MOUNTED 3067
SQL>
Create tablespace.
SQL> create tablespace test datafile ‘+DG2/test.dbf’ size 10M;
Tablespace created.

Done.

September 23, 2008

Processes to solve problem of ora-12514(sometimes comes out as ora-12523)

Filed under: Oracle — by enotebook @ 5:28 pm

Just finished the Oracle 10g RAC installation on linux with using VMware server, everything runs smoothly without testing connection to the instance on first node(rac1). Details like blowing.
$ sqlplus [email=system@devdb1]system@devdb1
SQL*Plus: Release 10.2.0.1.0 – Production on Tue Sep 23 15:14:30 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

Enter user-name:
It raised an error when trying to connect devdb1(instance on first node named rac1), enven i was allowed to connect devdb2 and devdb. crs_stat -t was issued:
$ crs_stat -t
Name Type Target State Host
————————————————————
ora…..crm.cs application ONLINE ONLINE rac1
ora….db1.srv application ONLINE ONLINE rac2
ora.devdb.db application ONLINE ONLINE rac1
ora….b1.inst application ONLINE ONLINE rac1
ora….b2.inst application ONLINE ONLINE rac2
ora….SM1.asm application ONLINE ONLINE rac1
ora….C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora….SM2.asm application ONLINE ONLINE rac2
ora….C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
$
Every resource is running fine. Then try to check the status of listener.

$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 – Production on 23-SEP-2008 15:15:30
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
$
Outputs like above showing us the listener does not even ‘trurely started'(started incorrectly). Tried to restart it and re-check the status.

$ crs_stop ora.rac1.LISTENER_RAC1.lsnr
Attempting to stop `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`
Stop of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.
$ crs_start ora.rac1.LISTENER_RAC1.lsnr
Attempting to start `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`
Start of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.

The outputs are same with above while excuting command of lsnrctl status. Tried to compare the content of listener.ora in rac1 with rac2 and found that HOST string is not same within rac2, HOST = 172.16.113.32 in rac2, but HOST = 127.0.0.1 in rac1, i guess it causes the problem. Modify it and make it sync with rac2.

$ more listener.ora
# listener.ora.rac1 Network Configuration File: /u01/app/oracle/product/10g/db/network/admin/listener.ora.rac1
# Generated by Oracle configuration tools.
LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.andy.com)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)(IP = FIRST))
)
)
SID_LIST_LISTENER_RAC1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10g/db)
(PROGRAM = extproc)
)
)
$ vi listener.ora

Restart listener on rac1.
$ crs_stop ora.rac1.LISTENER_RAC1.lsnr
Attempting to stop `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`
Stop of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.
$ crs_start ora.rac1.LISTENER_RAC1.lsnr
Attempting to start `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`
Start of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.

Check the status.
$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 – Production on 23-SEP-2008 15:18:07
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
————————
Alias LISTENER_RAC1
Version TNSLSNR for Linux: Version 10.2.0.1.0 – Production
Start Date 23-SEP-2008 15:18:01
Uptime 0 days 0 hr. 0 min. 5 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10g/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10g/db/network/log/listener_rac1.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.113.131)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.113.31)(PORT=1521)))
Services Summary…
Service “PLSExtProc” has 1 instance(s).
Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
$

Then connect to devdb1.
$ sqlplus [email=system@devdb1]system@devdb1
SQL*Plus: Release 10.2.0.1.0 – Production on Tue Sep 23 15:29:19 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL>

It works!
Done.

September 17, 2008

Funny math

Filed under: Miscellaneous — by enotebook @ 12:56 pm

Funny math
1.


2.

3.

4.

5.

6.

August 20, 2008

MySql installation on Linux

Filed under: Mysql — by enotebook @ 3:16 pm

Information about Host & MySql as belows:
# uname -a
Linux localhost.localdomain 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 5.0.51a-log
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> select version();
+————-+
| version() |
+————-+
| 5.0.51a-log |
+————-+
1 row in set (0.00 sec)
mysql>

Install Mysql using RPM
rpm -ivh rpmfile (you will encounter error like the mysql package conflicts since it has been installed when you installing OS, use rpm -e to uninstalled them and try again)
default Installation location:
1、data folder
/var/lib/mysql/
2、configuration files
/usr/share/mysql(mysql.server etc.)
3、binary file
/usr/bin(mysqladmin mysqldump etc.)
4、booting scripts
/etc/rc.d/init.d/

Install Mysql using distributed file
1. create folder and grant proper permission
# mkdir -p /u01/CfgFiles
# chown -R mysql /u01/
# chgrp -R mysql /u01/

2. transfer file(mysql-5.0.51a-linux-i686.tar.gz) to linux host

3. unzip
# tar -xf mysql-5.0.51a-linux-i686.tar
# mv mysql-5.0.51a-linux-i686 MySql
# ls
app lost+found MySql mysql-5.0.51a-linux-i686.tar oradata

4. copy my-large.cnf & mysql.server to a specific location and moodify them accordingly
# cd MySql/
# cp support-files/my-large.cnf support-files/mysql.server /u01/CfgFiles/
# cd /u01/CfgFiles/
# mv my-large.cnf my.cnf
# mv mysql.server mysqld
# vi mysqld
1). specify the location path to basedir&datadir in line number 46:
46 basedir=/u01/MySql
47 datadir=/u01/MySql/data
2). specify the configuration file in line number 195:
195 #conf=/etc/my.cnf
196 conf=/u01/CfgFiles/my.cnf
# vi my.cnf
1). specify the location path for socket file in line number 20 & 28:
20 #socket = /tmp/mysql.sock
21 socket =/u01/MySql/mysql.sock
28 #socket = /tmp/mysql.sock
29 socket =/u01/MySql/mysql.sock

5. startup Mysql
# ./mysqld start
Starting MySQL [ OK ]
#
6. Modify password for root:
# mysqladmin -u root password ‘newpassword’

7. Enable remote login:
mysql> grant all on *.* to [email=root@’%’]root@’%’ identified by ‘password’;

Done.

April 23, 2008

VMware server comes out error when boot 2 virtual linux boxes

Filed under: Miscellaneous — by enotebook @ 10:04 am

Error:
Cannot open the disk ‘FileLocation.vmdk’ or one of the snapshot disks it depends on.
Reason: Failed to lock the file.

Action:
Add ‘disk.locking = “FALSE”‘ to the confituration file(.vmx)
This also effective to some unknown reasons when 2 or more boxes booting failure.(as i know)

April 10, 2008

Linux hangs on Enabling swap space when bootup

Filed under: Miscellaneous — by enotebook @ 2:05 pm

Problem:
with enabling swap space on “Boot Time“.
while Redhat Linux Booting into run level 3 , then it suddenly got struck up with swap space enabling.

Solution:
Boot into single user mode and make sure /etc/fstab has correct entries. Also can format swap partition.

Before formatting swap partition please disable that partition. do(in single user mode):

#swapoff /dev/hda5 (your /etc/fstab entry for swap).
To Create new swap partition do the follow,
step1:
Create new partition by using “fdisk”.Say here “/dev/hdaX”(Also works with deleting old swap partition and recreate it to use original space.)
step2:
Create Swap signature on that partition.to do that,
#mkswap -v1 /dev/hdaX
step3:
Enable swap partition,
#swapon /dev/hdaX
step4:
Check the status of swap partition.
#swapon -s

« Previous PageNext Page »

Create a free website or blog at WordPress.com.