Sunday, 5 January 2020

Moving Index from One Splunk Indexer To Another





Moving indexes in Splunk can be required in migrations, upgrades or simply as an exercise for backup and restores.
In this example, we will move an index called SSG from a Splunk 7.02 server called UBUNTU07 running on Ubuntu Linux to another 7.02 Splunk server running on another Ubuntu server called SPLUNKOSAUR. We are assuming that Splunk is installed in the default Linux location (/opt/splunk) and that the indexes are in the default Splunk location (/opt/splunk/var/lib/splunk) – if not, adjust the paths accordingly. For Linux/Windows combinations, the copy commands have to be adjusted accordingly but otherwise the overall process remains the same.
Step 1
On the new server, create an index with the same name. In this case we will create an index called SSG on SPLUNKOSAUR:
Create new index
Step 2
Stop Splunk on the new server (SPLUNKOSAUR). From a terminal  run:
sudo /opt/splunk/bin/splunk stop
Step 3
Remove the folder for the newly created index:
sudo rm -r /opt/splunk/var/lib/splunk/ssg
Remove new index
Step 4
On the old server, remove or disable any inputs that send data to the index that has to be migrated. In our case, we have a file monitor input that ingests a Juniper SSG firewall syslog logs into the SSG index:
Disable input
Step 5
Stop Splunk on the old server (UBUNTU07):
sudo /opt/splunk/bin/splunk stop
Step 6
Transfer the folder containing the index to be migrated to the new server. There are several ways to transfer folders between servers. In our case, we will use the scp utility (secure copy) that ships with any Ubuntu installation. scp is using SSH so the servers have to run the SSH daemon. If SSH is not installed, the installation is rather simple. In a terminal prompt run:
sudo apt-get install openssh-server
To check the status of the SSH server run:
sudo service ssh status
Once SSH is installed on the receiving server, you can use the scp utility. To transfer a full folder use the following command:
sudo scp -r /opt/splunk/var/lib/splunk/ssg user_name@server_name_or_ip:”/opt/splunk/var/lib/splunk/ssg”
Replace user_name and server_name_or_ip with the corresponding values. In our case, SPLUNKOSAUR has an IP address of 192.168.5.25 and we will use a user called jdoe so the syntax would be:
sudo scp -r /opt/splunk/var/lib/splunk/ssg jdoe@192.168.5.25:”/tmp”
scp command
This will transfer the ssg folder to the /tmp folder on the new server.
The user will be prompted for the password and if entered correctly, the copying will be initiated. The duration of the copying process will depend on the amount of data to be transferred and the type of connectivity between servers. If the volume of data is very large and/or the connectivity between servers is slow or inexistent, then the files can be transferred with a portable media such as an USB drive. In any case, the end results have to be the same: the existing SSG index folder from the old server has to end up in the indexes folder on the new server.
scp completed
Step 7
On the new server, transfer the ssg folder from /tmp to /opt/splunk/var/lib/splunk. Depending on the user that you are logged in as, you may have to become root (i.e. use the “sudo -i” command to facilitate all the rest of the commands that you need to configure the new folder properly):
mv ssg /opt/splunk/var/lib/splunk
After the transfer, the /opt/splunk/var/lib/splunk folder on the new server should look something like this:
new server listing
Step 8
Note that the ssg folder has as owner and group the user that was used to transfer the folder (jdoe). Adjust the ownership of the SSG folder to match the existing indexes:
chown root:root /opt/splunk/var/lib/splunk/ssg
The folder should indicate root as owner and group:
change folder owner
Step 9
Start Splunk on the new server (SPLUNKOSAUR):
/opt/splunk/bin/splunk start
Login into the new server and verify that the SSG index has all the data from the old server:
New index migrated
Perform a search to validate that the data is available:
data present
Recreate the inputs as needed. This depends on the nature of the previous inputs, i.e. if the input was for local files, the source of the data will have to be transferred to the new server or the old server configured as a forwarder.
Step 10
As the last step, restart the old server and remove the old index.
NOTE: The information here is copied from below link -

Saturday, 27 September 2014

How to Uninstall Oracle 10g from windows 7 completely

How to Uninstall Oracle 10g from windows 7 completely

Here I am gonna show you how to uninstall Oracle client software completely from the system. Most of the guys fear about this :-). Just have a look and follow the same steps while uninstalling Oracle from your system:

1.1 Stopping Oracle Services on Windows

To stop Windows services:

  1. Open the Services control panel and from the Start menu, choose Control Panel, then Administrative Tools, then Services.
  2. If any Oracle services (names begin with Oracle or Ora) exist and have the status Started, then select each of the services, and click Stop.
  3. Click Close to exit the Services window.
  4. Exit the Control Panel.

1.2 Removing Oracle Database Client with Oracle Universal Installer

