The following process is implemented in 9i:Declare type t_rn is table of TMP. rn % Type Index by binary_integer; type t_ran is table of TMP. num % Type Index by binary_integer; rn t_rn; ran t_ran; cursor cur_num is select rownum, trunc
I. First, run the TOP command to view the spid numbers with more resources.
II. Query SQL statements by PID
1. The first method is to query multiple PIDs.
(1) query the current time-consuming session ID, user name, sqlid, etc.In ('123',
I wrote TMD tricks on the Internet.
Idea: PLSQL depends on OCI. dll and some other files in the client, so it must be provided.
Locate listener. ora through the Environment Variable tns_admin,Tnsnames. ora to establish a connection.
Steps:
1.
Paging Query format:
Select * from (select a. *, rownum rn from(Select * From table_name) A where rownum = 21
Select * From table_name indicates the original query statement that does not flip pages. Rownum > = 21 control the range of each page
Envirement: Windows XP, Oracle 10g
Problem: When I open the EM browser, it shows that: "The database status is currently unavailable. it is possible that the database is in Mount or nomount state... "Then I go to start up, I input the OS and
1. Create the/etc/rc. d/init. d/Oracle10g script file as the root user. The content is as follows (the environment variable settings are modified according to the actual situation ):
#! /Bin/bash## Chkconfig: 35 95 1# Description: init script to
1. Complete database backupExpSystem/password @ SidFull = y file = D:/system. dmp log = D:/system. Log
2. Data warehouse receiving(A) Delete SDE and SDE user from the databaseDrop user SDE cascade;Drop user sdeuser cascade;(B) Create a New SDE user
The procedure is as follows:
1. 1. Create a C:/backup folder on the server (Folder path selected by the customer). 2. 2. Open dbbkup. bat --> modify the red part --> Save exp system/manager @ test file = D:/orabackup/% Date :~ 0, 4% % Date :~ 5, 2
Comparison of common functions of SQL Server and Oracle
1. absolute value S: Select ABS (-1) value o: Select ABS (-1) value from dual2. INTEGER (large) S: Select ceiling (-1.001) value O: select Ceil (-1.001) value from dual3. INTEGER (small) S:
A user-defined function is a code block stored in a database. It can return the value to the calling program. The call is like a system function, such as a max (value) function. value is called a parameter. There are three types of function
1,Ceil (N)Function: Take a value greater than or equal to a value.NThe smallest integer
2,Floor (N)Function: Take a value less than or equalNThe maximum integer
3,InstrAndLimit B: Query the position of the target string in the source
I,$ VI $ ORACLE_HOME/Network/admin/sqlnet. ora
If the sqlnet. ora file does not exist, generate the file as follows:
1) You can copy $ ORACLE_HOME/Network/admin/samples/sqlnet. ora to the $ ORACLE_HOME/Network/admin/directory.
2) use the netca tool
One or several autonomous transactions can be defined in one of your transactions (outer transactions. An autonomous transaction can be committed independently without affecting the outer transaction. Similarly, the rollback of the outer transaction
Raise_application_error is used to customize incorrect messages in PLSQL user programs.
This exception must be used in database subprograms (processes, functions, packages, and triggers), but not anonymous blocks and client subprograms.
Syntax:
From: http://blog.csdn.net/xuanxingmin/article/details/4266327
Oracle case statement
Currently, Oracle supports two case representation methods. One oracle is called simpleCase (simple form), and searched case (Query Form ). SimpleCase is
From: http://www.cnblogs.com/zjrstar/archive/2006/08/31/491090.html
Parsing Oracle rownum
For rownum, it is the number that the Oracle System sequentially assigns to the row returned from the query. The first row is allocated 1, and the second row
Lpad () function usage:
The lpad function fills the string on the left with some specific characters. The syntax format is as follows:
Lpad (string, N, [pad_string])
String: but a character or Parameter
N: the length of the character, which
Oracle stored procedures support arrays, which greatly improves the performance of batch data operations. If you need to insert 1000 records, the test_info table structure is:
--------------------------------------------------------------------
Id_
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