Thursday, September 29, 2016

Integrate the Tortoise SVN with Notepad++



I would like to share the idea to integrate the Tortoise SVN with Notepad++, so that we can directly perform SVN action instead of moving the physical files.

            Goto Run -> Use Command Given below for each SVN Action -> Press Save -> Enter the Name for the Action and Short Cut of your preference -> Ok -> Run

            Add (Open file which needs to be Added)
                        "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:add /path:"$(FULL_CURRENT_PATH)" /notempfile /closeonend:3
            Commit (Open file which needs to be commit)
                        "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:commit /path:"$(FULL_CURRENT_PATH)" /notempfile /closeonend:0
            Update(Open file which needs update)
                        "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"$(FULL_CURRENT_PATH)" /notempfile
            Commit Folder(Open any file from that folder)
                        "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:commit /path:"$(CURRENT_DIRECTORY)" /notempfile
            Update Folder(Open any file from that folder)
                        "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"$(CURRENT_DIRECTORY)" /notempfile
            Folder Log(Open any file from that folder)
                        "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:log /path:"$(CURRENT_DIRECTORY)" /notempfile
            Difference(Open file which needs to check for Difference)
                        "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:diff /path:"$(FULL_CURRENT_PATH)" /notempfile
                       
            Note : File should be in same path where it’s been checked out, File should be saved before Add/Commit/Difference. Same way we can implement other options.

            To remove the command
            Run -> Modify Shortcut/Delete Command...

We can also use the below script to make a batch file and schedule it at system startup to update the local checked out working copy.
"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"D:\PLAS Prod SVN" /notempfile

Wednesday, April 20, 2011

The Following Points needs to be considered when we plan to migrate our Oracle database 10gR2 to database 11gR2 and if we are using Oracle Application server 10gR2.

  1. SEC_CASE_SENSITIVE_LOGON
  2. Fine Grained network access (ACL)
  3. Character set of old and new DBs
  4. NLS setting of old and new DBs
  5. Context, DB Links and DB Jobs (When Export and Import)
  6. FORMS_USERNAME_CASESENSITIVE
To Compile all the forms at a time use the following code as bacth

echo ...Compilation Started...This may take few minutes...
del *.err

for %%i IN (*.pll) do frmcmp module=%%i userid=plas/plas@plas11g batch=yes module_type=LIBRARY compile_all=yes window_state=Minimize
echo Libraries Compilation completed Completed
for %%i IN (*.mmb) do frmcmp module=%%i userid=plas/plas@plas11g batch=yes module_type=MENU compile_all=yes window_state=Minimize
echo Menu Compilation completed Completed
for %%i IN (*.fmb) do frmcmp module=%%i userid=plas/plas@plas11g batch=yes module_type=FORM compile_all=yes window_state=Minimize
echo Form Compilation completed Completed

dir *.err /b >>Error_Forms.txt

Here the date modified of fmb and fmx will be changed to the run date

To convert all the reports (RDF to REP) use the following code as bacth

echo Compilation Started,This may take few minutes.

for %%i IN (*.rdf) do rwconverter source=%%i userid=plas/plas@plas11g stype=rdffile DTYPE=repfile compile_all=yes OVERWRITE=yes batch=yes

echo Reports Compilation completed Completed

Here the date modified of rep will be changed to the run date and rdf will not have any change.

Tuesday, July 6, 2010

How to Execute a Select Statement

variable x varchar2(25);
exec select 1 into :x from dual;
Print x;

Recycle Bin

What is Recycle Bin
Oracle has introduced "Recycle Bin" Feature Oracle 10g to store all the dropped objects.
If any table in Oracle 10g is dropped then any associated objects to this table such as indexes,
constraints and other dependant objects are simply renamed with a prefix of BIN$$.
 
Why Recycle Bin
A user drops a very important table--accidentally, of course--and it needs to be revived as soon as possible.
Oracle9i Database introduced the concept of a Flashback Query option to retrieve data from a point in time in the past, but it can't flash back DDL operations such as dropping a table.
The only recourse is to use tables pace point-in-time recovery in a different database and then recreate
the table in the current database using export/import or some other method.
This procedure demands significant DBA effort as well as precious time, not to mention the use of a different database for cloning.
But with Oracle 10g Recycle bin Feature the user can easily restore the Dropped Object.
 
