SQL script to update details of Peoplesoft database

Hello all,
I'm a new DBA for a UK charity running both PS financials & HR that often needs to build test, training & dev instances from our production environments. Doing this currently requires a number of manual steps to update the various nodes & paths to those required for the new instance, and naturally I didn't become a DBA to do manual work ;-)
I'm looking to script these steps, but the PS schema being as it is, I'm not having a great deal of joy finding where the relevant data might be. If anyone had a script to do something similar, or could point me in the direction of the tables I'd be extremely grateful. The kind of things that we are currently having to do via the interface are:
Peopletools > Integration Broker > Integration Setup > Nodes
Peopletools > Security >Security Objects >Single Sign-on
Peopletools > Utilities > Administration > URLs
Peopletools > Integration Broker > Configuration > Quick Configuration > Integration Broker Domains
Peopletools > Portal > Node Definitions
Peopletools > Ren Server Configuration > Ren Server Cluster
We are running MS SQL Server, but any PL SQL scripts would be great - I just need to know which tables hold the data.
Many thanks,
Andy

Well, it is very Peopletools version dependant.
An easy way could be to open to corresponding page you are talking about, then view the page definition and the associated record. At least this is what I use to do.
Then you update the background table and see if it is taking your new values.
To be short, here an extract of those tables (non-limited list, on PT.48) :
Single sign-on tructed node : pstrustnodes
Process scheduler definition : ps_serverdefn
Run control : psprcsruncntl
Message channels : pschnldefn
Messaging tables contents : psapmsgpub*, psapmsgsub*, psapmsgarc*
Message node definition : psmsgnodedefn
URL : psurldefn
Job definition : ps_prcsjobdefn
OPRID (email address) : psoprdefn
Then you should complete your own list with the method I gave above.
Nicolas.

