1. View database Information
Show parameter instance_name
Show parameter Db_name
Show Parameter Service_Name
Select dbid from V$database;
2. Normal Shutdown database
Sqlplus/as SYSDBA
Sql>shutdown Immediate
3. Start database to mount mode
View database nameSql> select name from V$database;NAME---------ORCLsql> desc v$database;is the name empty? Type----------------------------------------- -------- ----------------------------DBID numberNAME VARCHAR2 (9)CREATED DATEresetlogs_change#
#!/bin/bash#fafu_li# Email: [Email protected]&348926676@qq. com# Time:2015.08.Ten#mysql数据库改名, the official does not have a command to directly modify the database name # only by modifying the table name to implement the source/etc/Profile
/// ///Get database name/// /// Account Set Number /// Public Static stringGetdbname (stringAccount ) {StringBuilder strSQL=NewStringBuilder (); Strsql.append ("select name from Master. sysdatabases where name like
Do you have a database name or SID for the Oracle service in Windows services today? I guess it's SID, but test it and see if I guess right? Get Up!Sql> Show parameter Db_namename TYPE VALUE---------------------
The original database name is AA, the physical file name is called Aa.mdf and aa_log.ldf; you need to modify the database name to BB, the physical file name is called Bb.mdf and Bb_log.ldf; procedure (take the sqlserver2005 operation as an example):
In Linux: the default data file storage directory of MySQL is/var/lib/mysql. I want to do two things today: Change the Database Name (three methods are tested), and change the directory location of the MySQL database. Database rename: 1. rename
1. method 1 (physical method ):
Change old database to new database
Open Enterprise Manager"
Right-click "Old Database" and choose "all tasks" to separate the database.
Find old_data.mdf and
Old_log.ldf
Replace old_data with the name you want, such
Query the database select * From master. dbo. sysdatabases where name = 'database name' and status <> 512 -- read all table names in the database (current database)
Select name from sysobjects where xtype = 'U'
-- Read all column names of a
Set the global variable lower_case_table_names to 1.
Lab:1. lower_case_tables_name = 0 (default in Linux) Start mysql directly and create tables MyTable and mytable in mytestMysql> use mytest;Mysql> create table MyTable (id int not null, name
The following experiment process is from 10.2.0.3:Reference SQL> select * from V $ version;
Banner----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.3.0-ProdPL/SQL release 10.2.0.3.0-
DROP TABLE IF EXISTS [Temp_table_name];
Create temporary table [Temp_table_name] Select Col1,col2,... from [table_name];
ALTER TABLE [Temp_table_name] Add unique idx_col1 (col1);
Through the above operation, the warning problem occurs many times.
Data | database *
Tofu production is a boutique
Http://www.asp888.net Tofu Technology Station
If reproduced please retain the copyright information
*/
The original user question is as follows:
Here are a few questions about SQL Server that you
Query all database names select name from Master. sysdatabases querying the table name and view name under the specified databaseSelect* fromDatabase name: sysobjectswhereXtype='V'or xtype='U'Query the column name of the specified table under the
Baidu down, find a solution:just add a parameter to the command line: --prompt= "\u (\d) >" can be . If you have to add time, add --prompt= "\u (\d) \r:\m:\s >" can beFor example: mysql-uroot-p1234--prompt= "\u (\d) >" Soif the term is to take
The principle of modification is to create a new database and then rename all the tables. Just look at the script below. I'm going to change the name of the download database to DOWNLOADV2.#!/bin/bashmysql-uroot-p1q2w3e4r-e ' CREATE database if not
By default, MySQL does not display the connected library name when use DatabaseName!mysql> show databases;+--------------------+| Database |+--------------------+| Information_schema || Hank || MySQL || Performance_schema || Sakila || Test || Yoon |+
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.