This article describes how to create a database link to implement cross-database Oracle query.
1. Configure the tnsnames. ora file of the Local Database Server
$ VI $ ORACLE_HOME/Network/admin/tnsnames. ora
Add the following lines, where
Synonym: literally, it means an alias, which is similar to the view function in Oracle Database. Is a ing relationship. You can remotely operate databases.
1. Create a synonym statement:
Create public synonym table_name for
SQL> -- 1. query data used by employees SQL> select * from EMP; SQL> -- 2. query the salaries of employees whose job is "President" SQL> select Sal from EMP where job = 'President '; SQL> -- 3. query the information of employees whose
1. Connect to the serverGraphical interface: Open the Enterprise Manager of SQLSERVER and expand the corresponding DATABASE. Under Security, there is a project linked to the server. Right-click to addNote: You must have the administrator
Original SQL statement
Select t. mail_no, wm_concat (t. notice_no) as notice_no_all from ardba. arbino t group by t. mail_no
Error Message
SQL Solution
Select. mail_no, wm_concat (. notice_no) | max (. str) as notice_no_all from (select k.
Query statistics are often used in large database systems. However, for systems with large data volumes, users often feel slow when performing complex query statistics and cannot meet application requirements, this requires us to make reasonable
[Content Abstract]In the current development process. NET is favored by developers for its ease of use and good network support. Many projects use the Oralce database as the background database, however, some objects in the Database need to be
Create a procedure first!
Then create a job to execute her regularly!
(1) create or replace procedure droptable
Tmpname varchar2 (50); cursor ftmp is
Select table_name
From all_tables
Where table_name ''Yyymmdd')-7'
And table_name> = 'tmp '; begin
1>. NUMBER Type Details:Oracle number datatype Syntax: NUMBER [(precision [, scale])]Short for: precision --> pScale --> s
NUMBER (p, s)Range: 1 Data storage range:-1.0e-130 Saved in the machine range: 1 ~ 22 bytes
Valid: the number of digits from
1. Definitions and functions of parameter filesThe oracle Database configures the database through a series of parameters. These parameters are displayed in the form of key-value pairs, such:MAXLOGFILES = 50BACKGROUND_DUMP_DEST = C: \ DUMPHere, the
Check that the DATABASE is connected to the tnsping database and listens to lsnrctl to view SIDSQL> SELECT * from v $ INSTANCE; SQL> SELECT * FROM V $ DATABASE; SQL>/execute the previous operation command SQL> edit read command cache view language
The ORACLE time field is set to year, month, day, and quarter.
-- Obtain the year, month, and quarter.SelectTo_char (date, 'yyyymmdd') DATE_ID, to_char (date, 'yyyy') | 'Year' | to_char (date, 'mm ') | 'month' | to_char (date, 'dd') | 'day'
Functions in oracle can return table types
However, this table type is actually a set type (similar to an array)
This type cannot be the from object directly.
Since oracle 9i, a concept called "pipeline table function" is provided to solve this
I. Example of tianhui1. Yesterday's Data SummaryStartday> = to_char (trunc ($ startday-1), 'yyyymmdd ')And startday ($ Startday is the time scalar function trunc ($ startday-10) used to find the first day of the date)The function to_char (trunc ($
Here we provide optimization of the execution performance, rather than the background database optimizer:
According to various issues in database development performance, some optimization solutions are collected as follows (of course,
Code
(Reprinted)
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Add to favorites the original oracle deadlock killing Process
First, check which tables are locked.
Select B. owner, B. object_name,
Recently, we need to optimize the efficiency of the Oracle database, and then check a lot of efficient methods on the Internet to determine whether the record exists.
There are many suggestions for the first method on the Internet. I did a test, but
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