July 2, 2009

Listing Priviledges Recursively

The following will list the priviledges for a named user:

select
  lpad(' ', 2*level) || granted_role "User, his roles and privileges"
from
  (
  /* THE USERS */
    select
      null     grantee,
      username granted_role
    from
      dba_users
    where
      username like upper('%&enter_username%')
  /* THE ROLES TO ROLES RELATIONS */ 
  union
    select
      grantee,
      granted_role
    from
      dba_role_privs
  /* THE ROLES TO PRIVILEGE RELATIONS */ 
  union
    select
      grantee,
      privilege
    from
      dba_sys_privs
  )
start with grantee is null
connect by grantee = prior granted_role;
Comments Comments | Categories: Oracle | Autor: admin




June 29, 2009

Wallpaper Changer

http://www.phoeniixz.net/software.html

Comments Comments | Categories: Windows | Autor: admin




May 15, 2009

Sky+ Stuck In Standby

First try a software update:

  • Switch Sky+ box off at mains
  • Hold down the backup button and switch Sky box back on
  • Wait for a few minutes and a screen should show up telling you it is updating the software
  • Once this is finished try switching the box back on

If that doesn’t work then try reformatting the hard drive, this will wipe everything off the box including all recorded programs and series link information.

  • Switch of Sky+ box at the mains
  • Hold down the left and right buttons and then switch the box back on
  • Once the record light and pause light show up on the front of the box press the Select button
  • The lights on the ring on the front of the box shoudl start lighting up backwards to show it is working
  • Once this is finished run the software update process described above
  • Once that is ran try switching it on again, hopefully it should be back up and running

If the above don’t work it could be the hard drive is knackered and needs replacing.

Comments Comments | Categories: General | Autor: admin




January 28, 2009

Exchange over HTTP Option

If the Exchange proxy settings are greyed out in Outlook then check the following registry entry by running REGEDIT:

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\RPC\EnableRPCTunnelingUI

Ensure this is set to 1, the boxes should then become active.

Comments Comments | Categories: Windows | Autor: admin




January 14, 2009

Alter Table Add Column

The “alter table” syntax from
Oracle to add
data columns in-place in this form:

alter table
   table_name
add
   (
   column1_name column1_datatype column1_constraint, 
   column2_name column2_datatype column2_constraint,
   column3_name column3_datatype column3_constraint
   );

Comments Comments | Categories: Oracle | Autor: admin




December 10, 2008

VARCHAR2

VARCHAR2 is the workhorse string type in the Oracle database. VARCHAR2
is a variable length string that must have it’s maximum length declared
before use. In Oracle 10g, a VARCHAR2 column may be up to 4000 bytes
and it may be up to 32767 bytes in a PL/SQL program.

VARCHAR2 can store any type of non-binary data. Depending on the
language defined in the database (either double or multibyte), the
actual number of characters may be less than the number of bytes. For
example, if the language requires three bytes per character, the most
you can store would be 32767 divided by 3 characters.

You may declare a NVARCHAR2 instead of VARCHAR2. NVARCHAR2 is used
for storing unicode character sets. I personally have never had a use
for NVARCHAR2. If you write multi-lingual applications and use a
unicode character set, use NVARCHAR2 instead of VARCHAR2. Length
restrictions are the same as a VARCHAR2 and UTF8 can store 32767
divided by 2 and UTF16 can store 32767 divided by 3. You cannot mix and
match VARCHAR2 and NVARCHAR2 variables. You should pick one or the
other and stick with it. Both are available in SQL and PL/SQL.

To declare a VARCHAR2, you can specify either the number of bytes
or the number of characters. Specify the number of characters if you
use a multi-byte character set. Otherwise, specify bytes.

A declaration looks like this: VARCHAR2(30) That would declare a 30
byte string and is equivalent to VARCHAR2(30 BYTE). To declare a 30
character string, use: VARCHAR2(30 CHAR). In the character set I use,
VARCHAR2(30), VARCHAR2(30 BYTE) and VARCHAR2(30 CHAR) will store
exactly the same number of characters.

Comments Comments | Categories: Oracle | Autor: admin




November 25, 2008

Remove Dead Tracks from iTunes

To remove any dead tracks from iTunes in Windows then download the iTunes SDK from Apple, extract it and in the extracted folder called “iTunesCOMWindowsSDK/SampleScripts” double click the file called “RemoveDeadTracks.js”.

Nothing will be shown to the screen while it does it’s business, there should be a message displayed once it has finished running witht he number of dead tracks removed.

Comments Comments | Categories: Windows, iPod | Autor: admin




SQL INSERT Statement

The syntax for the INSERT statement is:

INSERT INTO table
(column-1, column-2, … column-n)
VALUES
(value-1, value-2, … value-n);


A simple example:

INSERT INTO suppliers
(supplier_id, supplier_name)
VALUES
(24553, ‘IBM’);


More complex inserts can be performed:

INSERT INTO suppliers
(supplier_id, supplier_name)
SELECT account_no, name
FROM customers
WHERE city = ‘Newark’;

By placing a “select” in the insert statement, you can perform multiples inserts quickly.

With
this type of insert, you may wish to check for the number of rows being
inserted. You can determine the number of rows that will be inserted by
running the following SQL statement before performing the insert.

SELECT count(*)
FROM customers
WHERE city = ‘Newark’;

See here for more details.



Comments Comments | Categories: SQL | Autor: admin




Register/Unregister a DLL in Windows

I always forget this. To register a DLL in windows use the following in a CMD prompt:

regsvr32 $PATH_TO_DLL\DLL_NAME

To unregister a DLL use the following syntax:

regsvr32 /u $PATH_TO_DLL\DLL_NAME

Comments Comments | Categories: Windows | Autor: admin




November 19, 2008

Firefox and Integrated Windows Authentication

If you need to use Integrated Windows Authentication for any apps, Firefox will prompt for a username/password before displaying anything. To stop this behaviour then you need to amend the “about:config” settings in Firefox.

  1. Open Firefox
  2. In the address bar type: about:config
  3. After the config page loads, in the filter box type: network.automatic
  4. * Modify network.automatic-ntlm-auth.trusted-uris by double clicking the row and enter the site address you are using, for example “http://localhost
  5. Multiple sites can be added by comma delimiting them.
  6. To specify all subdomains use .replacewithyoursite.com .
Comments Comments | Categories: Firefox, IIS | Autor: admin