1, first set up a directory :
Create directory directory name as ' a directory on the database server ', such as:
Create directory alias as ' d:\ server directory name ';
Put the imported or exported files in this directory
2, Export and
An error was encountered while installing Oracle
Preparing to launch Oracle Universal Installer from/tmp/orainstall2011-11-03_12-53-01pm. Please wait ... [Oracle@localhost database]$ Exception in thread ' main '
to see if an Oracle database is in archive mode
Sql> select Name,log_mode from V$database;
NAME Log_mode
------------------ ------------------------
TEST Noarchivelog
Sql> Archive Log List
Database log mode No Archive mode
Automatic Archival
What happens when we define a field name and alias with the same name as the Oracle keyword?
It's really simple, just add "" to this keyword, such as "group"
Look at the following example:
Copy Code code as follows:
sql> DROP TABLE
The following error is always reported today when manually configuring ORACLE11G's EM:
Warning:ora-00001:uniqueconstraint (Sysman. Parameters_primary_key) violated
Ora-06512:at "Sysman. Emd_loader ", line4986
Ora-06512:atline1
There is no solution
Oracle has many locks, and the utility of various locks is not the same. Oracle row-level locks are highlighted below, and Oracle row-level locks lock only the rows that the user is accessing. Can better guarantee the security of the data.
If the
The DISTINCT keyword can only filter all records in the query field (same Recordset), and if you want to specify a field without effect, another distinct keyword is sorted and inefficient.
The select distinct name from T1 can eliminate duplicate
Row_number () over (partition by col1 ORDER by col2) is grouped according to col1, sorted by col2 within the group, and the value of this function represents the sequential number of the internal sort in each group (a sequential unique within the
1, UPDATE nowait Apply the following scenario: Query a data and open database transactions to it. If the current data for the query is not locked, the result is returned correctly and the current data is locked, if the current data for the query is
In Oracle, the Utl_file package provides functions and procedures for manipulating text files, and learns about his basic operations
1. Create directory and authorize users
Copy Code code as follows:
--Create Directory
Create or
The total number of fields queried for a table in Oracle, using SQL statements, or in Pl/sql
Copy Code code as follows:
Select COUNT (column_name) from user_tab_columns where table_name= ' T_b_auditor '
The number of fields
1, view the currently unlocked object
Example: A table AA lock is executed with a select * from AA for update;
Way one: Through SQL query
Select ' Alter system kill session ', ' ' | | Trim (t2.sid) | | | Trim (t2.serial#) | |
From V$locked_object t1
1, the character type turns into timestamp
Copy Code code as follows:
Select To_timestamp (' January-October-08 07.46.41.000000000 a.m. ', ' Dd-mon-yy hh:mi:ss.ff am ')
from dual;
2, timestamp turn to date type
Copy
SQL statements for querying and deleting duplicate records1, look for redundant records in the table, duplicate records are based on a single field (ID) to judgeSELECT * FROM table where ID in (select Id from table GROUP by ID have count (Id) > 1)
Oracle database View How a process is executing the relevant actual SQL statements
Copy Code code as follows:
SELECT b.sql_text, sid, Serial#, Osuser, machine
From V$session A, V$sqlarea b
WHERE a.sql_address = b.address;
The following SQL statements can be used in Pl/sql to query which tables in the current database are locked and which users lock them:
SELECTA.owner,--object owned userA.object_name,--object name (table name)B.XIDUSN,B.xidslot,B.XIDSQN,B.SESSION_ID,
Using ORA to enter data into the datasheet ' Email_info '
When the user browses this script, displays a form that consists of a name, an email input field, and when the user adds a good data click Submit, the script will save the name and email to
Create A Table Using OCI
Below we will create an email personal information book. This time using the OCI8 API directive
Related PHP Code:
PUTENV ("Oracle_sid=orasid");
$connection = Ocilogon ("username", "password");
if ($connection = = False)
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