1. Sqlplus Running DB:sqlplus Sys/sys as Sysdba (Sys/sys as "username"/"password")
Or configure the client to run the client's sqlplus after listening
2. (can omit) view current service name:sql> Show parameter service_name
3. Modify Service
Case: Paging Query displays employee information: Show employee number, name, salary
1. Display four records per page
2. Employees showing the second page
3. Sort by descending monthly salary
Analysis:
1. You can display the location of the query
Do not know who originally wrote the function, take over to record, may use later.
* * Where In_rowid is a row id,in_owner the account name for the database, In_table_name is the database table name, in_column a long type of table field name for
The SELECT statement in Oracle can implement a recursive query with the start With...connect by prior clause, which is used in structured queries, and its basic syntax is:Select ... from where Start with Connect by ;: Filter conditions that are used
1, look at the user's proifle, which is generally default:
Sql>select username,profile from Dba_users;
2. View password expiration settings for the specified profile (such as default):
Sql>select * from Dba_profiles s WHERE s.profile= ' DEFAULT '
The disk of the Oracle installation directory is fully stretched, causing the Oracle database to hang, querying the Internet for a solution that is divided into two ways:
One, mobile table space files
1, modify the table space offline state
ALTER
Today colleagues let me delete a table of data, happy to say yes;
It looks like a simple task, it can be tricky to do, originally this table is a foreign key constraint, as a primary table exists.
But I just got in touch with the system, but it's
If only the scope partition is considered, and there are no child partitions, Oracle determines that the local index table space follows the following two principles:
1. If the table space is explicitly specified when the local index of the
1. Export data from the source database:
Syntax:
Exp user1/pwd1@test1 file= ' e:test.dmp ';
Example:
Exp TIANZHI_SMART/TIANZHI_SMART@192.168.56.60:1521/ORCL file= ' E:\tianzhi_smart.dmp ';
Application screenshot:I am stupid, the initial use, do
Oracle Mix is probably equivalent to a Web site such as Oracle's MSDN. The address is http://mix.oracle.com.
Developed by Oracle Appslab, JRuby on Rails to see the blog:http://oracleappslab.com/2007/11/12/lets-mix/.
And ThoughtWorks plays an
querying the table space in the current database whether to expand automatically
Select tablespace_name,file_name,autoextensible from Dba_data_files;To automatically expand the table space by modifying the data file for the tablespace, and limit
Article for reprint, and then can not find the original Bo address, sorry
To_week_by_year (to_date (' 2015-1-1 ', ' yyyy-mm-dd '))
CREATE OR REPLACE FUNCTION to_week_by_year (sdate in DATE) return number is result number; BEGINSELECTTo_char
Paging Query format:
SELECT *
from (
select A.*, rownum RN to
(SELECT * FROM table_name) A
WHERE rownum = 21
which
the most inner query select * FROM table_name represents the original query statement without paging。 RowNum = 21 control the
1.
IP error. Error in setting URL, for example: Jdbc:oracle:thin:@192.168.0.36:1521:sharp database server is incorrect: Ping server IP is correct.
Incorrect, change URL to correct port number error: generally not error.
To do this: type Sqlplus on
MySQL Chinese sort has a function such as convert (name using GBK), so I studied the Oracle Chinese sort:Using phonetic sortingSQL>Select*fromorder by Nlssort (name,'nls_ Sort=schinese_pinyin_m'); NAME---------------------------------------- a
1, enter the database Sqlplus/as sysdba2, check the user show parameter Db_name3, start to perform exec dbms_workload_repository after the test. Create_snapshot (); 4, after the completion of the pressure test execution exec
Oracle creates a new database, which is a table space that is created to assign a table space to a user.1. Create TABLE Spaces :CREATE TABLESPACE DATAFILE ‘C:\app\oradata\orcl\date.dbf‘ SIZE [K|M] [AUTOEXTEND [OFF|ON]];2. Create a user :CREATE USER
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.