1) need to create a storage directorymkdir Backup2) Writing Shell footsteps #!/bin/bashExport Oracle_base=/opt/oracle- -The path needs to be changed according to the actual pathExport oracle_home= $ORACLE _base/ora10gr2/db_1 -The path needs to be changed according to the actual pathExport path= $ORACLE _home/bin: $PATHd=$ (date ' +%d ')Exp metabase/metabase@dskdb
Problem Description:Implementation of Oracle automated backup scripts.Error tip 1:Message file RMAN.MSB not foundVerify that Oracle_home is set properly。。。。。。Cause of Error:Automatic execution does not recognize the corresponding command and requires an explicit declaration of Oracle's environment variables in an automated backup script.Error Tip 2:Standard in must be a TTY。。。。。。Cause of Error:You cannot use a su or a pipe operation in Cron, you must
Implementation of Oracle's INSTR function MySQLIn a migration project, the instr function of MySQL can only find whether the child string is in the parent string. Here I wrote one for migration. Of course, here I only focus on migration, and may not fully implement the details of the original function.Oracle uses the following calls several times,
SQL> select instr ('this is belong to you, but not to me. ',' to ',) as pos from dual; POS --------------
This article summarizes the Oracle implementation of page query SQL syntax, collation for everyone for your reference, details are as follows:
1. No order by sort of the wording. (Highest efficiency)
After testing, this method costs the lowest, only nested one layer, the fastest! Even if the amount of data query is large, and almost unaffected, the speed is still!
The SQL statement is as follows:
1.sequence+trigger enables Oracle column self-incrementCREATE SEQUENCE sequence Name[INCREMENT by N][START with N][{Maxvalue/minvalue n| Nomaxvalue}][{cycle| Nocycle}][{CACHE n| NOCACHE}];Create a test table[Email protected] Cdb> CREATE TABLE TEST (2 ID Number (Ten) is not NULL,3 DESCRIPTION VARCHAR2 () not NULL,4 CONSTRAINT test_pk PRIMARY KEY (ID)5);Table created.elapsed:00:00:00.14[Email protected] cdb> CREATE SEQUENCE test_seq;Sequence created.ela
Label:1. Create a sequence
--Create sequence
Create sequence Innerid
MinValue 1
MaxValue 99999999999999
Start with 1
Increment by 1
Cache 20
Order
2.--innerid.currval refers to the current sequence
--innerid.nextval refers to the next sequence
Insert into admin values (innerid.nextval, ' a ');
Insert into admin values (innerid.nextval, ' B ');
Insert into admin values (innerid.nextval, ' C ');
Insert into admin values (innerid.ne
Prerequisites: Maintenance of statutory festivals (T_FDJR) in the official holiday calendar including Saturday Sunday/** * Function Description: Gets the days of the day after this date based on the date entered and the number of days * Input parameters: * i_date yyyy-mm-dd* I_day days*/Create or Replace functionFun_get_workday (i_datevarchar2, I_day Number) return varchar2 iskint:=0; D1 date; D2 date;beginK:=I_day; D1:=To_date (I_date,'YYYY-MM-DD'); D2:=D1+K; whileK> 0LoopSelect Count(C_RQ) in
The Oracle redo log operation aims to record data changes and provide database recovery. The following describes how to run the redo log, hoping to help you.
1. ORACLE introduces redo logs to record data changes and restore the database.
1. log files need to be grouped. The information stored by each member in the same redo log group is identical.
2. redo log files in each group are called members.
3. It is
Oracle DBA Database Senior Engineer Training Upper (project implementation + Backup Recovery + foundation depth)Purchase Address:Http://edu.51cto.com/pack/view/id-739.html
DescribeOracle DBA Database Senior Engineer Training course is the wind brother alone research and development of the fine combat courses, the road map is mainly to let everyone fast employment, high-paying employment. The course cont
Problem Description:
Implementation of the Oracle automatic backup script.
Error tip 1:
Message file RMAN.MSB not found
Verify that Oracle_home is set properly
。。。。。。
Error Reason:
Automatic execution does not recognize the appropriate command and requires an explicit declaration of Oracle's environment variables in an automatic backup script.
Error Tip 2:
Standard in must to be a TTY
。。。。。。
Erro
implementation steps:
1. Change init parameter resource_limit to true; restart the database;
2. Change the "Idle connection Time" of profile profiles for user profiles;
3. In the database query session state is "Snipe", through the operating system Orakill command to clear;
4. Define the Windows execution plan and execute the Kill_session_sql.bat script.
Script:
Kill_session_sql.bat content:
Set ORACLE_SID=ORA9/** Database instance sid**/
Sqlp
This article illustrates the Java implementation method for Oracle to insert the current time. Share to everyone for your reference. The specific analysis is as follows:
When I was doing a inser operation,To get the current time into the databaseis directly
Ps.setdate (New Java.util.Date ());
But it will report a conversion error.
This time should
Java.util.Date utildate = new Java.util.Date
In order to support the rapid development of the company's business, Huawei it to introduce a large number of talent. The basic requirements for the current recruitment are as follows:
1. Vacant Posts: ERP Implementation, Oracle development, software development, etc.2, the basic conditions: more than 3 years of work experience, Master's degree of 2 years of work experience, related graduate, degree, Engli
Yesterday a friend asked me how to monitor the operation of a pl/sql, here is a brief introduction to several methods.
Introduce more professional dbms_pipe implementation methods.
If you think the Dbms_application_info package is not professional enough, here is a more professional solution, through Dbms_pipe to achieve interprocess communication.
Using this method, the Pl/sql process of operation can send messages to the receiving process through
Label:MySQL's variable is required to implement line numbers, because MySQL Wood has rownumber. The variable definition in MySQL can be used Set @var =0 Or Set @var: =0 can be used = or: = both, but if the variable is used in other statements, such as: Select then must be used: =, because = will be treated as a comparison symbol 1 Select @rownum: [Email protected]+1 as rownum, b.* from (select @rownum: =0) A, b This is very useful, for example, to get a lot of rankings.[Reproduced]mysql in t
new tablesql> exec dbms_redefinition.sync_interim_table (' T1 ', ' ori_tab ', ' int_tab ');PL/SQL procedure successfully completed.Sql> SELECT COUNT (*) from Ori_tab;COUNT (*)----------51Sql> SELECT COUNT (*) from Int_tab;COUNT (*)----------Description If the source table is updated frequently, we can also use this method to make the source table and the new table as much data synchronization as possibleNote: The sync program determines the length of the Finsh in the following step because the
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.