Use of the Row_number () over () analysis function in ORACLE
Row_number () over (partition by col1 ORDER by col2) is grouped according to col1, sorted internally by col2, and the value of this function represents the sequential number after each
Cmd->sqlplus "/as sysdba" command line login OracleAt this point you can see what the default account, this step can be omitted.Cmd->select username from dba_users;//No semicolon will show a "2" on the next line, because sqlplus each command should
1, oralce website download installation odtforvs2015_121025 Restart vs
2. Project Reference Oracle.ManagedDataAccess.dll
3. Database connection string: User id=xxxx;password=xxxx;data SOURCE=192.168.0.XXX:1521/ORCL (database name)
4, the use of
Tom Great God wrote one for viewing Oracle database object space usage.The following shows how to use:
– Tools Source
CREATE OR REPLACE PROCEDURE show_space (p_segname in VARCHAR2, P_owner in Varc
HAR2 default
In some cases, we need to use a recursive method to organize the data, which is very easy to do in the program, but in the database, how to implement the SQL statement. Below I describe how to use recursive queries in Oracle with the most typical
DBA_XXX requires permission to view, otherwise there will be no errors in reports and views
1. Query All users (username, tablespace information)
SELECT * from Dba_users;
SELECT * from All_users;
Current User
select * from User_users;
2. View
Import Export using Exp/imp
Before starting Exp/imp, there are several points to note:
1 This section takes Oracle 10g for example.
2 Exp, IMP is the next executable file of the operating system, stored in the/oracle_home/bin directory.
So between
Let's take a brief note.
Today, helping colleagues guide the data, from the development environment to the test environment, found that a query is slow. See the execution plan, and found that the full table scan (about 300w records in the table),
Preface: What can you learn through this study
Directory:
One, what is a trigger.
second, what is the application scenario of the trigger.
1. Complex security Checks
2, the data confirmation
3. Realize audit function
4, the completion of data
My method source code:
public boolean addtickets (Ticketsvo vo) {Boolean flag = false;Date in the corresponding databaseTimestamp stamp = Dateconventer.strwithtimetotimestamp (Vo.getbegintime ());Object[] Paramvalues={vo.getticketname (),
Set Autotrace off
Set Autotrace on
Set Autotrace traceonly
Set Autotrace on explain
Set Autotrace on statistics
Set autotrace on explain statistics
Set Autotrace traceonly explain
Set Autotrace traceonly Statistics
Set Autotrace Traceonly explain
ORA-12505, Tns:listener does not currently know the SID given in Connect Desc.
One, the correct link string
"Data source= (description= address= (protocol=tcp) (host=192.168.1.100) (port=1521)) (Connect_data= (SID=ORACLE))); User Id=system; Password=
When using Oracle for paging queries, we typically carry a lot of parameters. But today I found a very strange thing, when the sort field is not a primary key, and the value of the sorted field in multiple data is the same, the sort order of the
Query and delete duplicate records SQL statement 1, find redundant records in the table, duplicate records are based on a single field (ID) to determine select * from table where Id in (select Id from table group Byid having count (ID) > 1) 2,
It is possible that the current number of connections on the database has exceeded the maximum value that it can handle.Select COUNT (*) from v$process--current number of connectionsSelect value from v$parameter where name = ' processes '--maximum
In today's ATM, the data is processed using pure JDBC, and when it is discovered that the relationship between user and Card,log is used, the field in the card is associated with the ID in user, and the number of inserted and updated rows that are
After SSH login under Linux:Su-oracle;Sqlplus/nolog;conn system/password; or Connect/as sysdba;Alter user username identified by password;=========================================1. Connect to the database using Oracle User Login[Email protected] ~]$
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