Using subsitiutions in the install scripts

This should be pretty obvious, but I can't find the answer in the documentation.
Using Apex 3.1.2, in the Shared Objects, I've created a substitution named "TABLESPACE". The application uses a set of tables, the install should create these tables, and DBA have funny ideas about where these tables should be created, so I'd like to offer the option of having the install process ask for and use the TABLESPACE.
So I create an install script called "create tables". The script text has the following:
CREATE TABLE table1 (ID NUMBER, NAME VARCHAR2(30))
TABLESPACE ??;
So how do I use the TABLESPACE substitution value in the install script above? Use "&TABLESPACE:", use ":TABLESPACE"?
Edited by: tjoneslo on Nov 25, 2008 11:56 AM

To answer my own question. The install scripts are run as sql (or pl/sql) statements. You can access the pre-defined substitution strings via the v('NAME') parameter call (e.g. v('APP_USER')) but the application substitution strings, even though we are prompting for them, are not available.
Which would make for a good enhancement.

Similar Messages

  • Should/can the install script included in source=() list?

    Hi,
    It is a good thing that the sources needed to build a package are md5summed for integrity, but in most packages the install script is not. I was thinking why this might be - the PKGBUILD can be expected to modify the script?
      So to try, in one of my packages I added the install script to the source=() list. The package builds of course just fine. Then, however, if I want to upload it to AUR, I try to make a source-only package with "makepkg --source", which brakes with something like this:
    ln: creating symbolic link `/tmp/foo/srclinks.YjYgQ8XlE/foo/foo.install': File exists
    This is because makepkg tries to create a 2 symbolic links with the same filename: one link for the "foo.install" in the source=() list and also for the install=() list....
    Is this deliberate, or a bug? Looks more like a bug to me, but thought I better ask first....
    Cheers,
    Greg

    shining wrote:
    imrehg wrote:
    It might be completely internal to the pacman but defines actions taken on the system - thus whatever is in .install has effects just like the rest of the files, maybe even more: the other files are just copied, the .install is executed.
    And while it might never get installed on the system, it's internals are - how else one could define a "post_uninstall()" if it wasn't stored? Being pacman developer you know much more about this than I do, can you give a bit of info on that?
    Right it is installed to pacman database, but again, it is pacman doing all that.
    Fair enough.... The detail, however, that is not installed does not preempt checksumming. Eg. patches are also: 1) used for the package, 2) not installed, and 3) still in the checksum....
    shining wrote:
    All I'm trying to get to, is there any serious reason (technical, not philosophical) NOT to checksum the install script as well?  Because I'm yet to see any valid arguments against it, and there are loads for it....
    Taking your example from kernel26 :
    -i $startdir/kernel26.install
    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    Note that the scriptlet edited is the original one in $startdir , because that's the only place where it needs to be, from the packager pov.
    While for the preset file, it needs to be copied to $pkgdir and it is edited there.
    If you had a checksum for the scriptlet, it would also mean that makepkg -g output could be altered after running makepkg. Very weird..
    Ok, this is indeed the case. But if you look at real packages, it seems that after the package is compiled, many times they update the PKGBUILD with the new md5sum values. Again: core/kernel26.
    That .install update section in the PKGBUILD is then relegated to a "helper function" role that keep the information in sync when there's a new release, but as the PKGBUILD is distributed, it won't change anything in the .install anymore...
    Thus, again, there's no real difference between the .install files and other files used as source.
    shining wrote:Btw the whole scriptlet file could be created entirely from the pkgbuild build function.
    Sure, and that's a great thing! I actually wondered why so many packages have separate .install when it can be done in the PKGBUILD. Thought it might be some convention, but probably just habit.... I prefer doing it in the PKGBUILD as well, whenever possible...
    shining wrote:There might be ways to fix that, though I don't even see any good ones. But why bother ? You said there are loads of valid arguments to have it , but you didn't even give one !
    On the other hand, I'm yet to find any of your rebuttals that are not rebutted here again...
    shining wrote:What are you worried about here ? Security ? If you think adding a checksum for the install file is going to give you any security, you are badly fooling yourself. If someone is distributing a malicious pkgbuild, it can contain the md5sum of the malicious scriptlet which is shipped with it.
    I think you misunderstood me. I'm not complaining, but inquiring. The PKGBUILD system is awesome, and it makes me search out programs that I use but not in the repo/AUR so that I can make a new package. But also, I'm interested in the "how" and "why", and hope to improve things if possible. Now, to me it seems theres an unreasonable distinction to checksum some files needed for a package but not all of them. And thus I set out to ask the elders here on the Forum to see whether someone can shed light on the reasons of the current state. Not trying to piss of anybody, but being interested.
    Of course the md5sum is not security, it's a help, nothing more.
    As an example: some time ago, there was a package in the community (thus managed by TUs) that had an update. I wanted to check out something in the package, got the PKGBUILD and tried to make it myself - md5sum says that the sources are incorrect.... Obviously something must have gone very bad, because the md5sum field was updated according to the SVN, the package is available on pacman thus it had to build, and the sources used in the package have not been changed for a while so that cannot be a problem....
    I've got a package from a trusted source and it is broken, the md5sum told me. So the breakage can be the very same way in the install script, why is the md5sum not allowed to tell me that?
    shining wrote:The only security for pkgbuilds is yourself. When you get one from a strange place, you MUST read the pkgbuild/install files.
    Of course, never argued against it. But there are different layers of verbosity....
    Anyway....

  • Why use symbol {   } in the following script?

    Why use symbol *{   }* in the following script?
    <read-write-backing-map-scheme>
    <scheme-name>SampleDatabaseScheme</scheme-name>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-ref>SampleMemoryScheme</scheme-ref>
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>com.tangosol.examples.coherence.DBCacheStore</class-name>
    <init-params>
    <init-param>
    <param-type>java.lang.String</param-type>
    *<param-value>{cache-name}</param-value>*
    </init-param>
    </init-params>
    </class-scheme>
    </cachestore-scheme>
    </read-write-backing-map-scheme>
    Thank you very much
    Edited by: jetq on Jun 24, 2009 6:26 PM

    Hi Frank,
    In the example, the "{cache-name}" is supposed to be replaced by the database's table or view name that will be queried for the data to be cached. It's purpose is demonstrate how to pass parameters to the class constructor.
    Regards,
    Harv

  • Why use "\n" in the following script?

    Why use *"\n"* in the following script?
    Thank you
    public String toString()
    return getStreet1() + "\n" +
    getStreet2() + "\n" +
    getCity() + ", " + getState() + " " + getZip() + "\n" +
    getCountry();
    }

    qkc wrote:
    Why use *"\n"* in the following script?
    Thank you
    public String toString()
    return getStreet1() + "\n" +
    getStreet2() + "\n" +
    getCity() + ", " + getState() + " " + getZip() + "\n" +
    getCountry();
    Maybe because that's how US addresses are formatted?
    BR,
    Robert

  • The installer found unexpected changes to the install script

    Hi,
    I've just try to install PC Client 15.7 "EBF 23439: 15.7 SP130" Just downloded from Service Market Place on a Win 03 R2 32 bit and on Windows 12 R2 64 bit
    On Win 03 R3 32 bit it works fine but in  Win 12 R2 there isen0t any way to run Sybase Central.
    When I try to uninstall, on each machine, there are only thi message:
    Unable to lunch installer
    The installer found unexpected changes to the install script:

    Hi,
    So you are saying that PC-Client 15.7 SP130 doesn't uninstall? I will look into this.
    If you go to your control panel and installed software.
    What version(s) of Microsoft Studio do you have installed?
    What versions of Microsoft Visual C++ #### Redistributable Packages do you have?
    From what I saw they had pulled the Sybase Central out of PC-Client.
    You might be able to get from ASE 15.5 version of PC-Client.
    Please note that PC-Client with Sybase Central was never certified with Windows 8 or 2012. So you never get Sybase Central to work on those operating systems.
    PC-Client 15.5 last drop should have been certified with Windows 7.
    Thanks,
    Dawn Kim

  • How To use barcode in the sap scripts

    I have to put two windows in a form ,both windows should contain BARCODE
    so how i can proceed plz provide me solutions for same and possible few example code which can guide me .

    There is no change required to the print program the bar code conversion is handled by the SAPScript form.  What you do need to do is create a special character string.
    Simply click on the Character Formats button and then in standard attributes, select Bar Code in the appropriate field (it is labled Bar Code)  you probably need to talk to someone regarding which Bar Code format to use, since there is a quite a few  of them.
    Hope this helps.

  • Install media 2012.08.04 and latest install scripts - the shell

    I'm just curious about this: the latest install media uses zsh, the install scripts are bash scripts - the shell you're dropped in after "arch-chroot" is sh (SHELL=/bin/sh chroot "$@")
    Why do we use sh in the chrooted environment?

    Allan wrote:Because zsh is not installed by default...
    I understand, but let me rephrase : why the shell in the chrooted environment is sh and not bash? Isn't bash installed by default?
    In the previous version of the install scripts (present in the previous version of the install cd) the chrooted shell was bash, and in Arch "sh" is a symlink to bash (if I understand correctly, calling "bash" as "sh" make bash behave like sh).
    So, there's a reason to use sh in the chrooted installation?

  • Generate Scripts using DBCA in Slient install

    Hello,
    I have a template to create databases using DBCA. I woule like to generate scripts in Slient mode, using the template and later execute the scripts manaully. I understand, I need a response file for the same. What parameter should I set in the response file to indicate to just spool the scripts and NOT create the DB?
    Also, is there a way to specify the target directory for log files from DBCA? I believe it currently logs them in two destinations, I would like to make it one.
    Sathish

    To answer my own question. The install scripts are run as sql (or pl/sql) statements. You can access the pre-defined substitution strings via the v('NAME') parameter call (e.g. v('APP_USER')) but the application substitution strings, even though we are prompting for them, are not available.
    Which would make for a good enhancement.

  • Using javascript or HTML, When I click a link to a named page that already loaded in a tabbed page the tabbed page does not show, but you can see that the page relaoded. Using HTML or javascript what script will make this happen? The javascript focus() fu

    If a page is already loaded into a tab then using any of the following scripts will not cause the tabbed page to show when the link to it is clicked (created via PHP):
    "Continue Shopping".
    OR
    "Continue Shopping".
    OR
    "Continue Shopping".
    The first HTML works perfectly in the Safari browser.
    == This happened ==
    Every time Firefox opened
    == Always

    The scripts for this should have shown as:

  • Install Script Error?

    It's Christmas day, and I just got an IPOD Video and tried to install the software for it and ran into a whole mess of problems.
    I tried to install ITunes 7 & Quicktime 7, but every time I try I get an error at the end of the installation saying something about a missing Install Script error and that i need to run "ISScript.msi" or contact support.
    I have no idea what to do, and tried to find that file on microsoft.com, but the onlyint that comes up is "Virtual PC 2004" and not how to install it, but work around it.
    any suggestions?

    The Install script engine on this machine is older than the version required to run this setup. If available, please install the lastest version of ISScript.msi or contact your support personnel for further assistance.
    okay, let's try installing a version 11, using the instructions from the following InstallShield document:
    Update to the Latest InstallShield Installation Engines
    is that one of any help with the error message?

  • "Error" in ApEx install scripts for runtime environment?

    I recently installed a runtime ApEx 3.1 on a 10.2.0.1.0 database. After installing an application which uses the Database Account Credentials method for authentication I was unable to login to the application, getting an ERR-10480 message. After some research on this forum I granted ALTER USER to FLOWS_030100 which resolved the issue. So far so good.
    But I was still puzzled as to why the application had worked without problems in a development environment and not in the runtime environment. It took only a few minutes to locate the problem though. In the runtime-install script "apxrtins.sql" there is a call to the "runtime_grant_revoke.sql" script which removes unnecessary DBA system privileges for a runtime environment (which is a good thing IMO). In this script there is also a REVOKE ALTER USER statement, but it seems this one is needed if your application uses the DBACCOUNT authentication method. I didn't find anything on this in the documentation.
    Anyone else notice this as well? I would think this is a bug in the install-scripts but perhaps I'm missing something somewhere?

    Tim,
    Thanks for reporting this. In database server versions earlier than 10.2.0.3, the alter user privilege is required for the "flows" schema to support the feature you mentioned. We'll try to get this fixed in the next patch release.
    Scott

  • How to edit the installation scripts in the supporting objects

    I wanted to update one of the installation scripts in the supporting objects. I clicked into that script and use the "script editor" tab. After editing the script, I clicked "Apply Changes" button. It redirected me to the upper level of the page. When I reopen the script, the content of this script is messed up and has the content of another script, not what I have changed. What could happen with it? There is one case that the script was all wiped out!
    One general question, how can I easily update the install scripts and reload it without export and import the whole application? or Can I?
    Thanks
    Fengting

    Fengting,
    I am not sure what causes this, but I have had the same issue with shared components >> report queries. Sometimes if you have multiple report queries it becomes impossible to edit any of them. If I remember correctly I tried using a different browser and everything seemed to work ok. I was using Firefox when I was having the issue.
    Sorry this is not an answer, but I feel your pain!
    Cheers,
    Tyson Jouglet

  • [SOLVED] Pass Environment variables from PKGBUILD to .INSTALL script

    Hi everyone,
                       I am trying to modify the grub2-efi-bzr (http://aur.archlinux.org/packages.php?ID=38369) package making some changes in the PKGBUILD and the post-install script. I want to pass few environment variables from the PKGBUILD to the install script. How do I do that?
    Some code from the PKGBUILD
    _bzrtrunk="lp:grub/grub2" # GRUB2 BZR Main Trunk
    # _bzrtrunk="lp:~skodabenz/grub/grub2-bzr-exp" # GRUB2 BZR Experimental Branch
    _bzrmod="grub2"
    if [ ${_bzrtrunk} = "lp:~skodabenz/grub/grub2-bzr-exp" ]
    then
    _bzrmod="grub2_exp"
    pkgver="exp_${pkgver}"
    fi
    # grub-extras bzr repo locations
    _bzrtrunk_zfs="lp:~skodabenz/grub/grub2-extras-zfs"
    _bzrtrunk_lua="lp:~skodabenz/grub/grub2-extras-lua"
    if [ "$CARCH" = 'i686' ]
    then
    _EFI_ARCH=i386
    elif [ "$CARCH" = 'x86_64' ]
    then
    _EFI_ARCH=x86_64
    fi
    # _EFI_ARCH=x86_64 # Uncomment if you want to override the if condition for _EFI_ARCH above, incase the EFI ARCH does not match the Linux Kernel ARCH.
    # $CARCH=x86_64 and _EFI_ARCH=i386 requires gcc-multilib with lib32-glibc installed in the system.
    # I do not know about $CARCH=i686 and _EFI_ARCH=x86_64
    if [ ${_EFI_ARCH} = "i386" ]
    then
    pkgver="${pkgver}_x86"
    _trns_name="grub2_efi_x86"
    elif [ ${_EFI_ARCH} = "x86_64" ]
    then
    pkgver="${pkgver}_x64"
    _trns_name="grub2_efi_x64"
    fi
    Now the post-install script needs the values of _EFI_ARCH and _trns_name env variables. I do not want to copy the if statements to that script as these are decided at compile time but needed while setting up grub2-efi. This is due to the fact that EFI-ARCH need not match the Linux Kernel ARCH. How do I do that.
    Code from the post-install script
    ${_trns_name}-install --root-directory=/ --no-floppy --recheck --debug
    cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/lua.mod /boot/${_trns_name}/
    cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/zfs.mod /boot/${_trns_name}/
    cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/zfsinfo.mod /boot/${_trns_name}/
    cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/unifont.pf2 /boot/${_trns_name}/
    cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/ascii.pf2 /boot/${_trns_name}/
    ${_trns_name}-mkimage --verbose --directory=/usr/lib/${_trns_name}/${_EFI_ARCH}-efi --prefix="" --output=/boot/${_trns_name}/grub2.efi --format=${_EFI_ARCH}-efi ${_EFI_APP_MODULES}
    Thank in advance.
    Last edited by skodabenz (2010-07-27 15:46:40)

    falconindy wrote:
    Don't rely on %foo% existing -- it won't after the first build and this will prevent the PKGBUILD from being reentrant. I would use something like this (untested):
    sed -i "s|^\(_EFI_ARCH\)=.*|\1=${_EFI_ARCH}|; \
    s|^\(_trns_name\)=.*|\1=${_trns_name}|; \
    s|^\(export _EFI_APP_MODULES\)=.*|\1=${_EFI_APP_MODULES}|" \
    ${startdir}/grub2-efi-bzr.install
    Your code works except for 1 problem in the install script I want
    export __EFI_APP_MODULES="${_EFI_APP_MODULES}" (the passed ${_EFI_APP_MODULES} value should again come inside double quotes).
    right now
    export _EFI_APP_MODULES=ata part_gpt part_msdos fat ntfs ntfscomp ext2 iso9660 udf hfsplus fshelp normal chain linux ls search search_fs_file search_fs_uuid search_label help loopback boot configfile echo efi_gop efi_uga xnu xnu_uuid lvm
    which is equivalent to
    export _EFI_APP_MODULES=ata
    I want
    export _EFI_APP_MODULES="ata part_gpt part_msdos fat ntfs ntfscomp ext2 iso9660 udf hfsplus fshelp normal chain linux ls search search_fs_file search_fs_uuid search_label help loopback boot configfile echo efi_gop efi_uga xnu xnu_uuid lvm"
    How to do it with sed since sed already uses double quotes?

  • Running the deinstall script via SQLPlus

    Hi folks,
    There are plenty of examples in the forum of how to run the apex install scripts by reading the contents of APEX_APPLICATION_SUPP_OBJ_SCR. I can't find where the contents of the deinstallation script is stored. Has anyone discovered this?
    I would like to be able run the deinstall script followed by all of the install scripts from a single SQL script to speed up development?
    Any help appreciated.
    Cheers
    Dave

    I have somewhat of a similar process, where I asked on the ASP.NET forums, as I needed my users of an Intranet site to be able to have a script run with the click of the button. I was told that it was not possible, as the browser is built to not allow stuff
    like this for security reasons.
    I haven't heard of a plugin so maybe there are other ways, but what I actually had to do, was create a batch file, and than on my webpage I added an IFrame
    <iframe id="myIframe" runat="server"></iframe>
    Than either in the html markup you can set the src attribute (I did mine in the code behind), to the directory where the file is at, so for instance \\myserver\fileishere
    Obviously the location needs to be shared and allow all users read/execute. This will display the file on the web page, and then the users, just double click it and it executes.
    You can possibly have a batch file that calls powershell and the script, but the script will need to be downloaded to the users machine, so it may be easier to find a batch equivallent of your powershell script and use DOS commands
    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
    Don't Retire Technet

  • Install script is not executed during installation of homemade package

    I'm working on my first PKGBUILD for the AUR, trying to create a package to install dphys-swapfile on Arch.
    Here are the files that I'm using to create this package:
    PKGBUILD
    dphys-swapfile.install
    dphys-swapfile.service
    The installation of dphys-swapfile as specified in the PKGBUILD works perfectly, i.e. it is actually installed to the right location and you can use it without any problems at all.
    The systemd unit file is copied to the right location as well and you can enable and start the service with systemctl.
    The problem arises with the install script. I wrote dphys-swapfile.install so that the service would be automatically enabled and started right after the installation of the package, but this is not working, i.e. the service is neither being enabled not being started, and I don't know what is causing this issue.
    Any insight on what could be failing, as well as general tips on how to improve this package, will be very much appreciated.
    Last edited by jonancm (2015-02-14 22:13:38)

    It looks like presets are the appropriate way to do this:
    systemctl preset is used by the post install scriptlets of RPM packages (or other OS package formats), to enable/disable specific units by default on package installation...

Maybe you are looking for

  • Time Machine back up drive nearly Full, Can I...

    My 1Tb back up drive (backup A) is nearly full with multiple networked computers using Time Machine. I have a new 1Tb drive (backup A1) installed and ready to go as my next back up drive. If I redirect my time machines backups to the new disc (A1) in

  • I have the mac OS 92.2 Classic...Should I update to the mac os X 10.4 Tiger

    I have a couple of questions, Could anyone show me...the modifications and perfections of the new mac os X 10.4 Tiger???? And Where Could I find one cheaper than $129.00 Could anyone show me, any secure and safe place to buy the new mac os X 10.4 Tig

  • Copying condition records in SD

    Hi, We are in SAP 4.7. In condition type VA00, I have about 100 condition records in sales orgn 0001 for material 0001. I would like to copy all these 100 condition records within the same condition type VA00, but into a different sales orgn 0002 for

  • Syncing iphone w imac

    I have an iphone 4, but videos i take do not automatically sync with my imac.  I have the cloud turned on both.

  • Msiscsi.sys crashing in Windows 2008 R2 Datacenter x64

    After enabling MPIO for ISCSI one of our HyperV Clustered Windows 2008 R2 Datacenter x64 servers has been unstable, crashing 3-5 times daily.  I've had to take it out of service and after analyzing the dump file it seems there is an issue with msiscs