How to Enable/Disable Recycle Bin
The Following property sets the Recycle Bin to be enabled or not for the DB.
 
SQL > SELECT Value FROM V$parameter WHERE Name = 'recyclebin';
 
Value
-----
On
 
if the Value Is “on” then recyclebin feature is enabled for the Database.
If the Value is “off” the recyclebin feature is disabled.
The following commands are used to enable or Disable the Feature
 
SQL > ALTER SYSTEM SET recyclebin = ON;
or
SQL > ALTER SESSION SET recyclebin = ON;
 
SQL > ALTER SYSTEM SET recyclebin = OFF;
or
SQL > ALTER SESSION SET recyclebin = OFF;
 
Show the Contents in RECYCLEBIN
Use the following commands to show all the objects that are stored in Recycle Bin,
SQL > SHOW RECYCLEBIN;
Or
SQL > SELECT * FROM USER_RECYCLEBIN;
 
Example
The Following Example explains the moving the object to the Recyclebin
 
 
SQL > CREATE TABLE TEST_RBIN(VAL   NUMBER);
 
SQL > INSERT INTO TEST_RBIN(VAL) VALUES(10);
 
SQL > COMMIT;
 
SQL > DROP TABLE TEST_RBIN;
 
Print the Recycle bin Entries,
 
SQL > SHOW RECYCLEBIN;
 
ORIGINAL NAME      RECYCLEBIN NAME                 OBJECT TYPE           DROP TIME
----------------   ------------------------------  --- ------------     -------------------
TEST_RBIN              BIN$7fq9jEy8RSadimoE4xGjWw==$0  TABLE          2010-05-26:11:27:12
 
Restore the Objects
User can restore the Dropped tables by issuing the following commands,
The following Commands can be used to restore the dropped Objects,
 
 
SQL > FLASHBACK TABLE <<Table_Name >> TO BEFORE DROP;
 
Example,
 
SQL > FLASHBACK TABLE TEST_RBIN TO BEFORE DROP;
 
SQL > SELECT * FROM TEST_RBIN;
 
       VAL
       ---
       10
 
It is possible to restore the table in to different name by issuing the following SQL Command,
 
SQL > FLASHBACK TABLE << Dropped Table Name >> TO BEFORE DROP RENAME TO <<New Table Name >>;
 
SQL > FLASHBACK TABLE TEST_RBIN TO BEFORE DROP RENAME TO TEST_RBIN1;
 
Using the above statement, its possible to restore the various version of the table data if the table
is created and Dropped more than once.
While restoring system restores the table in Descending order.
Example,
 
 
SQL > CREATE TABLE TEST_RBIN (COL1 NUMBER);
 
SQL > INSERT INTO TEST_RBIN VALUES (1);
 
SQL > COMMIT;
 
SQL > DROP TABLE TEST_RBIN;
 
SQL > CREATE TABLE TEST_RBIN (COL1 NUMBER);
 
SQL > INSERT INTO TEST_RBIN VALUES (2);
 
SQL > COMMIT;
 
SQL > DROP TABLE TEST_RBIN;
 
SQL > CREATE TABLE TEST_RBIN (COL1 NUMBER);
 
SQL > INSERT INTO TEST_RBIN VALUES (3);
 
SQL > COMMIT;
 
SQL > DROP TABLE TEST_RBIN;
 
SQL > SHOW RECYCLEBIN;
 
ORIGINAL NAME    RECYCLEBIN NAME                      OBJECT TYPE      DROP TIME
---------------- ------------------------------  ------------     -------------------
TEST_RBIN        BIN$2e51YTa3RSK8TL/mPy+FuA==$0   TABLE          2010-05-27:15:23:43
TEST_RBIN        BIN$5dF60S3GSEO70SSYREaqCg==$0   TABLE          2010-05-27:15:23:43
TEST_RBIN        BIN$JHCDN9YwQR67XjXGOJcCIg==$0 TABLE            2010-05-27:15:23:42
 
