2011/11/15

Toad for Oracle TNS Names Path and Editor issues

Brief Description -- Symptoms/Quirks:
Couldn't use TNSNames to connect, and TNSNames Editor was greyed out

Today I ran into much tnsnames related frustration configuring and getting information out of Toad for Oracle on Windows XP.

The Actual Problem:

Issue appears to be due to Toad looking for tnsnames.ora in the main client directory (as in InstantClient) as opposed to the \network\admin directory (for a full client install). Resolved by setting TNS_ADMIN environment variable.


How to:
An Oracle Client install is required before installing Toad (for tnsnames connectivity). The upshot is that the small amount of documentation that there is, applies to the Oracle Instant Client and not to the Full Client, and Toad help does not appear to have been updated to reflect changes in the latest release. My problems turned out to be minor issues, but since the documentation is scant and makes a lot of assumptions, I've listed basic install/configuration info below.

These steps apply to Toad for Oracle 9.7.2 and Oracle Client 11.1 on Windows XP
  • If you do not already have an Oracle Client installed download the Instant Client
    • It will also be helpful to download some of the associated extensions to the package such as SqlPlus and ODBC
  • If you do not already have source for a licensed version of Toad, download the evaluation version
  • Install and/or configure the Oracle Client
    • If using InstantClient
      • Extract the .zip file to a local directory (there are no requirements around the top level location, use one that makes sense to you, but do not change the name of the subdirectories it exports).
      • Verify that the tnsnames.ora is in the working directory of the base of the extracted directory.
        • If it doesn't exist and this is a new install create a text file 'tnsnames.ora'
        • If it doesn't exist and you have a full client install, or an existing InstantClient install, locate the tnsnames.ora (default location is %ORACLE_HOME%\network\admin) and make a note of it.
    • For both the full client and the InstantClient you will need to set environment variables
      • Right click 'My Computer' and select 'Properties'
      • Select the 'Advanced' tab and click the 'Environment Variables' button
      • In 'System Variables' locate and select the PATH variable.
      • Click the 'Edit' button and verify the existence of, or append the client directory location to the end of the path.
        • To add, append a semi colon followed by the path to the client directory (e.g. ;c:\instantclientdir)
      • If you are using the full client, and the tnsnames.ora file is in a location other than the working directory, select 'New' to add a system variable 'TNS_ADMIN'
        • In 'Variable Name' enter TNS_ADMIN
        • In 'Variable Value' enter the directory location of the tnsnames.ora file. (e.g. c:\instantclientdir\network\admin)
      • Verify paths are set (both Instant Client and full Client)
        • In a cmd window type
          • echo %PATH%
          • This should return your normal path with the location of the client files appended.
      • Verify TNS_ADMIN variable (Full Client and clients with existing tnsnames.ora)
          • In a cmd window type
            • Echo %TNS_ADMIN%
            • This should return the location of the tnsnames.ora
  • Install Toad
      • From the Toad install media or download kick off setup
        • No changes from defaults are required during the actual install, choose components and file locations as best suits your environment and licensing.
  • Configure/Verify Toad
    • With the Oracle Client installed and configured, Toad should be able to locate the settings it needs
    • To verify select 'Session' new connection. In the 'Installed Clients' box (bottom right)
      • Verify that a client is listed
      • Click the elipses button to the right and verify that there are no errors listed (they will be red).
        • If values are incorrect, it is most likely an incorrect path in the environment variables.
          • From a cmd window type
            • env
            • Check that the path and TNS_ADMIN variable are correct, and verify there aren't stray oracle client variables with incorrect values (e.g. an incorrect ORACLE_HOME). Be very careful about changing these values if you have an existing client install.
            • Missing values not related to the ORACLE_HOME are not an issue if you have client only install (you don't need a SID etc. unless you have a local database).
    • To verify/configure the TNSNames Editor Utility:
      • On the 'Utilities' menu select TNSNames Editor.
        • If it is greyed out on the menu there is still a path issue (see above)
        • If you created a blank file it will be empty and entries can be added either by editing text directly or by generating entries from direct connections.
          • To add an entry click the 'Add Service' button (looks like a shiny blank sheet)
          • Enter connection information.
            • To enter the SID as SID instead of Service, check 'Use Oracle 8 and previous identification (SID)'
    • To add Oracle Utilities to Toad
      • On the 'View' menu select 'Toad Options'
      • In the left hand pane, Select 'Executables'
      • Enter the path for any Oracle Utilities you have installed or downloaded.
Thanks to John P. from Quest who provided some as listed links below:

2011/10/12

FRM-92101

Oracle E-Business Suites R12

OS

Oracle Linux 6.1

Error details

FRM-92101 : There was a failure in the Forms Server during startup. This could happen due to invalid configuration. Please look into the web-server log file for details.

Cause

Missing libXm.so.2 or version not match

Solution

Try to make a symbolic link

 [root@demo ~]# cd /usr/lib
 [root@demo lib]# ls -al | grep libXm


lrwxrwxrwx. 1 root root       14 Oct 11 23:18 libXm.so -> libXm.so.4.0.3
lrwxrwxrwx. 1 root root       14 Oct 11 23:18 libXm.so.3 -> libXm.so.3.0.2
-rwxr-xr-x. 1 root root  2673544 Jul 25  2010 libXm.so.3.0.2
lrwxrwxrwx. 1 root root       14 Oct 11 23:18 libXm.so.4 -> libXm.so.4.0.3
-rwxr-xr-x. 1 root root  2747944 Jul  7  2010 libXm.so.4.0.3


 [root@demo lib]#  ln -s libXm.so.3.0.2 libXm.so.2

2011/10/11

Path of Oracle E-Business Suite R12

Example : I install the Ebis at /media/d02/oracle and my Instant name is Test :

ENV

/media/d02/oracle/TEST/db/tech_st/11.1.0/TEST_vmesxsvr01.env
/media/d02/oracle/TEST/apps/apps_st/appl/TEST_vmesxsvr01.env
/media/d02/oracle/TEST/inst/apps/TEST_vmesxsvr01/ora/10.1.3/TEST_vmesxsvr01.env
/media/d02/oracle/TEST/inst/apps/TEST_vmesxsvr01/ora/10.1.2/TEST_vmesxsvr01.env

RDBMS Oracle Home

/media/d02/oracle/TEST/db/tech_st/11.1.0

Data Top

/media/d02/oracle/TEST/db/apps_st/data

APPL_TOP Mount pointy

/media/d02/oracle/TEST/apps/apps_st/appl

COMMON_TOP

/media/d02/oracle/TEST/apps/apps_st/comn

Tools Oracle Home

/media/d02/oracle/TEST/apps/tech_st/10.1.2

Web Oracle Home

/media/d02/oracle/TEST/apps/tech_st/10.1.3

Temp directory

/media/d02/oracle/TEST/inst/apps/VIS_ebs121/temp

2011/07/08

RHEL6 64Bit Install Flash Player For Firefox

By default, RHEL6 using the x86_64 browser (firefox).

[root@demo ~]# rpm -qa | grep firefox 
firefox-3.6.17-1.0.1.el6_0.x86_64

So, using yum or download the flash rpm file from intrenet will not work for 64bit browser (Yeah!)

So just forget all the i386 version packages. ( even download it from adobe website).

How to do?

1) First, visit Adobe Labs : Adobe Flash Player "Square"

