Linux database creation and Data Import

Source: Internet
Author: User
I have never started linux before. This time, the customer's system installed linux, project release environment and database have been installed. As we were in a hurry to go online, we had to explore and handle it. Notes

I have never started linux before. This time, the customer's system installed linux, project release environment and database have been installed. As we were in a hurry to go online, we had to explore and handle it. Notes

I have never started linux before. This time, the customer's system installed linux, project release environment and database have been installed. As we were in a hurry to go online, we had to explore and handle it. Write it down for future reference.

First view version:

The user does not give a root account, so some directories cannot be accessed and some files cannot be operated. Many problems have been encountered before, but they have all been solved.

First, start Oracle.

Because it is not a root user, the password is always prompted when you switch to oracle. If the password is incorrect several times, there is no way. Then I tried sudo. Sure enough, yes.


Then start oracle and check the status.

  • -- View the listening method
  • Lsnrctl stat
  • Lsnrctl start
  • Go to sqlplus and switch to sysdba

  • Sqlplus/nolog
  • Conn/as sysdba
  • Create related users and tablespaces.

  • After creation, the PDM exported from other machines is uploaded to the local machine.

    Previously, the user who directly uploads the file to/home failed to access the file. Therefore, an update folder was created under/tmp/and PDM was uploaded to the directory. Normal access.

    Since oracle data pump is used, you must first create a file directory.

  • Check whether it is set up

  • After processing. Now you can import the relevant data. Exit sqlplus first. To oracle users.

    Import Statement

  • Impdp ABCDEFG/ABCDEFG @ localhost/adb DIRECTORY = dump_dir DUMPFILE = ABCDEFG2012_20120725_1146.DMP remap_schema = ABCDEFG2012: ABCDEFG remap_tablespace = ABCDEFG2012: ABCDEFG
  • Note that the remap_schema and remap_tablespace parameters are not used before, and the import is always unsuccessful. Because it is a different tablespace, the problem is solved after adding these two parameters. Data can be imported normally.
    After the data is imported, you can view the data on the client. The data is displayed normally. Now the project database connection parameters have been changed. Switch to the common user, go to the project directory, find jdbc. properties, and use vi to edit.

    Vi has never been used before, and operations are performed while searching for information. A total of three commands are used, that is, press I to enter the insert mode, and then press esc and then: x to save and exit. If you do not want to save it, you can: q! This command is forced to exit.

    This is almost done. Restart Project Service

  • Service resin restart
  • During the first Linux operation, we had a lot of twists and turns around and encountered many problems, but fortunately we all solved them. Summary:

    Chown myuser/var/www/webapps // This command can be used to change the owner. After modification, You can have operation permissions on the relevant files.

    The chmod 777/var/www/webapps // command can be used to change user operation permissions. 777 is the maximum permission.

    We finally found out that we can directly use su-root to switch to the root user. The permissions granted to this user by the customer are quite large.

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.