/* Create a table without automatic identification */Create Table Product(PID Number (15) primary key not null,Pname varchar2 (20) not null);Commit;
Insert into product (PID, pname) values (1, 'mydrian ');Commit;
/* Clear table records */
Oracle is installed on the local machine, and the machine starts up every time it starts up. The machine starts up for half a day. Set it to manual start. Services. MSC is required each time and start one by one, which is troublesome.
It is much
1.Queries the current tablespace of a database.
Select tablespace_name, file_name, sum (bytes)/1024/1024 table_size from dba_data_files group by tablespace_name, file_name;
2.Create a tablespace
Create tablespace data01 Datafile
Many people should encounter deadlocks in multiple Oracle processes. Below are two simple SQL statements to kill the deadlock process:
-- Sep2, 2008 eleven. Xu
-- Select locked Process
Select S. username,
L. object_id,
O. Name,
L. session_id,
Oracle views do not support parameters
There is an alternative method. It is not very good, but it is still a solution.
Using package
Create or replace package pkg_pv is
Procedure set_pv (Pv varchar2 );
Function get_pv return varchar2;
// create a temporary tablespace create temporary tablespace test_temp tempfile 'e: /Oracle/product/10.2.0/oradata/testserver/test_temp01.dbf ' size 32 m autoextend on next 32 m maxsize 2048 m extent management local; // create a data table
Questions I designed: Oracle interview questions
1. What is a bare device in Oracle?A: A bare device is a storage space that is directly accessible by bypassing the file system.
2. How can I determine from which machine a user logs on to Oracle?A:
It is not very common to query the character set modification Character Set of oracle.
Query the character set of Oracle
Method 1
SQL> select userenv ('language') from dual;
Userenv ('language
To output data files in the correct format, you only need to use character links during select to standardize the format. For example, see the following table.
SQL> select ID, username, password from myuser; // test table 1 John 1234 2 Jack 12345
Oracle 10g AWR Report Generation Process
Oracle10g provides an AWR Report, which is automatically recorded every hour by default. This report is useful in both performance testing and real-time production environments, briefly describe the process
Sequence:
If you want to query employeesTableMaximum Value of medium IDSelect max (employee_id) from employees;
However, to ensure the uniqueness of the primary key insertion, if you use max (employee_id) + 1Because concurrent operations may occur.1
What is the relationship between last_date and next_date in the job and interval? Does last_date indicate the start time and end time of the job. Is next_date the start time of the job or the end time plus interval?
If a job is executed for a long
All codes are tested in SQL * Plus of Oracle 9i. Follow these steps to create independent files.
1. Create your own user file (Table owner ).
Prompt -------------------------------------;Prompt this part is to setup Object Creator .;Prompt ----------
Dbutil class. Later, I gradually thought it should be a tool class used to connect to the database. This is the dbutil class I extracted from the last sqlhelper class. It's just for your reference. It's not the dbutil class in instructor Han's video.
Share an unexpected Oracle Database Host Performance Test Result
Recently, I have been doing some research on Oracle SQL Performance quantification. It is very complicated to implement more accurate SQL Performance quantification, and I have been
1. Set linesize 100; set the length
2. Set pagesize 30; set the number of entries displayed on each page
3. Open the notepad ed F: \ soft \ key.txt in Ed a. SQL, which indicates opening the file on drive F. If it does not exist, you will be prompted
When installing clusterware, an error is reported. to reinstall it, you must first clear the installed cluserware. Otherwise, the next installation may be affected. Generally, you only need to run the rootdelete. SH and rootdeinstall. Sh scripts
When the machine on which Oracle is installed changes the machine name or IP address. Then the original dbconsole cannot start.
Or an error is reported when running emctl start dbconsole in DOS. Solution:
1. Modify the Dbsnmp password:
To
When using MySQL, you often need to replace the field with a null value. It is not feasible to directly use "field name = NULL". The correct method is:Where isnull (field) in )"
Syntax:
Replacement of a null value found in ms SQL Oracle MySQL
In
Procedure
Create or replace procedure ivan_sptest1 (
Material_no in sd_form_box.material_no % type,
Pallet_id in sd_form_box.pallet_id % type,
Box_id in sd_form_box.box_id % type,
V_ds1 out sys_refcursor,
V_ds2 out sys_refcursor
)
Is
Sql1
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