有时候,我们没有xwindows的界面,需要在silent模式下创建数据库,我们可以用如下的方式创建。
下面的例子是以windows xp,oracle 10201版本。
修改安装目录中的response目录下的custom.rsp文件,可以copy一个后修改。
注意下面的#need change!!部分
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 |
#################################################################### ## Copyright(c) Oracle Corporation 1998,2005. All rights reserved.## ## ## ## Specify values for the variables listed below to customize ## ## your installation. ## ## ## ## Each variable is associated with a comment. The comment ## ## identifies the variable type. ## ## ## ## Please specify the values in the following format: ## ## ## ## Type Example ## ## String "Sample Value" ## ## Boolean True or False ## ## Number 1000 ## ## StringList {"String value 1","String Value 2"} ## ## ## ## The values that are given as <Value Required> need to be ## ## specified for a silent installation to be successful. ## ## ## ## ## ## This response file is generated by Oracle Software ## ## Packager. ## #################################################################### RESPONSEFILE_VERSION=2.2.1.0.0 #------------------------------------------------------------------------------ #Name : FROM_LOCATION #Datatype : String #Description: Complete path to the products.xml. #Example : FROM_LOCATION = "../stage/products.xml" #------------------------------------------------------------------------------ #need change!! FROM_LOCATION="J:\ora_windows\10G\ora_win_10.2.0.1.0\ora_win_10.2.0.1.0\stage\products.xml" #------------------------------------------------------------------------------ #Name : NEXT_SESSION_RESPONSE #Datatype : String #Description: Optionally specifies the full path of the next session's response # file. If only a file name is specified, the response file is # retrieved from the <TEMP>/oraInstall directory. This variable is # only active if NEXT_SESSION is set to true. #Example: NEXT_SESSION_RESPONSE = "nextinstall.rsp" #------------------------------------------------------------------------------ NEXT_SESSION_RESPONSE=<Value Unspecified> #------------------------------------------------------------------------------ #Name : ORACLE_HOME #Datatype : String #Description: Complete path of the Oracle Home. #Example : ORACLE_HOME = "/product/10.2.0/db_1" #------------------------------------------------------------------------------ #need change!! ORACLE_HOME="D:\oracle\product\10.2.0\db_1" #------------------------------------------------------------------------------ #Name : ORACLE_HOME_NAME #Datatype : String #Description: Oracle Home Name. Used in creating folders and services. #Example : ORACLE_HOME_NAME = "OraDbHome1" #------------------------------------------------------------------------------ #need change!! ORACLE_HOME_NAME="OraDb10g_home1" #------------------------------------------------------------------------------ #Name : TOPLEVEL_COMPONENT #Datatype : StringList #Description: The top level component to be installed in the current session. #Example : TOPLEVEL_COMPONENT = {"oracle.server","10.2.0.1.0"} #------------------------------------------------------------------------------ TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"} #------------------------------------------------------------------------------ #Name : DEINSTALL_LIST #Datatype : StringList #Description: List of components to be deinstalled during a deinstall session. #Example : DEINSTALL_LIST = {"oracle.server","10.2.0.1.0"} #------------------------------------------------------------------------------ DEINSTALL_LIST={"oracle.server","10.2.0.1.0"} #------------------------------------------------------------------------------ #Name : SHOW_SPLASH_SCREEN #Datatype : Boolean #Description: Set to true if the initial splash screen in OUI needs to be # shown. #Example : SHOW_SPLASH_SCREEN = true #------------------------------------------------------------------------------ SHOW_SPLASH_SCREEN=false #------------------------------------------------------------------------------ #Name : SHOW_WELCOME_PAGE #Datatype : Boolean #Description: Set to true if the Welcome page in OUI needs to be shown. #Example : SHOW_WELCOME_PAGE = false #------------------------------------------------------------------------------ SHOW_WELCOME_PAGE=false #------------------------------------------------------------------------------ #Name : SHOW_NODE_SELECTION_PAGE #Datatype : Boolean #Description: Set to true if the node selection page in OUI needs to be shown. # # This is only relevent when performing an upgrade of Oracle # Clusterware. # #Example : SHOW_NODE_SELECTION_PAGE = false #------------------------------------------------------------------------------ SHOW_NODE_SELECTION_PAGE=false #------------------------------------------------------------------------------ #Name : SHOW_SUMMARY_PAGE #Datatype : Boolean #Description: Set to true if the summary page in OUI needs to be shown. # # The summary page shows the list of components that will be # installed in this session. # #Example : SHOW_SUMMARY_PAGE = true #------------------------------------------------------------------------------ SHOW_SUMMARY_PAGE=false #------------------------------------------------------------------------------ #Name : SHOW_INSTALL_PROGRESS_PAGE #Datatype : Boolean #Description: Set to true if the install progress page in OUI needs to be # shown. # # This page shows the current status in the installation. The # current status includes the product being installed and the file # being copied. # #Example : SHOW_INSTALL_PROGRESS_PAGE = true #------------------------------------------------------------------------------ SHOW_INSTALL_PROGRESS_PAGE=false #------------------------------------------------------------------------------ #Name : SHOW_CONFIG_TOOL_PAGE #Datatype : Boolean #Description: Set to true if the config assistants page in OUI needs to be # shown. # # This page shows the list of configuration assistants that are # part of this installation and are configured to launch # automatically. It shows the status of each assistant, including # any failures with detailed information on why it failed. # #Example : SHOW_CONFIG_TOOL_PAGE = true #------------------------------------------------------------------------------ SHOW_CONFIG_TOOL_PAGE=false #------------------------------------------------------------------------------ #Name : SHOW_XML_PREREQ_PAGE #Datatype : Boolean #Description: This variable determines whether or not to show the prereq page. #Example : SHOW_XML_PREREQ_PAGE = true #------------------------------------------------------------------------------ SHOW_XML_PREREQ_PAGE=false #------------------------------------------------------------------------------ #Name : SHOW_ROOTSH_CONFIRMATION #Datatype : Boolean #Description: Set to true if the Confirmation dialog asking to run the root.sh # script in OUI needs to be shown. #Example: SHOW_ROOTSH_CONFIRMATION = false #------------------------------------------------------------------------------ #need change!! SHOW_ROOTSH_CONFIRMATION=true #------------------------------------------------------------------------------ #Name : SHOW_END_SESSION_PAGE #Datatype : Boolean #Description: Set to true if the end of session page in OUI needs to be shown. # # This page shows if the installation is successful or not. # #Example : SHOW_END_SESSION_PAGE = true #------------------------------------------------------------------------------ SHOW_END_SESSION_PAGE=false #------------------------------------------------------------------------------ #Name : SHOW_EXIT_CONFIRMATION #Datatype : Boolean #Description: Set to true if the confirmation when exiting OUI needs to be shown. #Example : SHOW_EXIT_CONFIRMATION = true #------------------------------------------------------------------------------ SHOW_EXIT_CONFIRMATION=false #------------------------------------------------------------------------------ #Name : NEXT_SESSION #Datatype : Boolean #Description: Set to true to allow users to go back to the File Locations page # for another installation. This flag also needs to be set to true # in order to process another response file # (see NEXT_SESSION_RESPONSE). #Example : NEXT_SESSION = true #------------------------------------------------------------------------------ NEXT_SESSION=false #------------------------------------------------------------------------------ #Name : NEXT_SESSION_ON_FAIL #Datatype : Boolean #Description: Set to true to allow users to invoke another session even if # current install session has failed. This flag is only relevant # if NEXT_SESSION is set to true. #Example : NEXT_SESSION_ON_FAIL = true #------------------------------------------------------------------------------ NEXT_SESSION_ON_FAIL=false #------------------------------------------------------------------------------ #Name : SHOW_DEINSTALL_CONFIRMATION #Datatype : Boolean #Description: Set to true if deinstall confimation is needed during a deinstall # session. #Example : SHOW_DEINSTALL_CONFIRMATION = true #------------------------------------------------------------------------------ SHOW_DEINSTALL_CONFIRMATION=false #------------------------------------------------------------------------------ #Name : SHOW_DEINSTALL_PROGRESS #Datatype : Boolean #Description: Set to true if deinstall progress is needed during a deinstall # session. #Example : SHOW_DEINSTALL_PROGRESS = true #------------------------------------------------------------------------------ SHOW_DEINSTALL_PROGRESS=false #------------------------------------------------------------------------------ #Name : RESTART_SYSTEM #Datatype : Boolean #Description: Set to true to allow automatic restart of the system, if set to # false then installer will exit without restarting, no exit # confirmation dialog is shown #Example : RESTART_SYSTEM = false #------------------------------------------------------------------------------ RESTART_SYSTEM=<Value Unspecified> #------------------------------------------------------------------------------ #Name : RESTART_REMOTE_SYSTEM #Datatype : Boolean #Description: Set to true to allow automatic restart of the remote systems, if # set to false then installer will not restart the remote systems, # no exit confirmation dialog is shown #Example : RESTART_REMOTE_SYSTEM = false #------------------------------------------------------------------------------ RESTART_REMOTE_SYSTEM=<Value Unspecified> #------------------------------------------------------------------------------ #Name : REMOVE_HOMES #Datatype : StringList #Description: List of the homes to be removed during a deinstall session. Each # home is represented by its full path. #Example : REMOVE_HOMES = {<full_path_of_home1>,<full_path_of_home2>, ...} #------------------------------------------------------------------------------ REMOVE_HOMES=<Value Unspecified> #------------------------------------------------------------------------------ #Name : ORACLE_HOSTNAME #Datatype : String #Description: This variable holds the hostname of the system as set by the # user. # # It can be used to force the installation to use an alternative # hostname rather than using the first hostname found on the # system (e.g., for systems with multiple hostnames and network # interfaces). # #Example : ORACLE_HOSTNAME = #------------------------------------------------------------------------------ ORACLE_HOSTNAME=<Value Unspecified> #------------------------------------------------------------------------------ #Name : SHOW_END_OF_INSTALL_MSGS #Datatype : Boolean #Description: Set to true if the text on end of install screen is to be shown. # The text is always available under # <Oracle Home>/install/readme.txt. #Example : SHOW_END_OF_INSTALL_MSGS = true #------------------------------------------------------------------------------ SHOW_END_OF_INSTALL_MSGS=false #------------------------------------------------------------------------------ #Name : CLUSTER_NODES #Datatype : StringList #Description: This variable represents the cluster node names selected by the # user for installation. #Example : CLUSTER_NODES = {"node1","node2"} #------------------------------------------------------------------------------ CLUSTER_NODES=<Value Unspecified> #------------------------------------------------------------------------------ #Name : COMPONENT_LANGUAGES #Datatype : StringList #Description: Languages in which the components will be installed. # # The following choices are available. The value should contain # only one of these choices. # en, : English # fr, : French # ar, : Arabic # bn, : Bengali # pt_BR,: Brazilian Portuguese # bg, : Bulgarian # fr_CA,: Canadian French # ca, : Catalan # hr, : Croatian # cs, : Czech # da, : Danish # nl, : Dutch # ar_EG,: Egyptian # en_GB,: English (United Kingdom) # et, : Estonian # fi, : Finnish # de, : German # el, : Greek # iw, : Hebrew # hu, : Hungarian # is, : Icelandic # in, : Indonesian # it, : Italian # ja, : Japanese # ko, : Korean # es, : Latin American Spanish # lv, : Latvian # lt, : Lithuanian # ms, : Malay # es_MX,: Mexican Spanish # no, : Norwegian # pl, : Polish # pt, : Portuguese # ro, : Romanian # ru, : Russian # zh_CN,: Simplified Chinese # sk, : Slovak # sl, : Slovenian # es_ES,: Spanish # sv, : Swedish # th, : Thai # zh_TW,: Traditional Chinese # tr, : Turkish # uk, : Ukrainian # vi, : Vietnamese # #Example : COMPONENT_LANGUAGES = {"en"} #------------------------------------------------------------------------------ COMPONENT_LANGUAGES={"en"} #------------------------------------------------------------------------------ #Name : INSTALL_TYPE #Datatype : String #Description: Installation type of the component. # # The following choices are available. The value should contain # only one of these choices. # EE : Enterprise Edition # SE : Standard Edition # Custom : Custom #Example : INSTALL_TYPE = "Custom" #------------------------------------------------------------------------------ INSTALL_TYPE="Custom" #------------------------------------------------------------------------------ #Name : oracle.server:DEPENDENCY_LIST #Datatype : StringList #Description: List of products that you would like to install. # # The following choices are available. You may specify any # combination of these choices. The components you choose should # be specified in the form "<internal component name>:<version>" # Below is a list of components you may specify to install. # # oracle.rdbms:10.2.0.1.0 - Oracle Database 10g # oracle.options:10.2.0.1.0 - Enterprise Edition Options # oracle.network:10.2.0.1.0 - Oracle Net Services # oracle.sysman.console.db:10.2.0.1.0 - Database Control # oracle.rdbms.oci:10.2.0.1.0 - Oracle Call Interface (OCI) # oracle.precomp:10.2.0.1.0 - Oracle Programmer # oracle.xdk:10.2.0.1.0 - Oracle XML Development Kit # oracle.sqlplus.isqlplus:10.2.0.1.0 - iSQL*Plus # #Example : DEPENDENCY_LIST = {"oracle.rdbms:10.2.0.1.0"} #------------------------------------------------------------------------------ oracle.server:DEPENDENCY_LIST={"oracle.rdbms:10.2.0.1.0","oracle.options:10.2.0.1.0","oracle.network:10.2.0.1.0","oracle.sysman.console.db:10.2.0.1.0","oracle.rdbms.oci:10.2.0.1.0","oracle.precomp:10.2.0.1.0","oracle.xdk:10.2.0.1.0","oracle.sqlplus.isqlplus:10.2.0.1.0"} #------------------------------------------------------------------------------ #Name : oracle.options:DEPENDENCY_LIST #Datatype : StringList #Description: List of Enterprise Edition Options you would like to install. # # The following choices are available. You may specify any # combination of these choices. The components you choose should # be specified in the form "<internal component name>:<version>" # Below is a list of components you may specify to install. # # oracle.network.aso:10.2.0.1.0 - Oracle Advanced Security # oracle.rdbms.partitioning:10.2.0.1.0 - Oracle Partitioning # oracle.sdo:10.2.0.1.0 - Oracle Spatial # oracle.rdbms.lbac:10.2.0.1.0 - Oracle Label Security # oracle.oraolap:10.2.0.1.0 - Oracle OLAP # oracle.rdbms.dmse:10.2.0.1.0 - Oracle Data Mining Scoring Engine # #Example : DEPENDENCY_LIST = {"oracle.rdbms.partitioning:10.2.0.1.0"} #------------------------------------------------------------------------------ oracle.options:DEPENDENCY_LIST={"oracle.network.aso:10.2.0.1.0","oracle.rdbms.partitioning:10.2.0.1.0","oracle.sdo:10.2.0.1.0","oracle.oraolap:10.2.0.1.0"} #------------------------------------------------------------------------------ #Name : oracle.network:DEPENDENCY_LIST #Datatype : StringList #Description: List of Oracle Net products you would like to install. # # The following choices are available. You may specify any # combination of these choices. The components you choose should # be specified in the form "<internal component name>:<version>" # Below is a list of components you may specify to install. # # oracle.network.listener:10.2.0.1.0 - Oracle Net Listener # oracle.network.cman:10.2.0.1.0 - Oracle Connection Manager # #Example: DEPENDENCY_LIST = {"oracle.network.listener:10.2.0.1.0"} #------------------------------------------------------------------------------ oracle.network:DEPENDENCY_LIST={"oracle.network.listener:10.2.0.1.0"} ############################################################################### # # # Dialog: PRIVILEGED OPERATING SYSTEM GROUPS # # ------------------------------------------ # # If you include oracle.rdbms:10.2.0.1.0 in the oracle.server:DEPENDENCY_LIST # # above, you will need to provide values for the OS groups you wish to grant # # OSDBA and OSOPER privileges. # # # ############################################################################### #------------------------------------------------------------------------------ # Name : s_nameForDBAGrp # Datatype : String # Description: The OS group to be granted OSDBA privileges # # Pre-requsites for setting this variable: # "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST # # Example : s_nameForDBAGrp = "dba" #------------------------------------------------------------------------------ s_nameForDBAGrp="" #------------------------------------------------------------------------------ # Name : s_nameForOPERGrp # Datatype : String # Description: The OS group to be granted OSOPER privileges # # Pre-requsites for setting this variable: # "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST # # Example : s_nameForDBAGrp = "oper" #------------------------------------------------------------------------------ s_nameForOPERGrp="" ############################################################################### # # # Dialog: CREATE DATABASE # # ----------------------- # # If you include oracle.rdbms:10.2.0.1.0 in the oracle.server:DEPENDENCY_LIST # # above, and if you choose not to upgrade any existing databases on your # # system, you have the option of creating a database, configuring an ASM # # instance or installing only software and not performing any configuration. # # You can specify which of these options you wish to select using the # # the variables listed below. # # # ############################################################################### #------------------------------------------------------------------------------ # Name : varSelect # Datatype : Number # Description: Determines the type of configuration to perform for the session. # # This entry should be specified as an number. The valid values # that you can use map to the following options: # 1 - Create a Database # 2 - Configure an ASM instance # 3 - Install Software Only # # Pre-requsites for setting this variable: # "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST # n_performUpgrade=0 # # Example : varSelect=1 #------------------------------------------------------------------------------ #need change!! varSelect=3 #------------------------------------------------------------------------------ # Name : s_responseFileName # Datatype : String # Description: Specifies the location of the DBCA response file to use for # custom database configuration. # # If you choose to create a database or configure an ASM instance, # the Database Configuration Assistant (DBCA) will be launched to # allow you to completely customize your database or ASM instance. # For example, you can specify the value of any init parameter, # size your tablespaces, or create more than one disk group for # datafile storage. # # If you wish to do this directly from this silent installation, # you can do so by filling out the appropriate values in the DBCA # response file located in the response/ directory on the # the installation media. Once this response file has been # customized to your needs, you can specify the location of this # response file using this variable, and the Custom Install and # Custom Configuration will be chained together. # # Pre-requsites for setting this variable: # "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST # varSelect=1 or 2 # n_performUpgrade=0 # # Example : oracle.assistants.server:s_responseFileName="/tmp/dbca.rsp" #------------------------------------------------------------------------------ oracle.assistants.server:s_responseFileName=<Value Unspecified> ############################################################################### # # # Dialog: UPGRADE AN EXISTING DATABASE # # ------------------------------------ # # Databases prior to 10.2.0.1.0 may be upgraded after the installation using # # the Database Upgrade Assistant. If you have databases prior to 10g # # Release 2 (10.2.0.1.0) on your system, then the installation displays a # # dialog allowing you to upgrade one of those databases directly from the # # installation. If any of your databases use ASM for storage, you can choose # # to upgrade just the ASM instance, just the database, or both. # # # ############################################################################### #------------------------------------------------------------------------------ # Name : n_performUpgrade # Datatype : Number # Description: Determines whether to perform an upgrade during the installation # or not. # # If n_performUpgrade=1, then an upgrade will be performed at the # end of the installation. In this case, you must also specify # the values of one or both of the following: # - n_upgradeDB # - n_upgradeASM # # IMPORTANT INFO: If n_performUpgrade=0, then an upgrade will not # be performed, and you can choose to create a new database using # the variables as documented above. However, if you set # n_performUpgrade=0, then use the following values ONLY for the # respective variables: # - n_upgradeDB=0 # - s_dbOHSelectedForUpgrade="" # - s_dbSIDSelectedForUpgrade="" # - n_upgradeASM=0 # - s_dbSelectedUsesASM="no" # # Example : n_performUpgrade=0 #------------------------------------------------------------------------------ n_performUpgrade=0 #------------------------------------------------------------------------------ # Name : n_upgradeDB # Datatype : Number # Description: Specifies whether the user wishes to perform an upgrade of a # database (in addition to or as opposed to upgrading an ASM # instance) # # This value must be specified as a number, which maps to the # following behavior: # 1 - Upgrade a database # 0 - Do Not Upgrade a Database # # If n_upgradeDB=1, then you must also specify values for the # following variables: # - s_dbOHSelectedForUpgrade # - s_dbSIDSelectedForUpgrade # # Pre-requsites for setting this variable: # n_performUpgrade=1 # # Example : n_upgradeDB = 1 #------------------------------------------------------------------------------ n_upgradeDB=0 #------------------------------------------------------------------------------ # Name : s_dbOHSelectedForUpgrade # Datatype : String # Description: Specifies the Oracle Home of the database you wish to upgrade. # # If s_dbOHSelectedForUpgrade is set to something other than "", # then you must also specify values for the following variable: # - s_dbSelectedUsesASM # # Pre-requsites for setting this variable: # n_performUpgrade=1 # n_upgradeDB=1 # # Example : s_dbOHSelectedForUpgrade = "/u01/app/oracle/9.2.0/db" #------------------------------------------------------------------------------ s_dbOHSelectedForUpgrade="" #------------------------------------------------------------------------------ # Name : s_dbSIDSelectedForUpgrade # Datatype : String # Description: Specifies the SID (for single instance) or database name (for # RAC of the database you wish to upgrade. # # Pre-requsites for setting this variable: # n_performUpgrade=1 # n_upgradeDB=1 # # Example : s_dbSIDSelectedForUpgrade = "orcl" #------------------------------------------------------------------------------ s_dbSIDSelectedForUpgrade="" #------------------------------------------------------------------------------ # Name : n_upgradeASM # Datatype : Number # Description: Specifies whether the user wishes to perform an upgrade of the # ASM instance (in addition to or as opposed to upgrading a # database) # # This value must be specified as a number, which maps to the # following behavior: # 1 - Upgrade ASM # 0 - Do Not Upgrade ASM # # Pre-requsites for setting this variable: # n_performUpgrade=1 # # Example : n_upgradeASM = 1 #------------------------------------------------------------------------------ n_upgradeASM=0 #------------------------------------------------------------------------------ #Name : s_dbSelectedUsesASM #Datatype : Boolean #Description: "Yes" if db selected uses ASM, else "No" #Component : oracle.server # Pre req: # n_performUpgrade=1 # n_upgradeDB=1 #------------------------------------------------------------------------------ s_dbSelectedUsesASM="no" ############################################################################### # # # ENTRIES LISTED IN THIS SECTION SHOULD NOT BE MODIFIED. THEY ARE NEEDED IN # # THE RESPONSE FILE FOR PROPER FUNCTIONING OF THE SILENT INSTALLATION, BUT # # THEY SHOULD NOT BE MODIFIED. # # # ############################################################################### #------------------------------------------------------------------------------ #Name : sl_upgradableSIDBInstances # sl_upgradableRACDBInstances #Datatype : Boolean #Description: Contains the upgradable DB instances #Component : oracle.server #------------------------------------------------------------------------------ ############################################ # DO NOT MODIFY THE VALUE OF THIS VARIABLE # ############################################ sl_upgradableSIDBInstances={} sl_upgradableRACDBInstances={} #------------------------------------------------------------------------------ #Name : n_dbSelection #Datatype : Number #Description: row selected in the spread table of upgradable DB instances #Component : oracle.server #------------------------------------------------------------------------------ ############################################ # DO NOT MODIFY THE VALUE OF THIS VARIABLE # ############################################ n_dbSelection=0 #------------------------------------------------------------------------------ #Name : b_stateOfUpgradeASMCheckbox #Datatype : Boolean #Description: stores the state of checkbox in UI #Component : oracle.server #------------------------------------------------------------------------------ ############################################ # DO NOT MODIFY THE VALUE OF THIS VARIABLE # ############################################ b_stateOfUpgradeASMCheckbox=false #------------------------------------------------------------------------------ #Name : b_stateOfUpgradeDBCheckbox #Datatype : Boolean #Description: stores the state of checkbox in UI #Component : oracle.server #------------------------------------------------------------------------------ ############################################ # DO NOT MODIFY THE VALUE OF THIS VARIABLE # ############################################ b_stateOfUpgradeDBCheckbox=false |
编辑完成后,在命令行输入:
1 2 3 4 5 |
C:\Documents and Settings\hejianmin>cd J:\ora_windows\10G\ora_win_10.2.0.1.0\ora_win_10.2.0.1.0 C:\Documents and Settings\hejianmin>j: J:\ora_windows\10G\ora_win_10.2.0.1.0\ora_win_10.2.0.1.0>setup -silent -responseFile C:\custom.rsp |
待软件安装完成后,进行创建数据库instance。
先建立相关目录:
1 2 3 4 5 6 7 8 9 10 11 |
mkdir D:\oracle\product\10.2.0\admin\oralocal\adump mkdir D:\oracle\product\10.2.0\admin\oralocal\bdump mkdir D:\oracle\product\10.2.0\admin\oralocal\cdump mkdir D:\oracle\product\10.2.0\admin\oralocal\dpdump mkdir D:\oracle\product\10.2.0\admin\oralocal\pfile mkdir D:\oracle\product\10.2.0\admin\oralocal\udump mkdir D:\oracle\product\10.2.0\db_1\cfgtoollogs\dbca\oralocal mkdir D:\oracle\product\10.2.0\db_1\database mkdir D:\oracle\product\10.2.0\flash_recovery_area mkdir D:\oracle\product\10.2.0\oradata mkdir D:\oracle\product\10.2.0\oradata\oralocal |
在命令行中设置数据库的sid,用oradim建立服务:
1 2 3 |
set ORACLE_SID=oralocal D:\oracle\product\10.2.0\db_1\bin\oradim.exe -new -sid ORALOCAL -startmode manual -spfile |
在命令行中建立密码文件
1 |
D:\oracle\product\10.2.0\db_1\bin\orapwd.exe file=D:\oracle\product\10.2.0\db_1\database\PWDoralocal.ora password=change_on_install force=y |
新建一个pfile:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
vi $ORACLE_HOME/database/initoralocal.ora ############################################################################## # Copyright (c) 1991, 2001, 2002 by Oracle Corporation ############################################################################## ########################################### # NLS ########################################### nls_language="SIMPLIFIED CHINESE" nls_territory="CHINA" ########################################### # SGA Memory ########################################### sga_target=167772160 ########################################### # Job Queues ########################################### job_queue_processes=10 ########################################### # Shared Server ########################################### dispatchers="(PROTOCOL=TCP) (SERVICE=oralocalXDB)" ########################################### # Miscellaneous ########################################### compatible=10.2.0.1.0 ########################################### # Security and Auditing ########################################### audit_file_dest=D:\oracle\product\10.2.0\admin\oralocal\adump remote_login_passwordfile=EXCLUSIVE ########################################### # Archive ########################################### log_archive_format=oralocal_%S_%R_%T.arc ########################################### # Sort, Hash Joins, Bitmap Indexes ########################################### pga_aggregate_target=16777216 ########################################### # Database Identification ########################################### db_domain="" db_name=oralocal ########################################### # File Configuration ########################################### control_files=("D:\oracle\product\10.2.0\oradata\oralocal\control01.ctl", "D:\oracle\product\10.2.0\oradata\oralocal\control02.ctl", "D:\oracle\product\10.2.0\oradata\oralocal\control03.ctl") db_recovery_file_dest=D:\oracle\product\10.2.0\flash_recovery_area db_recovery_file_dest_size=2147483648 ########################################### # Cursors and Library Cache ########################################### open_cursors=300 ########################################### # System Managed Undo and Rollback Segments ########################################### undo_management=AUTO undo_tablespace=UNDOTBS1 ########################################### # Diagnostics and Statistics ########################################### background_dump_dest=D:\oracle\product\10.2.0\admin\oralocal\bdump core_dump_dest=D:\oracle\product\10.2.0\admin\oralocal\cdump user_dump_dest=D:\oracle\product\10.2.0\admin\oralocal\udump ########################################### # Processes and Sessions ########################################### processes=150 ########################################### # Cache and I/O ########################################### db_block_size=8192 db_file_multiblock_read_count=16 |
以下开始手工create instance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
sqlplus "/ as sysdba" startup nomount pfile='?/database/initoralocal.ora'; #### create database CREATE DATABASE "oralocal" MAXINSTANCES 8 MAXLOGHISTORY 1 MAXLOGFILES 192 MAXLOGMEMBERS 3 MAXDATAFILES 100 DATAFILE 'D:\oracle\product\10.2.0\oradata\oralocal\system01.dbf' SIZE 500M REUSE EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE 'D:\oracle\product\10.2.0\oradata\oralocal\sysaux01.dbf' SIZE 300M REUSE SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE 'D:\oracle\product\10.2.0\oradata\oralocal\temp01.dbf' SIZE 20M REUSE SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE 'D:\oracle\product\10.2.0\oradata\oralocal\undotbs01.dbf' SIZE 200M REUSE CHARACTER SET ZHS16GBK NATIONAL CHARACTER SET AL16UTF16 LOGFILE GROUP 1 ('D:\oracle\product\10.2.0\oradata\oralocal\redo01.log') SIZE 51200K, GROUP 2 ('D:\oracle\product\10.2.0\oradata\oralocal\redo02.log') SIZE 51200K, GROUP 3 ('D:\oracle\product\10.2.0\oradata\oralocal\redo03.log') SIZE 51200K; #### create dbfile CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE 'D:\oracle\product\10.2.0\oradata\oralocal\users.dbf' SIZE 50M REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 512K SEGMENT SPACE MANAGEMENT AUTO; ALTER DATABASE DEFAULT TABLESPACE "USERS"; #### create db catalog connect sys/change_on_install as SYSDBA set echo on @?/rdbms/admin/catalog.sql; @?/rdbms/admin/catblock.sql; @?/rdbms/admin/catproc.sql; @?/rdbms/admin/catoctk.sql; @?/rdbms/admin/owminst.plb; connect SYSTEM/manager @?/sqlplus/admin/pupbld.sql; @?/sqlplus/admin/help/hlpbld.sql helpus.sql; #### create jserver connect sys/change_on_install as SYSDBA set echo on @?/javavm/install/initjvm.sql; @?/xdk/admin/initxml.sql; @?/xdk/admin/xmlja.sql; @?/rdbms/admin/catjava.sql; @?/rdbms/admin/catexf.sql; #### create odm @?/rdbms/admin/dminst.sql SYSAUX TEMP; #### create context connect sys/change_on_install as SYSDBA set echo on @?/ctx/admin/catctx change_on_install SYSAUX TEMP NOLOCK; connect CTXSYS/change_on_install @?/ctx/admin/defaults/dr0defin.sql "AMERICAN"; #### create xdb_protocol conn / as sysdba @?/rdbms/admin/catqm.sql change_on_install SYSAUX TEMP; @?/rdbms/admin/catxdbj.sql; @?/rdbms/admin/catrul.sql; #### create ordinst conn / as sysdba set echo on @?/ord/admin/ordinst.sql SYSAUX SYSAUX; #### create interMedia conn / as sysdba set echo on @?/ord/im/admin/iminst.sql; #### create cwmlite @?/olap/admin/olap.sql SYSAUX TEMP; #### create spatial @?/md/admin/mdinst.sql; #### postDBCreation conn / as sysdba set echo on create spfile from pfile; shutdown immediate; connect / as sysdba startup; execute utl_recomp.recomp_serial(); |
至此,数据库创建完毕。
3条评论
好东西,mark
Linux和Solaris应该同理可用
注,windows下还需要手工添加注册表项:HKEY_LOCAL_MACHINE->SOFTWARE->ORACLE->KEY_OraDb10g_home1->新建字符串值:ORACLE_SID,值为oralocal。
如没加该项,需要每次在sqlplus “/ as sysdba”之前需要手工的set ORACLE_SID。
好东西!!!