It depends on the GUI but they all should have a way of selecting the SYSDBA
privilege. Toad has it appear as a drop-down box called 'Connect as:' as does Oracle Enterprise Manager. For SQL Developer you use the 'Role' box when creating a new connection.
As far as / as sysdba
is concerned it just means that operating system authentication is being used so no password is needed. You can only use it if you are logged in as the oracle user or a member of the dba group (or for Windows, I believe as an administrator).
When you grant a user the SYSDBA
privilege it only means they have the option to log in with the SYSDBA
privilege and not that they will have dba privileges when they log in normally. The same is true for the SYS
user: you can log in as SYS
without the SYSDBA
privilege and so lack the ability to shutdown the database, for example.
You'd use a hash value as an identifier for rows of data whenever that's "practical", i.e. you actually need a simple identifier for all your rows, there are no candidate (natural) key fields that are practical (too wide for example), and an ordinary (sequential for instance) generated identifier doesn't cut it (for instance you need that row identifier to be "global" - if the same row was created in two distinct databases, they should have the same identifier).
(One non-trivial example of such a thing would be Git. Each object stored in a git repository is uniquely identified by a SHA-1 hash, which is pretty handy to refer unambiguously to a given commit.)
If you need to use something like that, indeed you'll need to create it yourself with Oracle (adding that hash as a column to the table and indexing it, or with a function-based index).
You could go even further by creating your very own index type with application domain indexes if a plain hash isn't good enough – full-text indexing is, I believe, implemented this way.
There is something built-in to Oracle that is hash-based and doesn't actually need an index to get fast row retrieval: hash clusters. You can theoretically retrieve the target row with as little as a single-block I/O (which normal index+table lookups can't match, and even IOTs can't match unless the table is really small). Do read the When to Use Hash Clusters docs though, they are quite peculiar, and you need a good key (one or more columns) in the first place to use them.
Best Answer
Unfortunately
DBMS_CRYPTO
in Oracle 11.2 only supports SHA1 (documentation link), which is 160-bit. .DBMS_CRYPTO
in Oracle 12.1 supports SHA2HASH_SH256
(documentation link), which does what you require.There are some free implementations of SHA2 just a google away. This blog post, for example.
As for decrypting a hashed password? I don't think you understand hashing. Hashing is 1-way, unless you brute-force it, or use Rainbow Tables. To check if a password is correct, you would hash it and compare it to the stored hash.