2) And click on Download Flash Player "Square" on your right hand site.

Adobe Flash Player "Square"

3) Click on Download plug-in for 64-bit Linux on the bottom of pages, save the file.

4) Extract it and you get a file name libflashplayer.so

5) Copy the libflashplayer.so to /usr/lib64/mozilla/plugins/ (Check online for the location to store the .so file with your firefox version.)

6) Restart your browser & Done.

2011/07/07

Unzip all zip files in a directory

When you gonna to unzip all file under same directory with following command:

[root@demo ~]# unzip *.zip

It Won't Work!

Try this:

 [root@demo ~]# unzip \*.zip

Also,verify all the Zip file before extract :

 [root@demo ~]# unzip -t \*.zip | grep error

GNOME Keyring & Auto-login

What the hell is GNOME Keyring, anyway?

GNOME Keyring is a service and API used by GNOME programs to securely store various secrets, such as email or WiFi passwords.

See the GnomeKeyring page on GNOME Live.

Why am I being asked to unlock a "keyring"?

When you login normally, the system gives the password you just entered to gnome-keyring, which then unlocks the login keyring.

When you have auto-login enabled, you don't enter any password, and gnome-keyring cannot unlock the keyring automatically. So it asks you to unlock it.

If you want to have auto-login and auto-unlock, you need to remove the keyring's password (set it to a blank one). This won't be a security risk, as you already have automatic login.