SQL > FLASHBACK TABLE TEST_RBIN TO BEFORE DROP RENAME TO TEST_RBIN1;
 
SQL > FLASHBACK TABLE TEST_RBIN TO BEFORE DROP RENAME TO TEST_RBIN2;
 
SQL > FLASHBACK TABLE TEST_RBIN TO BEFORE DROP RENAME TO TEST_RBIN3;
 
SQL > SELECT * FROM TEST_RBIN1;
 
      COL1
----------
         3
SQL > SELECT * FROM TEST_RBIN2;
 
      COL1
----------
         2
 
SQL > SELECT * FROM TEST_RBIN3;
      COL1
    ----------
         1
 
Note:
The un-drop feature brings the table back to its original name, but not the associated objects like
indexes and triggers, which are left with the recycled names. Sources such as views and
procedures defined on the table are not recompiled and remain in the invalid state.
These old names must be retrieved manually and then applied to the flashed-back table.
Clearing the Recycle Bin
To Clear the Recycle bin the following SQL Statements can be used.
To Clean only a particular table, the following Statement will be used,
 
SQL > PURGE TABLE << Table_Name >>
 
Its possible to Purge the table based on the System Generated table name also
 
SQL > PURGE TABLE << Table_Name >>
 
This command will remove the table and all dependent objects such as indexes, constraints,
and so on from the recycle bin, saving some space. To permanently drop an index from the recycle bin,
the following statement can be used
 
SQL > PURGE  INDEX  <<Index_Name >>;
 
This will remove the index only, leaving the copy of the table in the recycle bin.
Sometimes it might be useful to purge at a higher level. For instance, to purge all the objects in recycle bin
in a particular tablespace,
 
SQL > PURGE TABLESPACE <<Table Space Name>>;
 
It is possible to purge only the recycle bin for a particular user in that tablespace.
This approach could come handy in data warehouse-type environments where users create and drop many transient tables.:
 
SQL > PURGE TABLESPACE <<Table Space Name>> USER <<User Name>>;
 
To clear the complete recycle bin , the following statement can be used
 
SQL > PURGE Recyclebin;
 
It is possible to purge the table while dropping the table itself.
The following statement would be used to achieve this,
 
SQL > DROP TABLE  << Table_Name >> PURGE;
 
Example,
Create the Table and then Drop the table,
 
SQL >  CREATE TABLE TEST_RBIN (COL1 NUMBER);
 
SQL >  INSERT INTO TEST_RBIN VALUES (1);
 
SQL > COMMIT;
 
SQL > DROP TABLE TEST_RBIN;
 
View the recycle bin entries with show recycle bin option,
 
SQL > SHOW RECYCLEBIN;
 
ORIGINAL NAME    RECYCLEBIN NAME                      OBJECT TYPE      DROP TIME
---------------- ------------------------------  ------------     -------------------
TEST_RBIN        BIN$2e51YTa3RSK8TL/mPy+FuA==$0   TABLE          2010-05-27:15:23:43
 
Clear the table by executing the following Statement
 
SQL > PURGE TABLE TEST_RBIN; or
 
SQL > PURGE TABLE “BIN$2e51YTa3RSK8TL/mPy+FuA==$0”
 
Verify the Recycle bin, it will not have any entries for the table TEST_RBIN,
 
SQL > SHOW RECYCLEBIN;
 
Note:
Once the Table is purged from recycle bin, it will not be possible to restore by using FLASHBACK command.
Space/Quota Issue
Objects in the Recycle Bin will remain in the database until the owner of the dropped objects decides
to permanently remove them using the new PURGE command.
The Recycle Bin objects are counted against a user's quota. But Flashback Drop is a non-intrusive feature.
Objects in the Recycle Bin will be automatically purged by the space reclamation process if
1. A user creates a new table or adds data that causes his/her quota to be exceeded.
2. The tablespace needs to extend its file size to accommodate create/insert operations