Oracle on Windows in the EC2 cloud. Persist computer name across instance shutdown.
For various reasons it is important that your Windows computer name persists across instance shutdown on EC2 (listener, tnsnames.ora, loopback adapter etc.).
To achieve this you need to perform the following steps:
1. Connect to your instance via remote desktop
2. Change the computer name via control panel
3. Open windows explorer and browse to the EC2 config tool. By default this is located at C:Program FilesAmazonEc2ConfigSetup. Double click Ec2ConfigServiceSettings.exe
4. On the General tab deselect Set Computer Name
5. Go to the Bundle tab. Deselect Sysprep
6. Log on to the AWS Management Console
7. Right click your instance and select Bundle Instance. This will take a while to complete.
8. Go to Bundle Tasks and select Register as an AMI.
The next time you launch your instance from your AMI you will see that the computer name you entered in step two has persisted across instance termination.
Before bundling your instance stop the Oracle Windows service. I typically set the Oracle service to start up manually. As the bundle task reboots the machine before taking an image it guarantees that the Oracle service is not started.