Changing the keyring password

Run the keyring manager seahorse (or Applications > Accessories > Passwords and Encryption keys if you use GNOME). Then open the Passwords tab. (Depending on Seahorse's version, it might be the first or the last tab.)


Now find the login keyring, right-click on it, and choose Change Password. Enter your old password into the Old password box, but leave the other two blank.


When asked about "unsafe storage", confirm.

Now the passwordless keyring will be unlocked automatically.
But I have autologin disabled and it still doesn't work!

First, make sure your login and keyring passwords are exactly the same.

Then check if PAM is configured correctly. Look for lines containing pam_gnome_keyring.so in /etc/pam.d/:

# snipped
auth optional pam_gnome_keyring.so
session optional pam_gnome_keyring.so auto_start

On most distros, those lines usually go to /etc/pam.d/gdm for GDM (graphical login), and /etc/pam.d/login for tty login. The GnomeKeyring/Pam page on GNOME Wiki has some more information.

Ubuntu and Debian will configure PAM automatically, and they put the module to /etc/pam.d/common-auth and /etc/pam.d/common-session, which are included by gdm/login and most other PAM configs. You can use this command to check all configurations at once:

grep -r gnome_keyring /etc/pam.d

Make Linux support NTFS File Type

CEntOS - 5 and RHEL-5/6 is not supporting mounting of NTFS partition, fix harddisk, removable usb harddisk with NTFS partition, some packages need to be installed on it to make NTFS mountable.

1) First confirm you kernel version

[root@demo ~]# rpm -qa | grep kernel
kernel-2.6.X.el6.x86_64

2) Search the package NTFS-3G at http://rpm.pbone.net/. Select the packages which match with your kernel, my system using ntfs-3g-2011.4.12-3.el6.src.rpm

3) Install it :

[root@demo src]# rpm -ivh ntfs-3g-2011.4.12-3.el6.x86_64.rpm

4) Done & Reboot

2011/07/06

Yum From DVD

RHEL6/Oracle Linux 一般必需注册(免费30 天评估或付费)才可以获得线上软体更新支援及下载, 不注册的话其实亦可以使用光碟来执行yum 安装, 此方法适合多台电脑进行评估测试时免去大量注册所需, 及没有联网环境的独立电脑, 而且多台电脑亦可以共用光碟分享位置(无需大量烧录光碟)来安装软体, 当然如果要更新软体的话就必需付费注册(除非手动自行编译更新源码套件)。

小弟安装的是Oracle Linux 6.1

1) 插入光盘(废话吗?),你的光盘应该会auto mount, 路径是 : /media/OL6.1xxx

2) 安装createrepo

[root@oracle]# cd /media/OL6.1/Packages
[root@oracle]# rpm –ivh createrepo -XX.rpm
#过程中缺少的Dependency一一给它安装,在同一个目录就可以找到它们了

3) 新建一个目录(任何地方)

[root@oracle]# mkdir /media/repolocal

4) 建立repodata数据文件

[root@oracle]# cd /media/repolocal
[root@repolocal]# createrepo -vpo /media/repolocal/ /media/OL6.1
[root@repolocal]# ln -s /media/OL6.1/HighAvailability/ ./HighAvailability

5) 建立一个新的.repo文件

[root@repolocal]#  vim /etc/yum.repos.d/DVD.repo
#Insect Following content:

[dvd]
name=OL6.1 DVD
baseurl=file:///media/repolocal
enabled=1
gpgcheck=0

6)用update来验证

[root@oracle]# yum update

如果没有任何错误信息,恭喜恭喜

Automatic Login In Linux And Gnome

There are a lot of people out there that want to have their Linux box automatically login for them after a reboot. As always there is more than one way to do this. You first have to decide what method you prefer to use. You can setup a user to automatically login and you can also setup a user to login using a timed login. I will show you how to do both.


AUTOMATICALLY LOGIN:

In order to setup your Linux box to automatically login using a particular user, you will need to follow the steps below.

