Method 1: the simplest method (database creation required)
Backup:Directly copy the admin and oradata folders in the Oracle directory and the database under the ora92 directory to other storage for backup.
Recovery:1. Create a database that is
Varchar2(Size)Variable-length string,Length required Char(Size)Fixed-length string,The default value of the unspecified length is 1. Number(P, S)
Precision P value range: 1 ~ 38
Valid bit s value range:-84 ~ 127
S is a positive number, and the
When the field type in Oracle is number (m, n), it is generated using the codesmith +. nettiers template.CodeWhen the M and N values are specified, an exception occurs in data type conversion. The current solution is to only specify the data type as
You need to back up the Oracle database automatically on a regular basis and want to use the simplest tools and methods.
Timing: Use the scheduled tasks that come with windows to complete.
Backup: Use the Oracle export tool export. The command
Set database startup instance
Use operating system authentication to log on
Rebuilding Scott user environment
Switch to database DBA
Specify a separate tablespace for Scott.
C: \ Documents ents andSettings \ Administrator>Set oracle_sid =
Create user
SQL> create user Feng identifiedF123;
The user has been created.
You are not authorized to use the newly created user connection report.
SQL> conn Feng/f123
Error:
ORA-01045: User Feng lacks create sessionPrivilege; logon
Common sqlplus commands
SQL> Help Index
Enter help [Topic]Help.
@Copy pause Shutdown
@@Define print Spool
/Del prompt sqlplus
AcceptDescribe quit start
AppendDisconnect recover startup
Archive logEdit remark store
AttributeExecute
In the Oracle PL-SQL, left and right connections are implemented as follows
View the following statements:
This SQL statement uses the right connection, that is, the other side of the "(+)" is the connection direction. All records on the right
[Case 1]
Question:-- Trigger:-- Add employee information. The serial number is used as the automatic serial number (generated by serial number ),-- If the wage is less than 0, it is changed to 0. If the wage is greater than 10000, it is changed to
The following are SQL statements automatically generated by Oracle export backup and import recovery.Source codeEach variable has the following meanings:Exp_back_dir: directory where the DMP file of the Oracle database is exportedScript_file:
1. Oracle startup and Shutdown
1. In a single-host environment
To start or shut down the Oracle system, you must first switch to the Oracle user, as shown below:
Su-Oracle
A. Start the Oracle System
Oracle> svrmgrl
Svrmgr> connect internal
Svrmgr>
Before performing the following operations, you 'd better create a user name and password with the same name as the backup, as well as permissions, and table space.
The following is an operation in the CMD command window to see how it is imported.
Not supported: 24:00:00 formatApril 22 0:00:01 is (a bit depressing)
1. date to character:
Select sysdate, to_char (sysdate, 'yyyy-mm-dd hh24: MI: ss') from dual
2. character to date:
Select to_date ('2017-03-13 21:15:37 ', 'yyyy-mm-dd hh24:
After two days, I finally made a desired result...Here is just a summary of my learning process to help those who need it!
Prerequisites:The company asked our newcomers to accompany the server to the XML file on the mobile phone end. To put it
Oracle official reference: PL/SQL language referenc-> 9 PL/SQL trigger
Reasons to use trigger:
■ Automatically generate calculated column values■ Log events■ Gather statistics on Table Access■ Modify Table data when DML statements are issued
Colleagues want to save the stored procedure written by the project team, instead of dumping, but they can view it at any time. Each stored procedure is stored as an independent file. The first thing that comes to mind is that the development tool
I met many people on the Forum and asked how to judge.OracleShare mode or private mode. I was confused about this problem before.GoogleI found a lot of good things. I made a note to make it easier to understand and remember.
Dedicated server: a
As we all know, to connect to Oracle using PL/SQL, you need to install the Oracle client software. Have you ever wondered whether to directly connect to Oracle without installing the Oracle client?
In fact, I always wanted to do this, because
Distributed operations between SQL2000 and Oracle
The latest project will be cascaded with the data generated by Oracle, marking:
Database: our project: SQL2000 (independent server -- win2003) Customer: Oracle 9i (independent server -- win2003)
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