1, create a query Oracle SQL script file, named Cx.sql, which defines three variables
Last_date Yesterday's timeToday: the time of dayfile_name: Exported filename&1, &2, &3 represent the three arguments that are passed to the shell script that is
The trunc function is the Intercept date, which can be accurate to the hour. The date data type is still available after the interception.
First, basic usage1, the default interception to the day, for example:
Select Trunc (sysdate) from dual;
Oracle database installed on the Ali Cloud, one day received the following alerts:Name=atabasenameType=database InstanceHost=izw2519p6r9uzeeeMetric=statusTimestamp=nov, 2014 4:16:37 AM CSTSeverity=criticalmessage=failed to connect to database
In some cases, may be due to misoperation, not small first drop diskgroup, this time do not be nervous, such a failure, can be a perfect recovery through kfed (data 0 lost). If the related ASM disk is further damaged, then the subsequent recovery is
--Date related functions--1.day (Date_time), returns an integer that represents the day in the datepart of the specified date. Month (date_time), year (date_time) similarSELECT Day (GETDATE ())--returns 23--2.datepart (Datepart,date) that returns
Question Prompt
Error tip: Error:ora-12514:tns:listener could not resolve service_name given in Connect
Workaround:
The code is as follows
Copy Code
1. Open the /network/admin/listener.ora file and
Today when you do the project to achieve paging functionality, previously only on MySQL, Oracle has not tried, but know that there is such a rownum this thing.
But this thing is not so easy to use, there are quite a lot of places to pay
The data in the updated table of the UPDATE statement. The following information is specified in the UPDATE statement: This is changing the table name, a local record is changed, a list of column names, giving them new content values, depending
1. Use of query statementsUse a SELECT statement and a subquery (subquery) to return data from one or more tables, views, and entities.1.1 Related subqueriesYou can use a subquery (as subquery) or in or exists as part of a condition of a where, such
Query traversal, which needs to be stored in a hierarchical structure of data in the base table. For example, an organization is a typical example of this:
Implementation statement:
Select column
From table_name
Start with
Row migrations cannot be avoided, and increasing the size of each block can reduce the likelihood of row migration, but can also result in greater space waste. This balancing point needs to be determined according to the application.
"Row Migration"
--Create a test table
code is as follows
copy code
Create Table T_a (ID number); --Insert data directly using loops Begin for I in 1..100000 loop INSERT INTO t_a (ID) values (i); End Loop; End; --
Oracle database system is a complex software system. Oracle architecture refers to the components of an Oracle database management system and the interrelationships between these components, including memory structure, background process, physical
It is believed that a large number of system administrators are doing the same job every day-backing up the data. Once a day of negligence, and this day the system is precisely the fault, the need for data recovery, then there is nothing at this
Today, Oracle databases are favored by more and more enterprises because of their high reliability, security and compatibility. The reader may wish to consider some of the following aspects of how to keep the Oracle database permanently in good
Oracle's data dictionary is one of the most important components of the database tutorial, which arises as the database is generated and changes as the database changes,
Some tables and views are reflected under the SYS user. The data dictionary
There are many useful functions in the Oracle function library, such as Nvl,sign,round, which use more, the function is larger or decode this function. The use of this function is as follows:
Decode (expression, condition 1, result 1, condition 2,
Download the software package to the official website, first register an account number, download is a compressed package, extract the oracle-xe-11.2.0-1.0.x86_64.rpm. There are only 64-bit versions under Linux.
1, install the dependent package
The operations of the unused column and drop column are essentially different, and the unused makes the SQL inaccessible to column by changing the data dictionary's information, and the drop is changed directly at the physical data layer. The
Assm level-3 bitmap is the basic skill knowledge of dba. Here we use the test method to verify the principle of level-3 bitmap.1. Create tables required for the lab environmentSQL> create tablespace a1 datafile
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