For most newer versions of Red Hat (Red Hat 5/6), Fedora Core (Fedora Core 13/14), Ubuntu (10.04/10.10) you need to edit /etc/gdm/custom.conf using terminal and add the following to the [daemon]:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=username   ###NOTE:  Where username is your username you use to login to the linux box. ###

TIMED LOGIN:

In order to setup your Linux box to login using a particular user and a timed login, you will need to follow the steps below.
For most newer versions of Red Hat (Red Hat 5/6), Fedora Core (Fedora Core 13/14), Ubuntu (10.04/10.10) you need to edit /etc/gdm/custom.conf using terminal and add the following to the [daemon]:

[daemon]
TimedLoginEnable=true
TimedLogin=username   ###NOTE:  Where username is your username you use to login to the linux box. ###

The methods above currently work for most newer versions of Linux and Gnome. However, occasionally you will run into some older versions of Linux and Gnome. If the methods above do not work for your particular Linux distro and Gnome, you can try the steps below:
In order to setup your Linux box to login using a particular user and a timed login, you will need to follow the steps below.

You need to edit /usr/share/gdm/defaults.conf using terminal and add the following to the [daemon]:

[daemon]
TimedLoginEnable=true
TimedLogin=username   ###NOTE:  Where username is your username you use to login to the linux box. ###

If you are using Novell’s Suse 10 or Suse 11, you will need to do the following to get automatic logins working:

From a terminal, run the following command:

su -c ‘/bin/bash /sbin/yast2 users’

This will open up the “User and Group Administration” Window. From there, click the drop down menu on the “Expert” middle button. Then select “Login Settings”, this will bring up the “Display Manager Login Settings” Window. Now, you can select “Auto Login” and click the drop down to select the user you want to login automatically.

That’s it. You should now be able to have your linux users login automatically.

Wikimedia配置

其个Wiki Site, 方便大家,所以,先来学习如何配置wikimedia。

一,安装这个不用写什么了,配置apache,可以正常访问页面,启动mysql数据库。
然后把下载的mediawiki-1.9.3cn.zip解压到/var/www/html/目录下,更名为wiki(方便)。
进入wiki目录执行:

#chmod a+w config  

在浏览器里输入 http://ip/wiki/index.php,开始安装。
主要是填写信息,如果出错的话,会显示红色提示信息。如果正确安装也会有提示成功。
安装成功后,把config下的LocalSettings.php移动到父母里。然后执行


#chmod a-w config

二,常用配置
1.开放图片上传功能:

#chmod a+w wiki/images
#vi wiki/LocalSettings.php,
把$wgEnableUploads = false; 改为 $wgEnableUploads = true;

2.更改网站左上角的logo
把自己的135x135象素的png图片放到wiki/skins/common/images 下,并命名为wiki.png

3.常用的提示信息更改
特殊页面->系统界面

4.左侧工具条的定制
到系统界面
在搜寻栏中输入: sidebar, 然后编辑:

* navigation
** mainpage|mainpage
** portal-url|portal
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** randompage-url|randompage
** helppage|help
** sitesupport-url|sitesupport

第一行(一个前导*)表示导航栏的名称,其提示文本在“mediawiki:navigation”页面中修改,也可以直接输入文字信息(文字不能与内部mediawiki参数页面重名)。

後续行(两个前导*)表示实际导航栏的内容,其格式为“链接网址|显示文本”。其中,链接网址有三种类型:

    * 直接输入http网址,例如直接输入“http://www.allwiki.com/bbs”
    * 文章页面标题,例如输入“天下维客”代表站内文章“[[天下维客]]”的网址
    * mediawiki名字空间的参数页,例如输入“mainpage”代表文字信息参数页面“[[mediawiki:mainpage]]”的网址。此类 字串还有helppage、portal-url等,请到special:allmessages里面查看更多的此类字串。

显示文本的设定与导航栏名称设定类似,可以:

    * 直接输入文字信息
    * 使用mediawiki名字空间参数页的标题缩写,例如上文默认文本中的“randompage”、“sitesupoort”分别代表“[[mediawiki:randompage]]”和“[[mediawiki:sitesupport]]”。

用户可根据需求删除/增加mediawiki:sidebar页面中的项目,修改後左侧导航栏就会发生相应改变。(本方法适用于mediawiki默认的monobook皮肤风格)
举例示范如下:

