Shell Script connects Oracle database
Recently studied how to use shell script to connect to the database, and then execute the query statement. So for the script that needs to be executed regularly, we can build a crontab to execute it
First, installation oracle10g (hereinafter refers to oracle10g)
Most of the time Oracle installation is a headache, confusedly installed, the results can not be used, and then unloaded load loaded to install to feel the effect is getting worse, this
Article reproduced from: https://www.thinksaas.cn/group/topic/98721/
In the project, you will be able to insert multiple data into the database at once, and then take the data class to see two ways to insert it:
Method One:
The mybatis itself only
Reproduced from: http://blog.csdn.net/xixi_666/article/details/48179865
1. View the amount of space a table occupies:SELECT bytes/1024/1024 | | ' MB ' Table_size, u.* from user_segments u WHERE u.segment_name= ' jk_test ';2. View the actual size of
1. On demand: Use the stored procedures in the Dbms_mview package to enable manual refresh (default setting) refresh [Fast|complete|force] View refreshes: Complete: Refresh all. A query statement that is equivalent to performing a new view
original works, from the "Deep Blue Blog" blog, Welcome to reprint, please be sure to indicate the following source, otherwise held responsible for copyright liability.
Blue blog:http://blog.csdn.net/huangyanlong/article/details/43926321.
First
The causes Oracle index to fail for many reasons: 1, using functions on indexed columns. such as SUBSTR,DECODE,INSTR, and so on, the index column is operational. You need to set up a function index to solve it. &NBSP Create a function index by:
conditions for the occurrence of an implicit conversion
When the type of the source data and the type of the target data are different, if there is no conversion function, an implicit conversion occurs, also known as automatic conversion. Of course,
First, the distinction between partitioned tables and table partitions is clear: Table partitioning is an idea, and partitioning represents a technology implementation. Table partitioning can be considered when the size of the table is over G,
Select a.file_name,a.autoextensible,a.maxbytes,a.increment_by from Dba_data_files A;
--autoextensible automatically expands--maxbytes maximum--increment_by number of automatic expansion blocks
Sql> Show Parameter Db_blockNAME TYPE VALUE-----------
I. Permissions-related
1. Landing
Sqlplus System/admin as SYSDBA; Administrator Login System Account
Sqlplus Scott/tiger; Log on to regular user Scott
2. Managing Users
Create user Wahaha; Under the Administrator account, create a user
Using storage to implement
Create or Replace procedure proc_dropifexists (
p_table in varchar2
) is
v_count number (a);
Begin
Select COUNT (*) into the
v_count from
user_tables
WHERE table_name = UPPER (p_table);
One
Check Database Basics
1.1. Check the Orale database instance status:
1.1.1 Select v.instance_name,v.host_name,v.startup_time,v.status,v.database_status from V$instance v;
--status represents the current instance state of Oracle (open
After installing Oracle software, you can useUser name SysPassword: password when creating an Oracle instanceServer type: DBAORCL the default naming when installing softwareYou can go to the server
Create a new user name by using the following
A view is a logical table that is based on a table or multiple tables or views, and does not contain data, which allows you to query and modify the data in the table. The table on which the view is based is called the base table, and Oracle's
Author: The source of Xiaoxiang: http://www.cnblogs.com/kerrycode/
------------------------------------------type conversion function------------------------------------------------Automatic type conversion, ORACLE can automatically according to
In the absence of visual tools to monitor database performance, common scripts come in handy, and here are a few scripts related to Oracle performance for your reference. The following scripts are passed in Oracle 10g testing and Oracle 11g may have
In Oracle sequence is called the serial number, each time it will automatically increase, generally used in the need to order by serial number of places.1, Create SequenceYou must first have create sequence or create any sequence permissions,CREATE
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