今天遇到一个错误,具体错误过程如下: --提示无法修改指定的参数SQL alter system set memory_max_target=3072M;alter system set memory_max_target=3072M *ERROR at line 1:ORA-02095: specified initialization parameter cannot be modified--至更改参
今天遇到一个错误,具体错误过程如下:
--提示无法修改指定的参数 SQL> alter system set memory_max_target=3072M; alter system set memory_max_target=3072M * ERROR at line 1: ORA-02095: specified initialization parameter cannot be modified --至更改参文件 SQL> alter system set memory_max_target=3072M scope=spfile; alter system set memory_max_target=3072M scope=spfile * ERROR at line 1: ORA-32001: write to SPFILE requested but no SPFILE is in use
提示没有使用参数文件,查看数据文件
SQL> show parameter spfile NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string
spfile的值为空,说明数据库启动不是使用的spfile,是使用的pfile启动的。缺省情况下,spfile是linux的 $ORACLE_HOME/dbs 下的 spfile+$ORACLE_SID.ora文件,查看文件是否存在
[oracle@localhost dbs]$ ls $ORACLE_HOME/dbs hc_orcl11g.dat hc_orcl.dat init.ora initorcl.ora lkORCL orapworcl snapcf_orcl.f
spfile不存在,于是创建spfile
SQL> create spfile from pfile; File created.在目录 $ORACLE_HOME/dbs 下就生成了 spfileorcl.ora 文件,下面是spfile 和pfile的相关知识
spfile是9i以后才有的,在9i 以前,Oracle 使用pfile 存储初始化参数配置,这些参数在实例启动时被读取,不能动态修改,可以用普通的编辑器修改,任何修改需要重起实例才能生效。
使用spfile 您能够使用ALTER SYSTEM 或ALTER SESSION来动态修改那些可动态修改的参数,部分修改需要重启数据库后才能生效,在修改时能够选择使更改只应用于当前实例,还是同时应用到spfile。这就使得任何对spfile 的修改都能够在命令行完成,我们能够完全告别手工修改初始化参数文档,这就大大减少了人为错误的发生。
SPFILE 是个二进制文档,能够使用RMAN 进行备份,这样实际上Oracle 把参数文档也纳入了备份恢复管理。除了第一次启动数据库需要PFILE(然后能够根据PFILE 创建SPFILE),我们能够不再需要PFILE,ORACLE 强烈推荐使用spfile,应用其新特性来存储和维护初始化参数配置。
补充:
/*
参数文件(10g中的参数文件)
主要用来记录数据库的配置文件,在数据库启动时,Oracle读取参数文件,并根据参数文件中的参数设置来配置数据库。
如内存池的分配,允许打开的进程数和会话数等。
两类参数文件:
pfile:文本文件的参数文件,可以使用vi,vim等编辑器修改,文件名通常为init
spfile:二进制的参数文件,不能直接修改,只能存放在Oracle服务器端,可以使用EM或指令来修改
(alter system|session set parameter_name = values ),
文件名通常为spfile
优先级别:
Oracle 启动读取参数文件的顺序,如果个文件都不存在,则Oracle会报错
spfile
参数文件的路径:*/
spfle:$ORACLE_HOME/dbs/spfile$ORACLE_SID.ora
pfile(9i):$ORALCE_HOME/dbs/init$ORALCE_SID.ora /*10g以后一般不用init
pfile(10g):$ORALCE_BASE/admin/$ORACLE_SID/pfile /*仅当数据库初始化时使用*/
pfile:$ORACLE_HOME/dbs/init.ora /*默认*/
/*
参数文件之间的转化
spfile 转化为pfile
pfile 转换为spfile
从spfile来生成pfile
create pfile from spfile ,执行完毕后,pfile 将保存为$ORACLE_HOME/dbs/init$ORACLE_SID.ora
也可以指定pfile 的路径:create pfile = '
由pfile 生成spfile
create spfile from pfile
create spfile from pfile = '
create spfile = '
11g中的新指令,从memeory中生成
create spfile = '
*/
参考:http://blog.csdn.net/leshami/article/details/5559174

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

The steps to build a MySQL database include: 1. Create a database and table, 2. Insert data, and 3. Conduct queries. First, use the CREATEDATABASE and CREATETABLE statements to create the database and table, then use the INSERTINTO statement to insert the data, and finally use the SELECT statement to query the data.

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.

MySQL is suitable for beginners because: 1) easy to install and configure, 2) rich learning resources, 3) intuitive SQL syntax, 4) powerful tool support. Nevertheless, beginners need to overcome challenges such as database design, query optimization, security management, and data backup.

Yes,SQLisaprogramminglanguagespecializedfordatamanagement.1)It'sdeclarative,focusingonwhattoachieveratherthanhow.2)SQLisessentialforquerying,inserting,updating,anddeletingdatainrelationaldatabases.3)Whileuser-friendly,itrequiresoptimizationtoavoidper

ACID attributes include atomicity, consistency, isolation and durability, and are the cornerstone of database design. 1. Atomicity ensures that the transaction is either completely successful or completely failed. 2. Consistency ensures that the database remains consistent before and after a transaction. 3. Isolation ensures that transactions do not interfere with each other. 4. Persistence ensures that data is permanently saved after transaction submission.

MySQL is not only a database management system (DBMS) but also closely related to programming languages. 1) As a DBMS, MySQL is used to store, organize and retrieve data, and optimizing indexes can improve query performance. 2) Combining SQL with programming languages, embedded in Python, using ORM tools such as SQLAlchemy can simplify operations. 3) Performance optimization includes indexing, querying, caching, library and table division and transaction management.

MySQL uses SQL commands to manage data. 1. Basic commands include SELECT, INSERT, UPDATE and DELETE. 2. Advanced usage involves JOIN, subquery and aggregate functions. 3. Common errors include syntax, logic and performance issues. 4. Optimization tips include using indexes, avoiding SELECT* and using LIMIT.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Zend Studio 13.0.1
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)