* 导航文字
** 文章标题|文章标题项
** http://www.allwiki.com/bbs|直接网址项

5.Mediawiki增加友情链接侧栏
想在mediawiki工具栏下方添加友情链接,请打开skins/Monobook.php,找到如下两行:

<?php if( $this->data['language_urls'] ) { ?><div id="p-lang" class="portlet">
   <h5><?php $this->msg('otherlanguages') ?></h5>

在前面添加:

<div class="portlet" id="p-tb">
   <h5>友情链接</h5>
   <div class="pBody">
     <ul>
     <li id="feedlinks""><a href="http://www.allwiki.com" target="_blank"><img src="http://www.allwiki.com/images/allwiki_logo.gif" border="0" alt="天下维客" /></a></li>
     <li id="
feedlinks""><a href="http://zh.wikipedia.org" target="_blank"><img
src="http://upload.wikimedia.org/wikipedia/zh/c/ce/Wiki_button.png" border="0" alt="中文维基百科" /></a></li>
     </ul>
     </div>
 </div>

请根据需要,修改上面内容中的链接、图片网址和alt字串(文字提示)。
    * 注意:①上述内容必须使用UTF-8格式进行存盘,否则汉字显示乱码;②本修改只针对默认的monobook风格。

6.关于网站提速
很多人感到MediaWiki的运行速度非常之慢,其实这里面有很多原因是页面样式的问题。请到“参数设置→皮肤”中选择“科隆香水蓝44”,体会迅捷如飞的感觉!


7.时间显示设置
在LocalSetting.php的倒数第三行加入:

$wgLocaltimezone = "Asia/Shanghai"; putenv("TZ=$wgLocaltimezone"); $wgLocalTZoffset = date("Z") / 60;


8.阻止新用户注册
更改LocalSetting.php,添加:

$wgGroupPermissions['*' ]['createaccount'] = false;

注 意:阻止新用户注册,此时管理员可以到特殊页面上的用户登录页面(Special:UserLogin)里,输入希望为其建立帐户的某人的用户名与电子邮 件地址,然后点击通过eMail(by email)按钮递交,系统将创建帐号并将随机生成的密码发送到指定email里。

9.禁止匿名用户编辑
在LocalSetting.php里添加:

$wgGroupPermissions['*' ]['createaccount'] = false;
$wgGroupPermissions['*' ]['read'] = true;
$wgGroupPermissions['*' ]['edit'] = false;

10.设置匿名用户可读内容

$wgWhitelistRead = array( "Main Page", "Special:Userlogin" );
$wgGroupPermissions['*' ]['read'] = false;

注意:具体需要对应自己的站点链接,而对于多字节语言的MediaWiki,例如中文首页链接index.php?title=%E9%A6%96%E9%A1%B5,这首页中文字符PHP可能无法正确解码。需要利用urldecode()函数转换一下,写为:

$wgWhitelistRead = array( urldecode("%E9%A6%96%E9%A1%B5") ;

11.对没有登录的用户移除页面顶部的讨论页链接
在LocalSetting.php里添加:

$wgShowIPinHeader = false;

12.在数据库中手工改变用户组
用 户权限包含在user_groups表中,该表有两个字段,分别是ug_user和ug_group。对用户所属的每一个组,都必须有一行插入。您必须从 用户表(users)中获知用户的ID。以下的SQL查询语句将能完成此功能。在下例中将 1 替换为从users表中得到的ID号.

INSERT INTO user_groups (ug_user, ug_group) VALUES ('1', 'bureaucrat'); INSERT INTO user_groups (ug_user, ug_group) VALUES ('1', 'sysop');

13.其它登陆用户不能编辑,只有DB2组的用户可以编辑
在LocalSetting.php里添加

$wgGroupPermission['DB2']['read'] = true;
$wgGroupPermissions['DB2']['edit']= true;
$wgGroupPermissions['user']['edit']=false;

2011/07/05

首帖

Er....

其实完全没啥好说的。

开这个Blog完全是想记录在下从零开始学习Oracle E-Business Suite的过程。
还有一些零零星星的记录等等。

希望可以对在下的老人痴呆起到少少治疗作用。。。

就这样。