Tuesday, November 1, 2011

Ubuntu Unity 11.04 & 11.10 Teamviewer startup problem for 2 eth card pc's

If you have a pc with 2 ethernet ports like me, you may have a problem with teamviewer autostart.
Since teamviewer starts before ethernet card is activated, it is trying to activate but it fails. 
Here is a workaround for this problem:

  •  Install teamviewer from official site. 
Although it was freezing sometimes on Ubuntu 10.04, it is working flawless on Ubuntu 11.10



  • Create a shell script to start teamviewer with 50 seconds delay. 
Delay is needed to wait the ethernet card to activate


$ vi /home/user/teamviewer_start.sh

sleep 50
teamviewer6 &
  • Click start menu and launch startup applicatons



  • Click add button, name it Teamview or something you choose.



  • Click Browse button for command and choose the sciript.



Now teamviewer succesfully opens and availiable at ubuntu startup.

Ubuntu Unity 11.04 & 11.10 VNC server with X11vnc


  • Uninstall default VNC server:

sudo apt-get remove vino


  • Install x11vnc
sudo apt-get install x11vnc


  • Create /etc/init/x11vnc.conf for lightdm


sudo vi /etc/init/x11vnc.conf

start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -rfbport 5900

end script

  • Create a password with storepasswd option
x11vnc -storepasswd "password_enter_here" /etc/x11vnc.pass

kewastUnPackStats(): bad magic 1 (0x2b7d38d08c06, 0) on alert.log

kewastUnPackStats(): bad magic 1 (0x2b7d38d08c06, 0) warning on 11gr2 database's alert.log.


This is a bug which is documented in bug no: 8730312


patch 8730312 is available for 11.2.0.1

Useful apps DBA scripts

  • Who is connected, when
sql> select user_name,to_char(last_logon_date,’DD-MON-YYYY HH24:MI:SS’)
from apps.fnd_user
where to_char(last_logon_date,’DD-MON-YYYY’)=to_char(sysdate,’DD-MON-YYYY’);
  • Which resposibility is used
sql> select distinct fu.user_name User_Name,fr.RESPONSIBILITY_KEY Responsibility from fnd_user fu,
fnd_responsibility fr, icx_sessions ic
where fu.user_id = ic.user_id AND
fr.responsibility_id = ic.responsibility_id AND
ic.disabled_flag=’N’ AND
ic.responsibility_id is not null AND
ic.last_connect like sysdate;

  • Number of user connected to EBS
sql> SELECT COUNT (DISTINCT d.user_name)
FROM apps.fnd_logins a, v$session b, v$process c, apps.fnd_user d
WHERE     b.paddr = c.addr
AND a.pid = c.pid
AND a.spid = b.process
AND d.user_id = a.user_id
AND (d.user_name = ‘USER_NAME’ OR 1 = 1)

  • EBS gather stats
sql> execute fnd_stats.gather_table_stats(‘AR’,'RA_CUSTOMER_TRX_ALL’);

  • CUSTOM.pll compile: (copy CUSTOM pll under $AU_TOP/resource and compile)
f60gen CUSTOM.pll apps/apps_password module_type=LIBRARY compile_all=YES

  • How to change apps password on 11i

    • Shutdown all apps services on all nodes.
    • Backup these tables                             
                         sql>    create table xxx_fnd_user as select * from FND_USER

                         sql>    create table xxx_FND_ORACLE_USERID asselect * from FND_ORACLE_USERID

    • Connect as apps user on sqlplus and run:

                          $ FNDCPASS apps/apps_old 0 Y system/password SYSTEM APPLSYS apps_new

    • Edit passwords in these files on all nodes:

                         $IAS_ORACLE_HOME/Apache/modplsql/cfg/wdbsvr.app

                        $ORACLE_HOME/reports60/server/CGIcmd.dat






  • How to change module passwords on 11i

$ FNDCPASS apps/apps_password 0 Y system/system_password ORACLE AR new_password