This is also an old problem. Simply write it here, so that the next time you encounter it, you will not be overwhelmed by headless flies.You can use oledb to connect to an Oracle database. Generally, there are two kinds of providers.A: provider =
Recently, the company's servers seem to have problems, and problems may often occur when they are not moved. PLSQL also often fails to log on to the server, thinking of database backup, just in case.SimpleCodeAs follows:
// Create a process
After the local Oracle connection is created, it is the GBK character set by default. If the connection server is not the same GBK character set, Chinese garbled characters may occur, in this case, we need to modify the local character set to match
To be honest, I don't know much about the syntax of Oracle databases. I think there are some things that we can use as long as we can. Let's talk about some minor problems encountered when I learned about it recently. I have used its visualization
Dbms_random.value in Oracle generates a number with a decimal part. to limit the range and obtain an integer, you should:
Floor (dbms_randm.value * 200 + 1 );
Select floor (12.23) from dual;Floor (12.23)------------12
Select round (2.34)
Excerpt 11. Use the Oracle Net manager tool(1) Open Oracle Net Manager(2) Add "service name"Step 1. net service name: enter any nameStep 2 Communication Protocol: If you connect to Oracle on a remote machine, select TCP/IP (Internet Protocol)Step 3.
For a simple tree query (recursive query) in Oracle, I want to summarize it very early. I found one and transferred it.
Deptid
Paredeptid
Name
Number
Number
Char (40 bytes)
Department ID
Parent department
Install Oracle 10g R2 on centos5
I. Basic ConditionsGraphic Interface, in addition to Kde, full installationTo install a browser, you can connect to the Internet
It is best not to start SELinux
Vim/etc/sysconfig/SELinux
Remove unnecessary services,
Type Selection:
32-Bit Memory is a bottleneck and is already in the 64-bit era. Use 64-bit centos6 and 64-bit Oracle 11g r2Install VMWare Player 5 on a virtual machine and set the network in hostonly ModeNote: For NICs that can access the Internet,
Java class
MySQL
Oracle
Bytes
Range
Character
Char (1)
Char (1)
2
0 ~ 65535
String
Varchar (255)
Varchar2 (255)
String-clob
Longtext
Clob
Date-date
Date
Run CMD in start -- run -- and then enter the sqlplus sys/password as sysdbaLog in with the Sys permissionThen you can perform the following operations ,:Create user test indentified by test;In this way, a user named test is created.However, at this
Oracle Top N
1. implement select Top N in Oracle
Since Oracle does not support the select top statement, order by and rownum are often used in Oracle to query the select Top N statement.
To put it simply, the implementation method is as
Hit/Miss ratios
Here are some scripts related to hit/Miss ratios.Buffer hit ratio
Buffer hit ratio notes:
Consistent gets-The number of accesses made to the block buffer to retrieve data in a consistent mode.
Db blk gets-The number of blocks
-- Create Test Data
Create Table A (ID number );
Create Table B (ID number );
Insert into a values (1 );
Insert into a values (2 );
Insert into a values (3 );
Insert into B values (1 );
Insert into B values (2 );
Insert into B values (4 );
Since Oracle EBS {Tagshow (Event)} "> The lecture" r concluded on June 18 "is very popular, but it is restricted by regions and time, so it cannot benefit more people. This time, Cloud. instructor Gong used his spare time to record for everyone
In Oracle10g, I did not pay attention when creating the table. I directly created the table using the SQL statement sent to me by someone else. After the table is created, the Select * from table name is found. The system prompts that the table or
Process related:
1. Find the SID of the current session, serial #
Select Sid, serial #
From v $ session
Where audsid = sys_context (userenv, sessionid );
2. query the OS process ID of the session.
Select P. spid "OS thread", B. Name "name-user",
Background: InWindows2003ServerUpperInstallNowOracle9.2.0.1.0. We plan to upgrade it to version 9.2.0.8 with the latest security patch.2008.1. Upgrade Oracle (administrator user permissions)(1) download the upgrade package from Metalink. The patch
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