How to unlock an account in Oracle 10g

sqlplus /nolog SQL> connect / as sysdba SQL> alter user account unlock;

Read more

Share

How to find out if an account has been locked in Oracle 10g

sqlplus /nolog SQL> connect / as sysdba SQL> SELECT username, account_status, password FROM dba_users;

Read more

Share

Listing all users in a Oracle 10g database

sqlplus /nolog SQL> connect / as sysdba SQL> select * from all_users; <div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sql" data-lang="sql"></code></pre></div>

Read more

Share

Starting and stopping an oracle DB

STARTING DATABASE Start Listerner up # lsnrctl start 1. Connect to sqlplus as sysdba SQL> connect sys as sysdba 2. run command 'startup' SQL> startup 3. Exit from sqlplus SQL> exit ### STARTING Enterprise Manager 1. Login as oracle user 2. run following command <div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"> <span style="color:#75715e"># emctl start dbconsole</span> <span style="color:#75715e">#### example</span> &lt;div class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;highlight&#34;</span>&gt;&lt;pre style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;</span>&gt;&lt;code class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;language-bash&#34;</span> data-lang<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bash&#34;</span>&gt;-bash-3.00$ emctl start dbconsole Oracle Enterprise Manager 10g Database Control Release 10.

Read more

Share

Useful Solaris pkg commands

Finding out what package claims responsibility for a particular file root@monitor:/opt/csw/libexec/hobbit/server> pkgchk -l -p /opt/csw/apache2/sbin/apachectl Pathname: /opt/csw/apache2/sbin/apachectl Type: regular file Expected mode: 0755 Expected owner: root Expected group: bin Expected file size (bytes): 3425 Expected sum(1) of contents: 22037 Expected last modification: Oct 23 01:42:17 PM 2007 Referenced by the following packages: CSWapache2c Current status: installed To find out which package a file is in grep <filename> /<span class="code-keyword">var</span>/sadm/install/contents To find out what files are in a package grep <<span class="code-keyword">package</span> name> /<span class="code-keyword">var</span>/sadm/install/contents Displaying what files is in a package # pkgchk -l -P RICHPse | less Pathname: /opt/RICHPse Type: directory Expected mode: 0755 Expected owner: root Expected group: bin Referenced by the following packages: RICHPse Current status: installed Pathname: /opt/RICHPse/bin Type: directory Expected mode: 0755 Expected owner: root Expected group: bin Referenced by the following packages: RICHPse Current status: installed Pathname: /opt/RICHPse/bin/pw_example.

Read more

Share

Enabling SNMP (SMA - System Management Agent) under Solaris 10

Installation Install SUNWsmaS, SUNWsmagt, SUNWsmcmd, SUNWsmdoc, SUNWsmmgr Configuration cd /etc/sma/snmp cp snmpd.conf cp snmpd.conf snmpd.conf.bak-`date +%F` vi snmpd.conf change rocommunity (by default set to public) Change syslocation and syscontact to something useful e.g. From syslocation "System administrators office" syscontact "System administrator" To syslocation "Test x86 Server on Floor 2" syscontact "monitoring@example.com" Start or restart SMA service svcadm restart svc:/application/management/sma:default # Restart svcadm enable svc:/application/management/sma:default # Start Test from remote server pcanham@jafar:~$ snmpwalk -v 2c -c public 192.

Read more

Share

Solaris 10 packages needed for SNMP/SMA (System Management Agent)

SUNWsmaS - Source Files needed SUNWsmagt - snmpd and snmptrapd application and library files. SUNWsmcmd - SMA SNMP applications and utilities (e.g. snmpget) SUNWsmdoc - Documentation on System Management Agent SUNWsmmgr - MIB files and default config files (e.g. default snmpd.conf)

Read more

Share

Deleting a ramdisk in Solaris 10

Unmount disk umount /ramdisk_rrd Check what ramdisks are present ramdiskadm Block Device Size Removable /dev/ramdisk/ramdisk_rrd 41943040 Yes Deleting ram disk ramdiskadm -d /dev/ramdisk/ramdisk_rrd

Read more

Share

Creating a ramdisk in Solaris 10

Creating a 40m ramdisk bash-3.00# ramdiskadm -a ramdisk_rrd 40m /dev/ramdisk/ramdisk_rrd Checking ramdisk file system bash-3.00# fstyp /dev/ramdisk/ramdisk_rrd Unknown_fstyp (no matches) Creating filesystem on ramdisk bash-3.00# newfs /dev/ramdisk/ramdisk_rrd newfs: construct a new file system /dev/rramdisk/ramdisk_rrd: (y/n)? y /dev/rramdisk/ramdisk_rrd: 81872 sectors in 136 cylinders of 1 tracks, 602 sectors 40.0MB in 9 cyl groups (16 c/g, 4.70MB/g, 2240 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 9664, 19296, 28928, 38560, 48192, 57824, 67456, 77088, Make mount path bash-3.

Read more

Share

Hash key # on a UK Mac Keyboard

This tooks sometime to find i must admit and guessing this is very frustrating for people to hunt down its [alt] + [3] or [Option] + [3] NOTE: If you have Meta keys enabled in Terminal you will need to make a different short cut link otherwise you will get alittle frustrated.

Read more

Share