Friday, May 29, 2015

Using Mysql update values from one table to another table

UPDATE  `pqrs-es-developmentdb`.survey_entity_mapping
INNER JOIN  `pqrs-es-developmentdb`.survey ON (`pqrs-es-developmentdb`.survey_entity_mapping.surveyid = `pqrs-es-developmentdb`.survey.surveyid)
SET `pqrs-es-developmentdb`.survey_entity_mapping.year_id = `pqrs-es-developmentdb`.survey.survey_year_id

Monday, November 17, 2014

How to deploy your Java application on Amazon web services (Using Amazon Tool Kit for Eclipse)

It took me 24 hrs to do this .It was very simple to configure but the help documentation was all over the web . So , after finishing my configuration and successfully deploying my application I am here writing my blog.

  • Create a RDS database
Go to Amazon management console and click on RDS.Click on Launch a DB Instance button  and create your db. Remember username and password for your db
  • Configure the security group to access your database from the local system
Add your system ip address to the security group . Click on edit and then click on select box which is with the heading source.  select "my ip" from the list and save
  • Data Migration
Transfer  data from your old database to new database.I did it using mySQL workbench migration wizard and a new schema was created

How to:

Create a connection to aws database, test the connection.
Now --> go to Database --> Migration wizard and import the required database to the aws.

  • Configurings AWS Toolkit to work with your project:

Note: create role, create group, create users - give them administrative permissions

Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. If you don't have access keys, you can create them by using the AWS Management Console. We recommend that you use IAM access keys instead of AWS root account access keys. IAM lets you securely control access to AWS services and resources in your AWS account.
Note
To create access keys, you must have permissions to perform the required IAM actions. For more information, see Granting IAM User Permission to Manage Password Policy and Credentials in Using IAM.
  1. Open the IAM console.
  2. From the navigation menu, click Users.
  3. Select your IAM user name.
  4. Click User Actions, and then click Manage Access Keys.
  5. Click Create Access Key.
    Your keys will look something like this:
    • Access key ID example: AKIAIOSFODNN7EXAMPLE
    • Secret access key example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
  6. Click Download Credentials, and store the keys in a secure location.
    Your secret key will no longer be available through the AWS Management Console; you will have the only copy. Keep it confidential in order to protect your account, and never email it. Do not share it outside your organization, even if an inquiry appears to come from AWS or Amazon.com. No one who legitimately represents Amazon will ever ask you for your secret key.

    Restart the eclipse  
  • Deploying to the AWS Elastic Beanstalk from the eclipse:
Create Ec2 pair using below url:

 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#having-ec2-create-your-key-pair.

After creation , associate the key pair file with the key pair in the eclipse.
Right click on the key pair and associate the key pair file which you should have on your desktop.

Deploy the Application:

Go through this amazon resource to complete the deployment.

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Java.sdlc.html

Errors I got:

502 Proxy Error: This is because I didn't add the key pair file to the key pair in the eclipse.


Helpful Resources:

http://java.awsblog.com/

 

 





Thursday, April 26, 2012

how to export data into excel from oracle sql developer 3.0.04

  • Retrieve the data you need with the select statement.
  • Select all the required data.
  • Right click and then you can find the export button. 
  •  
  • Select the xls for excel sheet and then follow the instructions.
  • The path where you have saved the sql file will give you the exported table data.

How to select 'n' number of rows in oracle?

Use this query,

select * from table_name where rownum < 'n';

table_name is your table name.
'n' is number of rows you want to retrive.

Saturday, December 17, 2011

How to remove Remove Joomla SEO powered by JoomSEF

1. Go to /components/com_sef/
2. Find file joomsef.php
3. Find the word $cacheBuf2
4. Remove the content inbetween the


That's it , you are free from the links.....

Sunday, July 31, 2011

Converting .zip file to .war file

You can change the name of the file from .zip to .war using command prompt.

1.Go to the file location

2. Use this command. Ren file.zip file.war

That's it . Happy coding.

Wednesday, June 22, 2011

Your PHP settings limit the maximum file size per upload to 16 MB. Depending on your server environment -- Drupal upload error

I have changed the upload_max_filesize = 800M and also post_max_size = 800M . I am still getting the same error. I have also restarted the apache.

Then I added the following code snipet in .htaccess file of my drupal root directory.
  • php_value upload_max_filesize 800M
  • php_value post_max_size 800M
It worked.

Now I am able to upload upto 800 MB of files.