Oracle Universal Installer creates Windows services for Oracle components during installation. However, Oracle Universal Installer does not delete all the services created by Oracle Net Configuration Assistant.
To remove components on a Windows computer with Oracle Universal Installer:
  1. Ensure that you first follow the instructions in "Stopping Oracle Services on Windows".
  2. Start Oracle Universal Installer. The start procedure depends on which version of Oracle Database Client you installed.
    1. If you installed the Administrator, Runtime, or Custom versions of Oracle Database Client, then Oracle Universal Installer was also installed. From the Start menu, choosePrograms, then Oracle - HOME_NAME, then Oracle Installation Products, then Universal Installer. The Welcome screen for Oracle Universal Installer appears.
    2. If you installed the Instant Client version of Oracle Database Client, Oracle Universal Installer was not installed. Instead, run it from your installation media or the installation directory you created for downloaded or copied installation files.
    3. To start Oracle Universal Installer from the installation media, insert the CD labeled Oracle Database Client. The Autorun screen automatically appears.
      If the Autorun screen does not appear, from the Start menu, choose Run, and then enter the following command:
      DRIVE_LETTER:\autorun\autorun.exe
      
      
      Choose Install/Deinstall Products from the Autorun screen.
    4. To start Oracle Universal Installer from your installation directory, double-click setup.exe.
  3. Click the Deinstall Products button.
    The Inventory screen appears.
  4. Select the Oracle home you wish to remove. Expand the tree of installed components only if you want to remove selected components of an Oracle home.
    For example, if you installed Oracle Database Client with the Runtime option and later installed additional components with the Custom option, then expand the Oracle home component to display all the components installed in the Oracle home.
  5. Check the boxes of components to remove.
  6. Click Remove.
    The Confirmation screen appears.
  7. Click Yes to remove the selected components.

    Note:
    A message may appear indicating that removing some components may cause other components to not function properly.
    After the components are removed from your computer, the Inventory screen appears without the removed components.
  8. Click Close to close the Inventory screen.
  9. Click Cancel to exit Oracle Universal Installer.
  10. Click Yes to confirm that you want to exit.
  11. After Oracle Universal Installer exits, go to the next section to remove the remaining Oracle Database Client components.

1.3 Manually Removing the Remaining Oracle Database Client Components

1.3.1 Removing Only the Oracle Net Service Registry Key

To remove only the Oracle Net Service registry entry (if it exists):
  1. Log in as a member of the Administrators group.
  2. Ensure that you first follow the instructions in "Stopping Oracle Services on Windows".
  3. From the Start menu, choose Run, and then enter the following command:
    regedt32
    
    
  4. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete the OracleHOME_NAMETNSListener registry entry.
    When you ran Oracle Universal Installer to deinstall Oracle Database Client, it deleted all other Oracle Net services.
  5. Exit the registry editor.
  6. Restart your computer.


1.3.2 Removing All Oracle Registry Keys

To remove all Oracle registry keys from a computer (if any exist):

Caution:
These instructions remove all Oracle components, services, and registry entries from your computer. Exercise extreme care when removing registry entries. Removing incorrect entries can break your system. Any database files under ORACLE_BASE\ORACLE_HOME\DB_NAME should be deleted only after completing these instructions.
  1. Log in as a member of the Administrators group.
  2. Ensure that you first follow the instructions in "Stopping Oracle Services on Windows".
  3. From the Start menu, choose Run, and enter the following command:
    regedt32
    
    
  4. Go to HKEY_CLASSES_ROOT.
  5. Delete keys that begin with the following:
    • ORAMMCPMON10
    • ORCLSSO

    Note:
    These registry keys do not appear if you installed Instant Client.
  6. Go to HKEY_LOCAL_MACHINE\SOFTWARE.
  7. Delete the ORACLE Group key.
  8. If you installed Oracle Services for Microsoft Transaction Server, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services \Eventlog\Application.
  9. Delete the Oracle Services for Microsoft Transaction Server key.
  10. Go to HKEY_CURRENT_USER\Software.
  11. Delete all Oracle keys, including Oracle-HOME_NAME entries under: Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs.
  12. Exit the Registry Editor.
  13. Restart your computer.

1.4 Updating the PATH Environment Variable Path

Check the PATH environment variable and remove any Oracle entries.
  1. From the Start menu, choose Settings, then Control Panel, then System. Select the Advanced tab and then click Environment Variables.
  2. Select the system variable PATH and edit it to remove any Oracle entries.
    For example, remove Oracle entries that contain ORACLE_BASE\ORACLE_HOME in the Path variable. You may see a Path variable that contains entries similar to the following:
    ORACLE_BASE\ORACLE_HOME\bin;ORACLE_BASE\ORACLE_HOME\jre\1.4.2\bin\client;
    ORACLE_BASE\ORACLE_HOME\jre\1.4.2\bin
    
    
  3. Save any changes and exit the Control Panel.

1.5 Removing Oracle Database Client from the Start Menu

Check the Start menu for any Oracle Database Client entries and remove them.
Perform the following steps:
  1. Using My Computer or Windows Explorer, navigate to the SYSTEM_DRIVE:\Document and Settings\All Users\Start Menu\Programs folder.
  2. Delete the Oracle - HOME_NAME folder.
You can also remove Oracle Database Client menu entries with the following instructions:
  1. Right click the Start button to display the context menu.
  2. Select the Explore All Users option.
  3. Expand the Start Menu\Programs folder if necessary.
  4. Delete the Oracle - HOME_NAME folder.

1.6 Removing Oracle Database Client Directories

After removing all Oracle Database Client registry keys and restarting the computer, delete any existing Oracle Database Client directories and files.
  1. Using My Computer or Windows Explorer, delete the SYSTEM_DRIVE:\program files\oracle directory.
  2. Using My Computer or Windows Explorer, delete all ORACLE_BASE directories on your hard drive.

Sunday, 6 July 2014

Installation of MySql Database

Let's see Installation of MySql Database:

1. Go to mysql.com and click on downloads.

2. Click on 'Download from Oracle eDelivery'.


3. It will ask for login credentials. So enter the same if you are already have a user ID and Password else register yourself.

4. After successfully login accept the license agreement by checking the box as showing in picture below:

5. Now choose the  MySql Installer and click finsih.

6. Your downloading done now.

Now we will see how to install it.

Please watch the video for installation: