Monday, June 9, 2014

Microsoft Word : Assigning a KEYBOARD shortcut for deleting one line of text

Macro-based shortcut

  1. Create a new Macro with the following code (Alt+F8, specify the name, click Create):
    Selection.HomeKey Unit:=wdLine 
    Selection.EndKey Unit:=wdLine, Extend:=wdExtend 
    Selection.Delete Unit:=wdCharacter, Count:=1
    
  2. Assign a keyboard shortcut to it:
    • File > Option > Customize Ribbon
    • Click on Keyboard shortcuts: Customize (bottom left)
    • Scroll down the Categories list and select Macros, choose your new macro
    • Press the shortcut key combination (e.g. Ctrl+D)
    • Click Assign
    • Close > OK

Saturday, September 29, 2012

Reset the Oracle SYSTEM password

Scenario: Forgot the SYSTEM password for the ORACLE database installed in your computer.

Solution: You can reset it by logging in to Windows as Administrator and connecting to Oracle as sysdba.


Steps:

  • Log in to the Windows Server that is running Oracle as Administrator.
  • Start SQL*Plus

  • At the login prompt, in the user-name field, type ”/as sysdba”, and press enter

  • You are now connected as system with full DBA rights.

  • Reset the password of the SYSTEM  with below query
alter user system identified by NewPassword;
  • enter
“User altered.”
 
Now you can login with your new password.

Tuesday, June 26, 2012

Find Table by providing the Field or Column Name

You can use below statement to look into those objects to which you have access

select * from user_tab_columns where column_name=''

else to check in those objects to which you dont have access as well, you can use the below queries

select * from all_tab_columns

select * from dba_tab_columns

Monday, May 28, 2012

How to append path to Environment variable in Linux

The current value set to my environment variable PATH is

oracle@mymachine currentdirctory]$ echo $PATH
/home/oracle/Program/jdk1.6.0_21/bin:/home/oracle/app/oracle/product/11.1.0/client_1/bin:.:/home/oracle/Program/jdk1.6.0_21/bin:/home/oracle/app/oracle/product/11.1.0/client_1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin
Add new enviroment variable and set the path
[oracle@mymachine currentdirctory]$ export ANT_HOME=/home/oracle/myproject/apache-ant-1.8.4

Add the above path to PATH variable
[oracle@mymachine currentdirctory]$ export PATH=${PATH}:${ANT_HOME}/bin

[oracle@mymachine currentdirctory]$ echo $PATH
/home/oracle/Program/jdk1.6.0_21/bin:/home/oracle/app/oracle/product/11.1.0/client_1/bin:.:/home/oracle/Program/jdk1.6.0_21/bin:/home/oracle/app/oracle/product/11.1.0/client_1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/home/oracle/myproject/apache-ant-1.8.4/bin

You can see that the environmet path is appended.