Hibernate helper class (officially recommended)
Public class HibernateUtil {
Private static final SessionFactorySessionFactory=BuildSessionFactory();
Private static SessionFactory buildSessionFactory (){
Try {
// Create the SessionFactory from
1. Preparations1.1 If the server version is used, a graphical interface must be installed.$ Sudo apt-get install Ubuntu-desktop1.2 install necessary library packages$ Sudo apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool
When Oracle 9i Database is logged on, A ORA-01003 & ORA-01110 message is prompted, which probably means that the data file storage media is corrupt.
Startup nomount, normal;
Alter database mount, also normal;
Alter database open:
Alter database
1. What is bson?
BSON is a type of json Binary storage format, Binary JSON for short. It is the same as JSON and supports embedded document objects and array objects, however, BSON has some data types not available in JSON, such as Date and BinData.
1. ConceptsHadoop is an Apache open-source distributed computing framework, which includes DFS and MapReduce, a distributed file system. MongoDB is a document-Oriented Distributed Database and NoSql, here we will introduce a MongoDB Hadoop driver.
Connect to MySQL:
Format: mysql-h host address-u user name-p User Password
1. Example 1: connect to MYSQL on the local machine
Find the installation directory of mysql. Generally, you can directly enter the mysql-uroot-p command and press enter
Requirements:
Update the same records in Table t1 (t_statbuf) and Table t1 (T_Mt) to table t1.
1. incorrect syntax:[SQL]
UpdateTable_name t1Set(A, B, c) = (SelectA, B, cFromTable_name_2 t2WhereT1.a = t2.a );
In this way, all rows in Table t1 will
Recently, the company's project has been completed. It is a maintenance period. It is not very busy. You have no time to learn new things. Today we are going to learn a NOSQL (non-relational) database redis.
Redis is a key-value storage system.
In MongoDB1.6, it is easy to add members to the Replica Set as follows:
# Add new membersRs. add ("192.168.95.210: 10000 ");# Add new elected membersRs. addArb ("192.168.95.216: 10001 ");
With this configuration, Mongo automatically synchronizes
Sometimes the sameDBIDThere is a problem, for example: logic on the same machineDG.
The modification method is as follows:
Close Database
SHUTDOWN IMMEDIATE
Start the databaseMountStatus
STARTUP MOUNT
UseNidCommand, as shown
Edit script file[Python]
Db_user ="Root"
Db_passwd ="123456"
Db_host ="Localhost"
Backup_dir ="/Usr/local/apache2/htdocs/backup"
Time ="$ (Date +"% Y % m % d % H % M")"
MYSQL ="/Usr/local/mysql/bin/mysql"
MYSQLDUMP
Recently, I found several random SQL queries in mysql on the Internet. I recorded the results.SELECT * FROM uchome_mtag AS a JOIN (select max (tagid) AS id FROM uchome_mtag) AS BON (a. tagid> = FLOOR (B. id * RAND () LIMIT 50I found a problem after
1. [root @ host ~] $ Oracle_HOME/bin/localconfig delete [this step may not be successfully executed, but it will not be affected]
2. [root @ host ~] Rm-rf $ ORACLE_BASE/* [You can manually delete the installation directories and files in oracle]
3.
Table: msg_content
Table: msg_contact_person
Expected results
Key Point Analysis: the difference between the result table and table 1 is that the real name of table 2 is added to the "er" field.
Implementation Method:
Step 1: Split the fields in
1. Add clusterware nodes
On an existing Node
Cluvfy stage-pre nodeadd-n node3 [-fixup [-fixupdir fixup_dir] [-verbose]
-- A BUG occurs during installation of 11.2.0.2, and shared disk detection is always unsuccessful. Therefore, check that only
The concept of schema in PostgreSQL is to divide the scope in the database, that is, tables with the same name can exist in different modes. It can be simply understood as a file system.
The common default mode is public.
SHOW search_path; shows
During Oracle 11g installation, the following two problems are frequently encountered:
Oracle 11gORA-00845: MEMORY_TARGET not supported on this system description
[INS-35172] Target database memory (XXMB) exceeds the systems available shared memory (
The getToken function of SQLite3 is used to determine the Token in the SQL statement and return the length of the Token. Some basic tokens (such as operators and parentheses) are placed in lengthy Switch... case. The judgment on keyword refers to
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