A packaged tool class that links Oracle databases to easily get connection objects to close statement, ResultSet, statment objects, and so on
Copy Code code as follows:
Package myutil;
Import java.sql.Connection;
Import
The examples in this article describe the Java-derived classes for MySQL and Oracle links. Share to everyone for your reference. as follows:
Import java.sql.Connection;
Import Java.sql.DriverManager;
Import java.sql.SQLException; public class
ORA-00604 error occurred at recursive SQL level string
Cause:an error occurred while processing a recursive SQL statement (a statement applying to internal dictionary tables).
Action:if the situation described in the next error on the stack can is
How to deal with the large types of CLOB and blobs
CLOB can be used to store large text data, storing up to 4GB of data, and is more common in application development. Java provides a corresponding Sql.clob class. It provides two methods to read
Oracle typically uses sequences (Sequence) to process primary key fields, while MySQL provides a increment for similar purposes;
But in the actual use of the process found that MySQL's self growth has a lot of drawbacks: can not control the step,
#!/bin/bash
# Desc: This script is used to export all table structures for a primary User: indication, field name, field type
# # DECLARE variables
Sid_profile= "/home/oracle/xxxprofile"
table_owner= "XXX"
Table_list_file=
1. Settings for parameter files
(1) View the dynamic parameter file
SELECT * from sys.props$ wherename= ' Nls_characterset ';
Dynamic parameter file: SPFile: Dynamic parameter modification in which can take effect immediately
(2) Modify dynamic
-----The growth of the database in the last seven days, this is only an estimate.
Select SUM (space_used_total)/1024/1024/1024 "Last 7 days DB increase-g"
From
Dba_hist_seg_stat S,
Dba_hist_seg_stat_obj O,
Dba_hist_snapshot SN
where
s.obj# =
The row and column conversions include the following six scenarios:
1. Column career Change
2. Row-Turn column
3. Multiple columns converted to strings
4. Convert multiple lines into strings
5. Convert strings to multiple columns
6. Convert
Description of the phenomenon:
Oracle Clusterware, Oracle cluster software introduced in Oracle 10G/11G version, if you need to reinstall Oracle Clusterware (CRS) on a server, you must first send Oracle Clusterware (CRS) Remove clean.
Alarm
The Oracle 11g default installation database starts the audit feature, resulting in increased Oracle cumulative sys.aud$ table and associated index data volumes;
If the table space is full, the ora-1654:unable to extend index SYS will be reported
-- ' One,two,three,four,five,six,seven,eight,n Ine,zero ' as source_string from dual), --counts the number of substrings in a string, using ', ' -- T2. Source_substring_count), -- ' [^,]+ ', 1 Since the Regexp_count () method is new to Oracle 11g,
Cursor (cursor) Concept Introductionis a result set (used when a query or other operation returns multiple results)Define a cursorCursor C1 is a select ename from EMP;To take a value from the cursorOpen cursor:--open C1; (Open cursor execution query)
Trunc,to_char,round,cast1.trunc intercept the number, the decimal place directly, the whole digit takes 0. Do not make roundingThe second argument is the number of bits to intercept, and if it is not an integer, only the integer digits.2.to_char (),
Oracle's reverse engineering refers to importing databases in Oracle, or, of course, databases in SQL Server into PD, which requires a link to a database and then reverse-engineered operations.First step: Establish a link to the
Oracle sqlplus Export Query ResultsThe results of exporting a query under Sqlplus are saved to a local SQL file, which can be used in the following ways:1. Connect database : sqlplus xmq/[email protected]:1521/DB2, Export SQL Script : set Feedback
Syntax for adding a field: ALTER TABLE tablename Add (column datatype [default value][null/not null],....);Modify the syntax of the field: ALTER TABLE tablename modify (column datatype [default value][null/not null],....);Syntax for deleting a field:
One, the most important difference: the importance of storing data is different"SYS" the base tables and views of all Oracle data dictionaries are stored in the SYS user, which is critical to the operation of Oracle, maintained by the database
First, the preparation before installation:First here to give my Baidu network disk link: Http://pan.baidu.com/s/1c1WF1PQ; fast speed of the small partners suggested to the official website: http://www.oracle.com/technetwork/database/
--Simple conditional judgment if–then--write a procedure that can enter an employee's name and, if the employee's salary is less than 2000, increase the employee's salary by 10%. Create or Replace procedure Sp_pro6 (spname varchar2) is--Define V_sal
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