Similar Messages

  • How to get the database owner name in T-SQL script

    Hello, All!
    I want to get the database ower name (in format DOMAIN\user) by through T-SQL script. But SELECT * FROM sys.databases returns only owner_sid.
    Please show me a way - how to get the owner name, if you have only owner_sid. Or, may be, somebody know another way ?
    Andy Mishechkin

    SELECT suser_sname( owner_sid ), * FROM sys.databases
    http://www.t-sql.ru

  • SCOM 2012 SP1 Update Rollup 5 - DB and DW SQL script and the Management Packs

    Hi,
    I am applying SCOM 2012 SP1 update rollup 5 from KB article : 2904680.
    Step#  4 and 5 from the "Installation Information" sections says to run the SQL queries(UR_Datawarehouse.sql and Update_rollup_mom_db.sql) located at "%SystemDrive%\Program Files\System Center 2012 SP1\Operations
    Manager\Server \SQL Script for Update Rollups\."
    But I do not have "System Center 2012 SP1\Operations Manager\Server \SQL Script for Update Rollups\." folder location on  my SCOM Management Servers. Similarly I do not have the MPs given in Step #6.
    Can someone please let me know from where else can I get these SQL scripts and the MPs. What if I don't run these SQL scripts. Is that OK?

    You will find it on below path%SystemDrive%\Program Files\System Center 2012\Operations Manager\Server \SQL Script for Update Rollups\.
    inside system center 2012 folder> search to Server folder and inside it you will find SQL Script
    Please remember, if you see a post that helped you please click (Vote As Helpful" and if it answered your question, please click (Mark As Answer).

  • Trouble calling .sql script

    I have looked on the forum for about a half an hour and can't find the exact answer I'm searching for, so here goes.
    I'm trying to update about a 100 records or so through use of an .sql script.
    I put the following in my sql script file
    UPDATE TABLE1 SET COL_NAME1 = 'some val.', COL_NUM_VAL = 12345, BOOL_VAL_COL = -1
    WHERE AUTOID = 9554 OR AUTOID = 1082
    OR AUTOID = 1305 OR AUTOID = 133
    OR AUTOID = 9124
    OR AUTOID = 8712
    OR AUTOID = 55 OR AUTOID = 6741 OR AUTOID = 9881
    OR AUTOID = 1012 OR AUTOID = 9158 OR AUTOID = 9378
    OR AUTOID = 9101 OR AUTOID = 8351 OR AUTOID = 7110 OR AUTOID = 922 OR AUTOID = 732
    OR AUTOID = 7253 OR AUTOID = 7825 OR AUTOID = 6772 OR AUTOID = 9854;
    commit;however, I get some kind of message back in the SQL Plus prompt showing.
      8  OR AUTOID = 9101 OR AUTOID = 8351 OR AUTOID = 7110 OR AUTOID = 922 OR AUTOID = 732
      9  OR AUTOID = 7253 OR AUTOID = 7825 OR AUTOID = 6772 OR AUTOID = 9854
    10* commit;
    11  /I can't really discern from this output stmt what happened or what is wrong,
    and needless to say, the update query doesn't execute. Any ideas as to what I need to put in there? And can't I just open it up in SQL Plus after I've created the sql file?Or is there more to it than that?
    I welcome any feedback.
    Thanks!
    Message was edited by:
    user515689

    Hi,
    If you have a file called foo.sql that contains just the 10 lines of code that you posted, then you can run it from SQL*Plus by saying "@foo" (depending on where foo.sql is stored. You may actually have give the full path name: e.g.
    SQL> @c:\my_folder\sub_folder\fooWhat are you doing to run the script?
    By the way, instead of all those ORs you can use the IN operator:
    UPDATE TABLE1 SET COL_NAME1 = 'some val.', COL_NUM_VAL = 12345, BOOL_VAL_COL = -1
    WHERE AUTOID IN (9554, 1082, 1305, ..., 9854);

  • Auto run sql script when DB opens

    Is it possible to configure a DB so a given SQL script is run each time the database opens?
    Thanks a lot in advance.

    rafadc wrote:
    Is it possible to configure a DB so a given SQL script is run each time the database opens?
    Thanks a lot in advance.Either include the script in a startup script for the database, dbstart on *nix you'd need to write your own on windows, or else move the code into a startup trigger.
    Niall Litchfield
    http://www.orawin.info/

  • Help! Need to generate SQL script file in every build of every changes in database project on TFS

    Hi everyone,
                I want to accomplish a task in TFS that I need to auto generate the database changes as SQL script file in drop folder for every build.
    For ex.: If I add a table in a database and then check in the changes, I need to get that create table script in the drop folder as .sql file extension
    I want to automate the build too for every check in. Help me out and guide me a step by step procedure because since I am new to TFS build in visual studio.
    Thanks

    Check out SSDT:
    https://msdn.microsoft.com/en-us/data/tools.aspx
    It can generate a DACPAC which can be used to update a SQL Database through the commandline. To ensure that the .sql file executed is compatible with the target database schema it contains a compiled version of teh schema and will generate the change script
    on-the-fly.
    If you want, you call SqlPackage,exe to generate a SQL script if you want to inspect it before executing.
    https://msdn.microsoft.com/en-us/library/hh550080%28v=vs.103%29.aspx
    My blog: blog.jessehouwing.nl

  • Dynamic Update Queries - SQL Script

    Hi All,
    I have a table Account_info where columns are ACCT_NO and flag with other information (columns). We are receving a file which contains ACCT_NO and FLAG. Now i need to compare ACCT_NO for Table and file and based on it need to update FLAG column in table.
    To automate this process, i can develop a shell script, which load data from file to temp table and then update statement to update Account_info table. For batch process, i can write a for loop, which commit data after every 10,000 update.
    but client does not want this way. We have to send file to Production team, where they will load data manually into temp table.
    Once done, i have to write a update statement which will take 10000 records to update on every run and then commit it, so there will not be space/memory issue.
    For example, if table has 50,000 records, i have to create 5 update statement. and then i have to send all 5 queries as sql script and send it to Production support.
    It is difficult for me to do it daily.
    Is there any other way, where SQL script is dynamic and based on number of rows/10000 , it create UPDATE statement and run it daily.
    Regards,
    ACE

    ace_friends22 wrote:
    Hi All,
    I have a table Account_info where columns are ACCT_NO and flag with other information (columns). We are receving a file which contains ACCT_NO and FLAG. Now i need to compare ACCT_NO for Table and file and based on it need to update FLAG column in table.
    To automate this process, i can develop a shell script, which load data from file to temp table and then update statement to update Account_info table. For batch process, i can write a for loop, which commit data after every 10,000 update.Why not simply use an external table pointing at the file and use a single update statement? If you write a loop with intermittent commits, this is one of the worst known ways of processing data.
    but client does not want this way.And the client knows how to technically implement a solution then? Why aren't they doing it themselves then?
    We have to send file to Production team, where they will load data manually into temp table.Unnecessary. Use an External table
    Once done, i have to write a update statement which will take 10000 records to update on every run and then commit it, so there will not be space/memory issue.Oracle is an enterprise level database engine capable of processing millions of rows without space/memory issues. If you've encountered shuch an issue you should be trying to identify the cause of it rather than suppress the symptoms.
    For example, if table has 50,000 records, i have to create 5 update statement. and then i have to send all 5 queries as sql script and send it to Production support.Bad Idea ^tm^

  • An error occurred while applying SQL script for the feature BackendStore. For details, see the log file

    Hello
    i got this error in step2
    Error: An error occurred while applying SQL script for the feature BackendStore. For details, see the log file 'C:\Users\administrator.RCC\AppData\Local\Temp\2\Create-BackendStore-lync.rcc.local_rtc-[2013_09_23][09_05_16].log'
    here is full summary
    > Bootstrap-CsComputer
    Logging status to: C:\Users\administrator.RCC\AppData\Local\Temp\2\BootstrapFull-[2013_09_23][12_17_37].html
    Checking prerequisites for bootstrapper...
    Checking prerequisite WMIEnabled...prerequisite satisfied.
    Checking prerequisite NoBootstrapperOnBranchOfficeAppliance...prerequisite satisfied.
    Checking prerequisite SupportedOS...prerequisite satisfied.
    Checking prerequisite NoOtherVersionInstalled...prerequisite satisfied.
    Host name: lync.rcc.local
    Disabling unused roles...
    Executing PowerShell command: Disable-CSComputer -Confirm:$false -Verbose -Report "C:\Users\administrator.RCC\AppData\Local\Temp\2\Disable-CSComputer-[2013_09_23][12_17_46].html"
    Checking prerequisites for roles...
    Checking prerequisite SupportedOS...prerequisite satisfied.
    Checking prerequisite SupportedOSNoDC...prerequisite satisfied.
    Checking prerequisite SupportedSqlRtcLocal...prerequisite satisfied.
    Checking prerequisite WMIEnabled...prerequisite satisfied.
    Checking prerequisite NoOtherVersionInstalled...prerequisite satisfied.
    Checking prerequisite PowerShell...prerequisite satisfied.
    Checking prerequisite WindowsIdentityFoundation...prerequisite satisfied.
    Checking prerequisite SupportedServerOS...prerequisite satisfied.
    Checking prerequisite NoUnsupportedWinFab...prerequisite satisfied.
    Checking prerequisite SupportedSqlLyncLocal...prerequisite satisfied.
    Checking prerequisite SupportedSqlRtc...prerequisite satisfied.
    Checking prerequisite IIS...prerequisite satisfied.
    Checking prerequisite IIS7Features...prerequisite satisfied.
    Checking prerequisite ASPNet...prerequisite satisfied.
    Checking prerequisite KB2646886Installed...prerequisite satisfied.
    Checking prerequisite BranchCacheBlock...prerequisite satisfied.
    Checking prerequisite WCF...prerequisite satisfied.
    Checking prerequisite WindowsMediaFoundation...prerequisite satisfied.
    Checking prerequisite SqlInstanceRtcLocal...prerequisite satisfied.
    Checking prerequisite VCredist...prerequisite satisfied.
    Checking prerequisite SqlNativeClient...prerequisite satisfied.
    Checking prerequisite SqlClrTypes...prerequisite satisfied.
    Checking prerequisite SqlSharedManagementObjects...prerequisite satisfied.
    Checking prerequisite UcmaRedist...prerequisite satisfied.
    Checking prerequisite WinFab...prerequisite satisfied.
    Checking prerequisite MicrosoftIdentityExtensions...prerequisite satisfied.
    Checking prerequisite SqlInstanceLyncLocal...prerequisite satisfied.
    Checking prerequisite SqlInstanceRtc...prerequisite satisfied.
    Checking prerequisite RewriteModule...prerequisite satisfied.
    Checking prerequisite SpeechPlatformRuntime...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ca-ES_Herena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_da-DK_Helle...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_de-DE_Hedda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-AU_Hayley...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-CA_Heather...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-GB_Hazel...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-IN_Heera...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-US_Helen...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_es-ES_Helena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_es-MX_Hilda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fi-FI_Heidi...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fr-CA_Harmonie...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fr-FR_Hortense...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_it-IT_Lucia...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ja-JP_Haruka...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ko-KR_Heami...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_nb-NO_Hulda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_nl-NL_Hanna...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pl-PL_Paulina...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pt-BR_Heloisa...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pt-PT_Helia...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ru-RU_Elena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_sv-SE_Hedvig...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-CN_HuiHui...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-HK_HunYee...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-TW_HanHan...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ca-ES_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_da-DK_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_de-DE_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-AU_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-CA_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-GB_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-IN_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-US_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_es-ES_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_es-MX_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fi-FI_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fr-CA_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fr-FR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_it-IT_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ja-JP_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ko-KR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_nb-NO_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_nl-NL_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pl-PL_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pt-BR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pt-PT_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ru-RU_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_sv-SE_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-CN_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-HK_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-TW_TELE...prerequisite satisfied.
    Checking prerequisite UcmaWorkflowRuntime...prerequisite satisfied.
    Installing any collocated databases...
    Executing PowerShell command: Install-CSDatabase -Confirm:$false -Verbose -LocalDatabases -Report "C:\Users\administrator.RCC\AppData\Local\Temp\2\Install-CSDatabase-[2013_09_23][12_17_52].html"
    An error occurred while applying SQL script for the feature BackendStore. For details, see the log file 'C:\Users\administrator.RCC\AppData\Local\Temp\2\Create-BackendStore-lync.rcc.local_rtc-[2013_09_23][12_17_54].log'
    what should i do?
    Please help me

    Hi,
    The issue may be related to disk read and write cache. Here is a similar case for your reference:
    http://blog.kloud.com.au/2013/07/15/publish-lync-2013-with-2012-r2-preview-web-application-proxy/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Kent Huang
    TechNet Community Support

  • Running sql script files to re create database

    We have having around 10 sql script file that has sql statments inside it (example insert .... delete...update.... etc).Right now what we do is that in jdbc we open each script file, and read each line ,and then make jdbc call run jdbc for each sql statement inside the file.
    Wondering if there is a better way to do this.
    Right now the challenges are
    1)The process goes wrong if there is an extra semi colon ...or extra space after a statments...etc...Basically I find this way of creating data odd...
    2)it is slow because of the network traffic between application server and database server for every sql statements that gets executed.The solution for this issue is to do a batch update....But still I dont like this solution.
    Can someone give me any better idea.
    I am thinking to have all this sql script moved to a store procedure (rather than inside the sql script file) .JDBC then can pick this store procedure sql file ,and create this store procedure via jdbc, and then execute this store procedure.
    This will be faster because all the sql will be running in the databsase.Only one trip to database to call this store procedure.
    Is this a good idea ?
    thx
    m

    Manjit wrote:
    We have having around 10 sql script file that has sql statments inside it (example insert .... delete...update.... etc).Right now what we do is that in jdbc we open each script file, and read each line ,and then make jdbc call run jdbc for each sql statement inside the file.
    Wondering if there is a better way to do this.
    Right now the challenges are
    1)The process goes wrong if there is an extra semi colon ...or extra space after a statments...etc...Basically I find this way of creating data odd...
    2)it is slow because of the network traffic between application server and database server for every sql statements that gets executed.The solution for this issue is to do a batch update....But still I dont like this solution.
    Can someone give me any better idea.
    I am thinking to have all this sql script moved to a store procedure (rather than inside the sql script file) .JDBC then can pick this store procedure sql file ,and create this store procedure via jdbc, and then execute this store procedure.
    This will be faster because all the sql will be running in the databsase.Only one trip to database to call this store procedure.
    Is this a good idea ?
    thx
    mI'm not 100% sure i follow (it's Friday and i have a mild case of ADD).
    Are you suggesting having the Java application create procedures in the database on the fly? If so i would say that's not a good idea.
    Create the stored procedures in the database, have Java call them as needed to process data.
    If you need to load copious amounts of data, look in to external tables, it's possible they could come in handy for what you are doing .... or not ... again, it's hard to say given i find your description of what's currently happening somewhat confusing.

  • Running a SQL Script step invoking PeopleSoft binary

    Running PeopleTools upgrade from 8.53 to 8.54.
    At step, Running the Updated PeopleTools Script, it fails as show below. It does not make sure while all the above steps where SQL Script is involved ran successfully but this one. Did anybody run into the same issue?
    Appreciate any suggestions

    looks different, ideally it should not through this error.
    If your access id details are fine, then raise a case with oracle

  • SQL script based on hostname and database name?

    I am trying to write a script that I can run on several unix servers and databases that will do different sql statements based on which server and database it is being run in.
    Something like:
    if hostname = 'A' and database name = 'D' then do this
    else if hostname = 'B' and database name = 'F' then do that
    I have tried many diifferent combinations of shell scripts and sql scripts but can't seem to get anything that works.
    Can someone help me out? Thanks.

    Since you are already able to get he db and host info, you are well on your way to branching based on that information. All you need is the basic framework:
    declare
      db VARCHAR2(30);
      host VARCHAR2(30);
      sqlcmd VARCHAR2(4000);
    begin
      select sys_context('userenv','host') host
           , sys_context('userenv','db_name') db_name
        into host
           , db
        from dual;
      case
        when db = 'XE' and host = 'mypc' then
          sqlcmd := q'[local_package.do_something('parm1', :db, :host)]';
          execute IMMEDIATE sqlcmd USING db, host;
        when db = 'DEV' and host in ('serv1','serv2') then
          sqlcmd := q'[different_packge.do_something('parm1', :db, :host)]';
          execute IMMEDIATE sqlcmd USING db, host;
        else
          dbms_output.put_line('unrecognized db/host combination: '||db||', '||host);
      end case;
    end;
    /In this example I've used dynamic SQL since not all instances are guaranteed to have any or all of the package procedures referenced in the dynamic sql. With out the dynamic sql, you would get errors and be unable to run the script on any instance lacking one or more of the reference package procedures..

  • PeopleTools 8.49 PeopleSoft Database Cannot Connect with MS SQL Server 2005

    Folks,
    Hello. I am working on PeopleSoft PIA. My system is Windows Server 2003, MS SQL Server Express 2005 Standard, PeopleTools 8.49. I am setting up PeopleSoft Database \PsMpDbInstall\setup.exe and got the errors as follows:
    Error: Setup fails to connect to SQL Server. The default settings SQL Server does not allow remote connection.
    Then I type in "sqlcmd" in Command Prompt and got the same error as follows:
    Name Pipe Provider: Could not open a connection to SQL Server. MS SQL Native Client: the default settings SQL Server does not allow remote connection.
    In order to fix SQL Server 2005 remote connection problem, I have done the 3 steps as follows:
    Step 1: In SQL Server Surface Area Connection, enable local and remote connection, TCP/IP and Name Pipes, SQL Server browser Startup type "automatic" and status "running".
    Step 2: Create exception for SQL Server 2005 and SQL Server browser Service in Windows Firewall.
    Step 3: Add the default SQL Server Port 1433 into Windows Firewall.
    But the above 3 steps cannot resolve SQL Server Express 2005 remote connection problem. Can any folks help to resolve this problem ?
    Thanks.

    Folks,
    Management Studio can connect with SQL Server 2005 successfully.
    I have turned off Windows Server 2003 firewall completely. But "sqlcmd" in Command Prompt still connect with SQL Server 2005 because its remote connection is not allowed.
    Is the "not allow remote connection" problem caused by Windows Firewall or SQL Server 2005 itself ?
    Thanks.

  • Store sql script in database

    Hi all,
    pls is there any way to store a sql script in database and be able to run it from a report or a form.
    many thanks,
    hany

    you can store functions, procedures and packages in a database and there a many ways to execute them.
    select my_function(my_parameter) from dual;
    or
    begin
    my_procedure(my_paramter);
    end;
    or
    begin
    my_package.my_procedure(my_paramter);
    end;
    please specify your sql script, for a more exact response
    andreas

  • Using an SQL Script file to create database in Java? (monkeyDB.sql)

    Hello!
    I am a writing an SQL Script so that I can re-create my database on another server (im using my laptop to test it on first though).
    I'm connecting to mySQL server using JDBC which works fine, but I was wondering
    how can I run an entire script file, say myScript.sql from within a Java class??
    (an SQL Script is simply a file containing the regular SQL commands and expressions that you might enter at an sql command line prompt)
    example of an SQL Scritp: monkeyDB.sql>>
    //#create new db
    CREATE DATABASE sample_db;
    //#set active db
    USE sample_db;
    //#set table paramaters
    CREATE TABLE monkeys
    (name CHAR(20),
      age INT UNSIGNED,
      sex ENUM('M','F')
    //#create standard monkeys
    INSERT INTO monkeys(name,age,sex) VALUES("Sammy",10,"M");
    INSERT INTO monkeys(name,age,sex) VALUES("Muncht",12,"M");
    INSERT INTO monkeys(name,age,sex) VALUES("Jill",8,"F");
    //#get recordset
    SELECT * FROM monkeys WHERE age < 50;Thanks for your help!

    thanks. :-)
    I thought about that too but I didnt want to hard wire it into the code.
    I guess it isnt possible to output the script file using some command from the sql library..?

  • Running the same sql script in multiple databases

    Hello,
    What is the method to run the same sql script in multiple databases? I want to write a unix script that would select from different databases and run a sql/plsql script in those different databases. What are the ways to write such a unix script? Thank you in advance.

    Just have a parameter which takes in the oracle connection parameters and use it in your sqlplus script with your shell script.
    Your sqlplus script can have a procedure/function call or an anonymous block;
    Then have a wrapper script to call the original script with different connection parameters. Hope this helps.

Maybe you are looking for

  • TS3212 i have windows 8.1 when i try to open i tunes store it says has occured a problem and must close program

    I have windows 8.1 and when I try to access the itunes store it gives me this message. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is avialable. This all started after downloadin

  • Pages documents in iCloud can't be opened

    I stored some Pages documents in iCloud last fall, and now-even though they are visible in the Pages "open" window in Mountain Lion-I can't open them on either my Mac or iOS devices. When I click or tap on these documents, they appear to "zoom open"

  • Spry HorizontalMenu sticking in FireFox

    Visited links remain highlighted – including submenus.  No problems in IE.  Page can be viewed at http://mtolivechurch1.org/tsc/tsc_index.html (not released to public until I can fix this).  I have tried a:focus outline:none but that didn't help.  Al

  • Securing class files

    Hello, I read all these topics about securing class-files, and about encryptors and stuff like that so I tought this could be possible : I've made an application and you can run it by using an exe-file. In the same directory you find the class-files.

  • CSS text in columns

    I want to set up some text in 3 CSS columns so that it flows across the columns. I blieve this can be done, as I saw a description of it on a W3C forum but I didn't understand it! I need a 'columns for Dummies' version?! Thanks Stephen