Oracle Net tool (command) tnsping is an OSI Session Layer tool used:
1) Verify the name resolution (name resolution, which is the name of the oracle Network Service)
2) whether the remote listener is enabled
1. Remote tnsping
2. Disable listening
3. Start the listener and verify again
Summary:
1. The tnsping command can check whether the tcp protocol is the same. We call it network communicatio
the SYS user and system user Oracle installation automatically generates SYS users and system users (1), sys user is superuser, has the highest privileges, has the SYSDBA role, has the permission to create database, the user's default password is Change_on_install (2), the system user is a management operator, and the permissions are large. With the Sysoper role, without the CREATE DATABASE permission, the default password is the manager (3generally s
Common commands for Oracle to view table structures to obtain tables: www.2cto.com select table_name from user_tables; // select table_name from all_tables for the current user's table; // select table_name from dba_tables for all users; // including the system table select table_name from dba_tables where owner = 'username' user_tables: table_name, tablespace_name, role, and other dba_tables: ower, table_n
Run Oracle database EM, isqlplus, and other commands in Linux.
$ ORACLE_HOME/bin/emctl start dbconsole
$ ORACLE_HOME/bin/isqlplusctl start
Common emctl command syntax:
Emctl start dbconsole to start the EM console service. You need to set the ORACLE_SID environment variable before use.
Emctl stop dbconsole to stop the EM console service. You must set the ORACLE_SID environment variable before use.
You
; SELECT ' CREATE synonym ' | | tname| | ' for user name. ' | | tname| | '; ' From TAB;
List of commands:
Assume that the current execution command is: SELECT * from Tab;
(a) ppend add text to buffer current line end a order by Tname result: SELECT * from tab to Tname;
(Note: A followed by 2 spaces)
(c) Hange/old/new replaces the old text with the new text in the current line c/*/tname result: select Tname from Tab;
(c) Hange/text deletes text from th
Length
Alter TableEMP Modify Empsexdefault 'male';--Fix the field default value
Alter TableEmpDrop columnEmpsex;--Delete a field
Alter TableEmpAdd(Empsexvarchar2(3));--Add Field
Alter TableEMP RenamecolumnEmpsex toGender--Rename field nameRename EMP toEMP1;--Renaming a table
--Delete a table
Drop TableEMP; --Set Primary Key
Alter TableEMPAdd constraintPk_empnoPrimary Key(EMPNO); --set foreign keys
Create TableBm--Create a new Department tableBmno Number, Bmnamevarchar2( -)
); Alter TableBMAdd
Tags: style blog http io ar color OS sp strongOriginal: Oracle Common view table Structure commandGet table: Select table_name from User_tables; The current user's tableSelect table_name from All_tables; All users ' tablesSelect table_name from Dba_tables; including system tablesSelect table_name from dba_tables where owner= ' user name 'User_tables:Table_name,tablespace_name,last_analyzed, etc.Dba_tables:Ower,table_name,tablespace_name,last_analyzed,
Tags: Images Blog console nbsp Size Select table Structure textConsole access to Oracle:Windows platform Keyboard window+r input cmd Enter sqlplus enter prompt you enter username and password and then enterDesc: View Table structureDesc + table Nameset Line[size]{80|n}:size value defaults to 80 if the screen is large enough to set any valueSet Line 100l and N text: L display the previous SQL N text to modify the previous SQL error (table person has name,age,sex,height these columns)For example,
tmp_xian.id is ' primary key 'Comment on column tmp_xian.name is ' Maximum user name 'COMMENT on table TABLENAME is ' user table ';VARCHAR2 Maximum length 4000bite char (2000bite)View the first 500 rows of dataSELECT * FROM T_pub_download_detail where rownumCOUNT (*) and COUNT (1) Efficiency results are the same as count (name) statistic Name column is not empty recordSelect COUNT (*) from table; COUNT (1)Date datetime (accurate to seconds) timestamp (accurate to fractional seconds)Union Table
Tags: oracle commandToday's repository is locked and checked, saying that it was logged wrong more than 10 times the user will be locked, there is the understanding lock and password operationTo activate the sqlplus in a non-link waySqlplus/nolog;Link the repository as a DBA:Conn/as Sysdba;The library activates the mode and uses:
Startup:open mode, activate the example to load and open the library, normal activate
Non-restricted state
Create/delete Table spaces
Created: Create tablespace USERS datafile '/oracle/oradata/mytest/tsuser.dbf ' size 500M autoextend on next 10M maxsize unlimite d extent management local; Delete: Drop tablespace USERS including CONTENTS and datafiles;2. Create/delete usersCreate User ERIC identified by Password Default tablespace USERS; You can also do this without specifying a table space, and you can authorize drop user Eric Cascadegrant Connect,resour
1. log on to Oracle AS A DBA
A: Start Oracle services.
B: Run cmd to open the command window.
C: Enter "sqlplus sys/root as sysdba" in the command line. The root is the logon password.
In this way, you can successfully log on to Oracle.
2. query all usernames in the Oracle database
Select username fro
This document describes how to create and delete users and roles in Oracle. importing and exporting data imp/exp is equivalent to restoring and backing up oracle data. The exp command can export data from the remote database server to the local dmp file, and the imp command can import the dmp file from the local to the distant database server. This function can be used to build two identical databases, one
-- page sizeSet linesize 50 // set the linesize as much as possible based on your needs. The size of the generated file is also large.Define fil = 'e: \ exp.txt'Prompt *** Spooling to filSpool filSelect id | ',' | username | ',' | '"' | password | '"' from myuser;Spool off;-- Execution ProcessSQL>; @ e: \ expmyusr. SQL* ** Spooling to e: \ exp.txt1, John, "1234"2, Jack, "12345"3. Rose, "2345"4, Joe, "384657"5, Tom, "384655"6. Jordan, "384455"
Check that the results meet the requirement
1. modify Oracle startup parameters
Two methods:
The first is to use this parameter file to create a server parameter file after modifying the Oracle startup parameter file.
A. Create a pfile based on the existing spfile.
SQL> Create pfile from spfile;
B. Open pfile and change shared_pool_size to a new value.
C. Start the Database Based on pfile. Assume that pfile is named initorcl. ora.
SQL> s
1) Check the cluster status:[Grid @ rac02 ~] $ Crsctl check clusterCRS-4537: Cluster Ready Services is onlineCRS-4529: Cluster Synchronization Services is onlineCRS-4533: Event Manager is online.2) All Oracle instances (Database status ):[Grid @ rac02 ~] $ Srvctl status database-d racdbInstance racdb1 is running on node rac01Instance racdb2 is running on node rac023) Check the status of a single instance:[Grid @ rac02 ~] $ Srvctl status instance-d rac
1) Check the cluster status:
[Grid @ rac02 ~] $ Crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online.
2) All Oracle instances (Database status ):[Grid @ rac02 ~] $ Srvctl status database-d racdbInstance racdb1 is running on node rac01Instance racdb2 is running on node rac02
3) Check the status of a single instance:[Grid @ rac02 ~] $ Srvctl status instanc
OracleNet tool (command) tnsping is an OSI Session Layer tool used to verify name resolution (nameresolution, which is the name of an oracle Network Service)
Oracle Net tool (command) tnsping is an OSI Session Layer tool used to verify name resolution (name resolution, which is the name of an oracle Network Service)
Or
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.