Friday, 5 February 2010

Oracle : Rolling sequences forward

declare
dummy number;
begin
    for sq in (
    select sequence_owner||'.'||sequence_name nm
    from dba_sequences
    where sequence_owner
       in ( 'CLIENTDBO','DEALERTOOLS_DBO','GAINDBO','IT_JOB_LOG','MXDBO','MYBROKERDBO',
            'NEWTOPSDBO','ODFSDBO','ODL_DBADMIN_DBO','ODL_DBSERVICES_DBO','ODL_USERAPPS_DBO',
            'PRODUCTDBO','RECONCILIATIONSDBO','SETTLEMENTSDBO','USER_ADMIN_SYS','WEB')
            )
        loop
        dbms_output.put_line(sq.nm);
        for i in 1..10000 loop
           execute immediate 'select  '||sq.nm||'.nextval from dual' into dummy;
        end loop;
    end loop;
end;


Thursday, 28 January 2010

Powershell : Get inner errors for more info (sometimes)

Statement that fails
#                        Trap {
#  write-output "herea"
#  $_.Exception
#  $err = $_.Exception
#  while ( $err.InnerException )
#    {
#    $err = $err.InnerException
#    write-output $err.Message
#    };
#    continue
#  }


Wednesday, 20 January 2010

Powershell : IUnable to install CTP3 - Access Denied Error

Reason was a anti-confickr strategy of adding a permission to stop values being changed in a registry key :
HKLM, Software\Microsoft\Windows Nt\CurrentVersion\Svchost

This has advanced acl perms set to Deny Everyone Set Value



Tuesday, 12 January 2010

Powershell - Performance Diagnostics reports error

When using powershell to query performance counters (via New-Object Diagnostics.PerformanceCounter) getting an errors (The network path was not found)

Fix - Assuming wiondows firewall on the target machine is turned on enable File and Printer Sharing in the exceptions on the target



Sunday, 27 December 2009

Vmware : Vsphere Console Desktop Shortcut

For Vmware infrastructure :
"%PROGRAM_FILES%\VMware\Infrastructure\Virtual Infrastructure Client\4.0\vmware-vmrc.exe" -h 192.168.69.42 -u username -p PASSWORD -d "[datastore1] Ninefingers2/Ninefingers2.vmx"

Add -X for full screen


Monday, 30 November 2009

Windows : What is the NTFS cluster size ?

* Run chkdsk on the drive - chkdsk C:
 * Cluster size if third line from bottom eg. 4096 bytes in each allocation unit

Thursday, 12 November 2009

Excel : Bullets in a cell

  1. Position the insertion point at the beginning of your text entry.
  2. Type a symbol that you want to use as a bullet. To create the bullet character, press ALT+0149 (type 0149 on the numeric keypad).