Alter table script for wrong database version

When we generate an alter table script by connecting to a database, the scripts that get generated are for database version 7.3.
Furthermore we cannot update the field "oracle version" for the database we created.
When we choose a database version from the pulldown box and try to save it, the field is blank again.
We are on Designer 9 on a oracle 10g database and we try to alter the table in a oracle 10g database.

I had this error last night while applying a patch to 6.0. However in my case the version was 21 versus a required version of 23.
As far as i know 6.1 is not compatible with the 5 db schema, so you will need an update / migration plan for the db also.

Similar Messages

  • The SYSVAL table entry for the database version (16) does not match the required version

    We upgraded from Tidal Enterprise Scheduler (TES) 5.31 to 6.1 on fresh Windows x64 2008 R2 servers.  I did a fresh install but our DBA restored a copy of our database from pre-prod which was at 5.31.  I get the error below.  Note, SQL went from 2005 to 2012 during this upgrade.  Do I need to change a value in this table to reflect the SQL change?
    [04/29 12:47:14:198]:TIDAL Enterprise Scheduler: version 6.1.0.133
    [04/29 12:47:14:198]:Java version: 1.8.0
    [04/29 12:47:14:198]:Java Virtual Machine version: 25.0-b70
    [04/29 12:47:14:198]:Start Time : 04/29/14 12:47:14:198
    [04/29 12:47:14:198]:----------------------------------------------------------------------------
    [04/29 12:47:14:198]:Database URL :jdbc:sqlserver://SQL2012-Host:1433;responseBuffering=adaptive
    [04/29 12:47:14:198]:Database Driver :com.microsoft.sqlserver.jdbc.SQLServerDriver
    [04/29 12:47:14:198]:Maximum number of log files = 100
    [04/29 12:47:14:198]:Added a LogFile called 'RegularFile'
    [04/29 12:47:14:198]:LogManager: setting default log
    [04/29 12:47:14:214]:Retrieved a LogFile called 'RegularFile'
    [04/29 12:47:14:495]:MessageBroker: Instantiated TcpTransportServer (URI = tcp://0.0.0.0:6215)
    [04/29 12:47:16:975]:Retrieved a LogFile called 'RegularFile'
    [04/29 12:47:17:272]:The SYSVAL table entry for the database version (16) does not match the required version (23). Shutting down.
    [04/29 12:47:20:282]:
    [04/29 12:47:20:282]:
    [04/29 12:47:20:282]:Shutting down the application

    I had this error last night while applying a patch to 6.0. However in my case the version was 21 versus a required version of 23.
    As far as i know 6.1 is not compatible with the 5 db schema, so you will need an update / migration plan for the db also.

  • Oracle SQL template to create re-usable DDL/DML Scripts for Oracle database

    Hi,
    I have a requirement to put together a Oracle SQL template to create re-usable DDL/DML Scripts for Oracle databases.
    Only the Oracle DBA will be running the scripts so permissions is not an issue.
    The workflow for any DDL is as follows:-
    1) New Table
    a. Check if the table exists from the system/admin views.
    b. If table exists then give message "Table Exists"
    c. If table does not exist then execute DDL code
    2) Add Column
    a. Check if Column exists for a given table from system/admin views
    b. If column exists in the specified table,
    b1. backup table.
    b2. alter table to make changes to the column
    b3. verify data or execute dml script convert from backup to the new change.
    c. If Column does not exist
    c1. backup table
    c2. alter table to add column
    c3. execute dml to populate column with default value.
    The DML scripts are for populating base tables with data required for business operations.
    3) Add new row
    a. check if row exists by comparing old values of each column with new values to be added for the new record.
    b. If exists, give message row exists
    c. If not exists, add new record.
    4) Update existing record (We have createtime columns in these tables so changes can be tracked)
    a. check if row exists using primary key.
    b. If exists,
    b1. deactivate the record using the "active" column of the table
    b2. Add new record with the changes required.
    c. If does not exist, add new record with the changes required.
    Could you please help with some ideas which can get this done accurately?
    I have tried several ways, but I am not able to put together something that fulfills all requirements.
    Thank you,

    First let me address your question. (This is the easy part.)
    1. The existence of tables can be found in DBA_TABLES. Query it and and then use conditional logic and execute immediate to process the DDL.
    2. The existence of table columns is found in DBA_TAB_COLUMNS. Query it and then conditionally execute your DDL. You can copy the "before picture" of the table using that same dba view, or even better, use DBMS_METADATA.
    As for your DML scripts, they should be restartable, reversible, and re-run-able. They should "fail gracefully" on error, be written in such a way that they can run twice in a row without creating duplicate changes.
    3. Adding appropriate constraints can prevent invalid duplicate rows. Also, you can usually add to the where clause so that the DML does only what it needs to do without even relying on the constraint (but the constraint is there as a safeguard). Look up the MERGE statement to learn how to do an UPSERT (update/insert), which will let you conditionally "deactivate" (update) or insert a record. Anything that you cannot do in SQL can be done with simple procedural code.
    Now, to the heart of the matter...
    You think I did not understand your requirements?
    Please be respectful of people's comments. Many of us are professionals with decades of experience working with databases and Oracle technology. We volunteer our valuable time and knowledge here for free. It is extremely common for someone to post what they feel is an easy SQL or PL/SQL question without stating the real goal--the business objective. Experienced people will spot that the "wrong question" has been asked, and then cut to the chase.
    We have some good questions for you. Not questions we need answers from, but questions you need to ask yourself and your team. You need to reexamine this post and deduce what those questions are. But I'll give you some hints: Why do you need to do what you are asking? And will this construct you are asking for even solve the root cause of your problems?
    Then ponder the following quotations about asking the right question:
    Good questions outrank easy answers.
    — Paul Samuelson
    The only interesting answers are those which destroy the questions.
    — Susan Sontag
    The scientific mind does not so much provide the right answers as ask the right questions.
    — Claude Levi-Strauss
    You can tell whether a man is clever by his answers. You can tell whether a man is wise by his questions.
    — Mahfouz Naguib
    One hears only those questions for which one is able to find answers.
    — Friedrich Nietzsche
    Be patient towards all that is unresolved in your heart and try to love the questions themselves.
    — Rainer Maria Rilke
    What people think of as the moment of discovery is really the discovery of the question.
    — Jonas Salk
    Judge a man by his questions rather than his answers.
    — Voltaire
    The ability to ask the right question is more than half the battle of finding the answer.
    — Thomas J. Watson

  • Update SQL script for lower SQL version

    Hi, I am copying same records 9 times and this query is working fine in SQL-2008 or newer version but getting the following error in Lower SQL version. How I can run this script for lower SQL version.
    drop table #temp
    create table #temp (Code1 varchar(10))
    insert into #temp values ('ABC')
    ;With Numbers As
    (Select 1 As Number
    Union All 
    Select Number + 1
    From Numbers
    Where Number < 9)
    Select t.* 
    From #temp t
    Cross Join Numbers;
    Error: Line 2: Incorrect syntax near ';'.

    Why are you using CTE in SQl server 2000. They were introduced from 2005. of course you need to confirm version of SQL Server
    Plus use code like below
    If object_ID('tempdb..#Temp') IS NOT NULL
    drop table #temp
    create table #temp (Code1 varchar(10))
    insert into #temp values ('ABC')
    ;With Numbers As
    (Select 1 As Number
    Union All
    Select Number + 1
    From Numbers
    Where Number < 9)
    Select t.*
    From #temp t
    Cross Join Numbers;
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Purge script for 11g database

    Hi All,
    I have a database with version
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionI have a purge script to purge the database which is not working. Can anyone tell has oracle released any purge scripts for purging 11G database.
    DECLARE
       MAX_CREATION_DATE timestamp;
       MIN_CREATION_DATE timestamp;
       batch_size integer;
       max_runtime integer;
       retention_period timestamp;
      BEGIN
       MIN_CREATION_DATE := to_timestamp('2012-03-10','YYYY-MM-DD');
       MAX_CREATION_DATE := to_timestamp('2012-03-20','YYYY-MM-DD');
        max_runtime := 20;
        retention_period := to_timestamp('2012-03-20','YYYY-MM-DD');
       batch_size := 20000;
         soa.delete_instances(
         min_creation_date => MIN_CREATION_DATE,
         max_creation_date => MAX_CREATION_DATE,
         batch_size => batch_size,
         max_runtime => max_runtime,
         retention_period => retention_period,
         purge_partitioned_component => false);
      END;Thanks
    DUOS

    You need to be more specific.
    First, you said that you wanted to purge your database, and then the tablespace, and finally, some tables...
    If you want to flush data from a table completelly, use TRUNCATE TABLE.
    If you want to remove some rows of that table, use DELETE FROM TABLE WHERE [your condition here]

  • Where to dowload table script for demo table EMPLOYEE

    Hello!
    I'm reading the book "Oracle PL/SQL Programming, Fourth Edition"
    By Steven Feuerstein.
    And I can't find the script for the employee table ..
    Where can I get it?
    Regards
    Tobias

    Copy this script in notepad and then save in .sql format and then run
    rem
    rem Header: hr_main.sql 09-jan-01
    rem
    rem Copyright (c) 2001, Oracle Corporation. All rights reserved.
    rem
    rem Owner : ahunold
    rem
    rem NAME
    rem hr_main.sql - Main script for HR schema
    rem
    rem DESCRIPTON
    rem HR (Human Resources) is the smallest and most simple one
    rem of the Sample Schemas
    rem
    rem NOTES
    rem Run as SYS or SYSTEM
    rem
    rem MODIFIED (MM/DD/YY)
    rem ahunold 08/28/01 - roles
    rem ahunold 07/13/01 - NLS Territory
    rem ahunold 04/13/01 - parameter 5, notes, spool
    rem ahunold 03/29/01 - spool
    rem ahunold 03/12/01 - prompts
    rem ahunold 03/07/01 - hr_analz.sql
    rem ahunold 03/03/01 - HR simplification, REGIONS table
    rem ngreenbe 06/01/00 - created
    SET ECHO OFF
    PROMPT
    PROMPT specify password for HR as parameter 1:
    DEFINE pass = &1
    PROMPT
    PROMPT specify default tablespeace for HR as parameter 2:
    DEFINE tbs = &2
    PROMPT
    PROMPT specify temporary tablespace for HR as parameter 3:
    DEFINE ttbs = &3
    PROMPT
    PROMPT specify password for SYS as parameter 4:
    DEFINE pass_sys = &4
    PROMPT
    PROMPT specify log path as parameter 5:
    DEFINE log_path = &5
    PROMPT
    -- The first dot in the spool command below is
    -- the SQL*Plus concatenation character
    DEFINE spool_file = &log_path.hr_main.log
    SPOOL &spool_file
    REM =======================================================
    REM cleanup section
    REM =======================================================
    DROP USER hr CASCADE;
    REM =======================================================
    REM create user
    REM three separate commands, so the create user command
    REM will succeed regardless of the existence of the
    REM DEMO and TEMP tablespaces
    REM =======================================================
    CREATE USER hr IDENTIFIED BY &pass;
    ALTER USER hr DEFAULT TABLESPACE &tbs
    QUOTA UNLIMITED ON &tbs;
    ALTER USER hr TEMPORARY TABLESPACE &ttbs;
    GRANT CONNECT TO hr;
    GRANT RESOURCE TO hr;
    REM =======================================================
    REM grants from sys schema
    REM =======================================================
    CONNECT sys/&pass_sys AS SYSDBA;
    GRANT execute ON sys.dbms_stats TO hr;
    REM =======================================================
    REM create hr schema objects
    REM =======================================================
    CONNECT hr/&pass
    ALTER SESSION SET NLS_LANGUAGE=American;
    ALTER SESSION SET NLS_TERRITORY=America;
    -- create tables, sequences and constraint
    @?/demo/schema/human_resources/hr_cre
    -- populate tables
    @?/demo/schema/human_resources/hr_popul
    -- create indexes
    @?/demo/schema/human_resources/hr_idx
    -- create procedural objects
    @?/demo/schema/human_resources/hr_code
    -- add comments to tables and columns
    @?/demo/schema/human_resources/hr_comnt
    -- gather schema statistics
    @?/demo/schema/human_resources/hr_analz
    spool off

  • Running a oracle script for multible database on same server

    Hello friends
    I am thinking of creating a script in HP UX which will run a SQL script on multiple oracle in same server. I can do this for one oracle but i'm unable to do it for multiple database.
    I need to do newid oraSID user every time for diff. database .. can u suggest something..
    regards
    Ashish

    Hi Markus,
    Its not working .. When i run this script from my ID, it says SQLPLUS not found. see this .. i have created 1 sql file and 1 script file to call it with exporting ORACLE_HOME & ORACE_SID for one of the system E40.
    Can you suggest something ..
    er3asu82:(/tmp)(xchason)#ll /tmp/testsql.sql /tmp/testscr.dat
    -rwxrwxrwx   1 xchason    dba            109 Aug  9 11:10 /tmp/testscr.dat
    -rwxrwxrwx   1 xchason    dba             32 Aug  9 11:08 /tmp/testsql.sql
    er3asu82:(/tmp)(xchason)#cat /tmp/testsql.sql
    select * from v$instance;
    quit
    er3asu82:(/tmp)(xchason)#cat /tmp/testscr.dat
    #! /bin/ksh
    export ORACLE_HOME=/oracle/E40/102_64
    export ORACE_SID=E40
    sqlplus "/as sysdba" @testsql.sql
    er3asu82:(/tmp)(xchason)#/tmp/testscr.dat
    /tmp/testscr.dat[5]: sqlplus:  not found
    Again when i try to run this from other orasid, it does not work as well..
    er3asu82:oraq52 1> /tmp/testscr.dat
    Error 6 initializing SQL*Plus
    Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    thanks
    ashish

  • RMAN Backup script for RAC Database..please suggest

    Hi All,
    I am currently working on backup policy for RAC Database for my client.The client requirement is to backup while database is shutdown(mount state).I have made below script and could any one please suggest what further things should I need to add with below rman script.
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    srvctl status database -d PROD
    echo "Database shutdown on";date
    echo "Mount Database ";date
    srvctl start instance -d PROD -i "PROD1" -o mount
    srvctl status database -d PROD
    echo "Start Full Database Backup on";date
    $ORACLE_HOME/bin/rman target / nocatalog <<EOF
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';
    run{
    allocate channel c1 device type disk connect 'sys/******@node1-vip:1521/PROD';
    allocate channel c2 device type disk connect 'sys/*****@node2-vip:1521/PROD';
    backup format '/BACKUP/PRODBKP/PROD_df_%t_%s_%p.bak'(database);
    backup format '/BACKUP/PRODBKP/archive_%t_%s_%p.bak' archivelog all;
    copy current controlfile to '/BACKUP/PRODBKP/PROD.ctl';
    delete noprompt obsolete;
    release channel c1;
    release channel c2;
    exit
    EOF
    echo "RMAN Backup Finished on";date
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    echo "Start Database";date
    srvctl start database -d PROD
    srvctl status database -d PROD
    Please share your experiences.
    Regards

    Hi,
    Some tweaks for your script.
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    srvctl status database -d PROD
    echo "Database shutdown on";date
    echo "Mount Database ";date
    srvctl start instance -d PROD -i "PROD1" -o mount1. If you database does not shutdown properly , does your script stops the execution of next step?
    2. configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';(Why you need to configure this every time) ?
    It's persistent at db level one time setting (until some other script changes the settings by other dba - else remove that - set the configuration at db level once for all)
    - Pavan Kumar N
    3.

  • Querying for company database version

    Dear Experts,
    Via the SQL Management Studio, what will be the query to allow us to extract the company database version? PL version?.. etc
    Much Thanks in Advance!
    Warmest Regards,
    Chinho

    You can also use the following Query in Company Database
    Select * from CINF
    To know the Version Number from SBO-Common use the following query
    Select * from SINF

  • Copying script for itunes database files?

    Hi,
    I stored my itunes music on another internal HD called Spitfire. The default storage folder for the itunes xml and library files is in my main internal HD /user/music/itunes folder ie. Master
    i use superduper to backup Spitfire, but i would like to backup the 2 aforementioned files.
    is there a script (I'm using panther latest version) to automatcially copy and paste the 2 files from Master to Spitfire?
    Cheers,
    keebler

    Try this:
    tell application "Finder"
    repeat with this_item in items of folder "path:to:folder"
    if modification date of this_item is greater than date "Sunday January 1, 2006 00:00:00" then
    set the_alias to this_item as alias
    tell application "iTunes"
    add alias the_alias
    end tell
    end if
    end repeat
    end tell
    The path to the folder in line 2 and the date in line 3 can be customized as needed. The path needs to be delimited by colons.
    (13381)

  • Script for checking Reader version?

    Does anyone have a script that will check the user's version when opening the form, and throw an error if it is earlier than a specified version?
    Thanks!
    Angie

    Angie,
    If you are referring to the user's version of Reader or Acrobat, you can use xfa.host.version.
    See 'Which Version of Reader?" at http://blogs.adobe.com/livecycle/adobe_livecycle_es/adobe_livecycle_designer_es/
    Steve

  • PowerShell Script For Finding Database Instance Names

    G'day
    I am trying to get information on a couple of dozen SQL database servers database instances - long story, but our DBA's do not have complete lists at the moment, and I need to find out this information.
    I have done a bit of work with PowerShell (and love it) version 3, however I do not know many SQL commands and was wondering if someone could point me in the right direction please.
    This is the code I have at the moment:
    Get-Service -ComputerName MSQLULTDBS04 | ?{$_.DisplayName -like "*SQL*"} | Select name,DisplayName,status
    It gets the information on the SQL Server install on the remote server.
    What I am trying to do however is get a list of the databases that are running on this server. Can someone help me out please?

    Hello Scott,
    Please have a look at TechNet ScriptCenter:
    Create Inventory of SQL Server in Network as Html
    It lists also all databases, but of course you need permissions to logon to that SQL Servers.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Alter table source in SES

    Hi!
    We have a lot of table sources in SES and need to change database host in source definition but unfortunatly source is read only and no supported way described in docs.
    Updating EQ$_DATA_SOURCE_PARAM_VAL with new value seems to be proper way - in administration UI source shown with new value but crawler is unable to connect to DB and using old value with old setting.
    What else should I fix?
    Thanks!
    Regards,
    iRAV

    Hi,
    The designer generate alter statements for you.
    e.g You have a table emp with empno number(8) in designer and in your application database. You cahnged empno to number(12) in designer. Generate ddl pointing to your application database. Designer generate an ALTER table script for you.

  • Alter Table Statements in Designer

    Hi Guys,
    Just wondering if anyone knows if it's possible to store Alter Table statements in Designer 9i?
    Anton

    Hi,
    The designer generate alter statements for you.
    e.g You have a table emp with empno number(8) in designer and in your application database. You cahnged empno to number(12) in designer. Generate ddl pointing to your application database. Designer generate an ALTER table script for you.

  • How do i get a script for a table

    hai
    i need sql query to create table script for already existing table.
    can any body help me.
    Edited by: 800324 on Feb 24, 2011 12:07 AM

    for examle
    SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)
         FROM USER_ALL_TABLES uEdited by: Mahir M. Quluzade on Feb 24, 2011 12:23 PM

Maybe you are looking for