Visit my new wordpress blog to view this content :)
Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts
Thursday, 26 May 2016
Wednesday, 18 September 2013
Connecting to a oracle database without tnsnames
Here are the examples to connect using sqlplus to an oracle database without adding any tnsnames entry.
sqlplus scott/tiger@//10.103.18.99:1560/practicedb
If it does not work try this too
connect scott/tiger@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.103.18.99)(PORT = 1560))) (CONNECT_DATA = (SID = practicedb)))
sqlplus scott/tiger@//10.103.18.99:1560/practicedb
If it does not work try this too
connect scott/tiger@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.103.18.99)(PORT = 1560))) (CONNECT_DATA = (SID = practicedb)))
Saturday, 23 February 2013
Putting Database in ARCHIVELOG mode
Archiving the filled up redo logs is important and enables us to perform a point in time recovery (PITR).
1) Setting initialization parameters:
First we set the location and format for archive logs.
SQL> alter system set log_archive_dest_1 = 'location=/home/oracle/archive';
1) Setting initialization parameters:
First we set the location and format for archive logs.
SQL> alter system set log_archive_dest_1 = 'location=/home/oracle/archive';
Tuesday, 19 February 2013
Saturday, 16 February 2013
Renaming or Moving a Datafile
Steps to move or rename a datafile:
1) Making the tablespace read only in which datafile lies.
SQL> alter tablespace test read only;
Tablespace altered.
SQL> select tablespace_name,status from dba_tablespaces
where tablespace_name='TEST';
TABLESPACE_NAME STATUS
------------------------------ ---------
TEST READ ONLY
1) Making the tablespace read only in which datafile lies.
SQL> alter tablespace test read only;
Tablespace altered.
SQL> select tablespace_name,status from dba_tablespaces
where tablespace_name='TEST';
TABLESPACE_NAME STATUS
------------------------------ ---------
TEST READ ONLY
Difference between undo segment and redo logs
Content moved, please visit my wordpress blog to view this content :)
Subscribe to:
Posts (Atom)