This post is just a collection of random technical stuff that I can never seem to remember. I find myself regularly wasting loads of time researching something that I did just a few months (or even weeks) ago. So I figured I'd put together my own collection of technical bits and pieces here so I can refer back to them as I need them.
It's also a place for me to collect all my templates for development (things like Ant scripts, Struts config files, etc).
I'll try and update this list regularly.
JavaOracle
- To create an Oracle synonym...
create synonym <name> for <schema>.<object>
- To select the next value in an Oracle sequence...
select <sequence_name>.nextval from dual
- To find out the standard TNS details for a global database name run the NAMESCTL command and execute the following query at the prompt...
query <global_db_name> A.SMD
- To add a constraint to a table...
alter table <schema_name>.<table_name> add (constraint <key_name> primary key (<columns>))
- To run a sql script from sqlplus (and pass the parameter 123)...
SQLPLUS <username>/<password>@<dbname> @script.sql 123
SSH