Updated bind 9.3.0 package

This is an updated version of the bind-9.3.0-1 found on current repository.  It brings the following:1. Runs as named user/group instead of root.
2. Automatically generate rndc.key at installation, if none is present.
3. Automatically create user and group when installed and remove them when package is uninstalled.
4. Zones organized as primary/secondary (pri,sec)
Important, while it runs as an unpriviledge user, still it isn´t chrooted.  I will release another package with chrooting out of the box (maybe with name bind-chroot).
PKGBUILD
pkgname=bind
pkgver=9.3.0
pkgrel=2
pkgdesc="Berkeley Internet Name Domain - A DNS server with host and dig utilities"
backup=(etc/named.conf etc/logrotate.d/named etc/rndc.key)
depends=('openssl')
provides=('dns-server')
conflicts=('dns-server')
source=(ftp://ftp.isc.org/isc/bind9/$pkgver/$pkgname-$pkgver.tar.gz
named.conf localhost.zone 127.0.0.zone named root.hint named.logrotate)
md5sums=('fdb42fff7e345372ac52a4493b77b694' 'eab2f297cccc32d89ec841832e9dc9c3'
'ab5beef0b41eb6376c7f1f4ee233172b' 'bdbdfe4990b0903984306dd14f98b951'
'e13658e2143ad323845b6d73ddd110b1' 'c7202ed4c5afa91b0a25f05e93b33ba6'
'2ba26270bf2078a2d259977ea7d222df')
install="bind.install"
build() {
# Add group and user
if [ ! `egrep '^named' /etc/passwd` ]; then
groupadd -g 40 named
useradd -c "Bind Nameserver" -g named -u 40 -d /var/named named -s /bin/false
cleanup=1
else
cleanup=0
fi
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/usr --sysconfdir=/etc
--localstatedir=/var --with-libtool --enable-shared
--enable-threads --with-openssl=yes --enable-ipv6
make || return 1
make DESTDIR=$startdir/pkg install
# make directories
mkdir -p $startdir/pkg/var/named/{pri,sec}
mkdir -p $startdir/pkg/var/run/named
# install Arch specific config files
install -D -m755 ../named $startdir/pkg/etc/rc.d/named
install -D -m644 ../named.conf $startdir/pkg/etc/named.conf
install -D -m644 ../127.0.0.zone $startdir/pkg/var/named/pri/127.0.0.zone
install -D -m644 ../localhost.zone $startdir/pkg/var/named/pri/localhost.zone
install -D -m644 ../root.hint $startdir/pkg/var/named/root.hint
install -D -m644 ../named.logrotate $startdir/pkg/etc/logrotate.d/named
# generate new key if it is missing
if [ ! -f '$startdir/pkg/etc/rndc.key' ]; then
if [ ! -f '/usr/lib/libisc.so.9' ]; then
# no bind libs installed, use compiled ones temporary
cp -p $startdir/pkg/usr/lib/libisc.so.9 /usr/lib
cp -p $startdir/pkg/usr/lib/libdns.so.20 /usr/lib
# and generate rndc config
$startdir/pkg/usr/sbin/rndc-confgen > $startdir/pkg/etc/named.tmp
rm -f /usr/lib/libisc.so.9 /usr/lib/libdns.so.20
else
# bind libs found, generate rndc config
$startdir/pkg/usr/sbin/rndc-confgen > $startdir/pkg/etc/named.tmp
fi
# append new key to where it belongs
cat $startdir/pkg/etc/named.tmp | head -n 11
>> $startdir/pkg/etc/rndc.key
cat $startdir/pkg/etc/named.tmp | tail -n 10 | head -n 9 | cut -c 3-
>> $startdir/pkg/etc/named.conf
rm -f $startdir/pkg/etc/named.tmp
fi
# adjust permisions
chown -R named:named $startdir/pkg/var/named
chown named:root $startdir/pkg/etc/rndc.key
chown named:named $startdir/pkg/var/run/named
chmod 744 $startdir/pkg/var/run/named
# remove user & group if added by build
if [ $cleanup -eq 1 ]; then
echo "==> Removing user/group named"
userdel named
fi
bind.install
# This is a default template for a post-install scriptlet. You can
# remove any functions you don't need (and this header).
post_install() {
echo "Adding user/group named"
groupadd -g 40 named
useradd -c "Bind Nameserver" -g named -u 40 -d /var/named named -s /bin/false
/bin/true
post_remove() {
echo "Removing user/group named"
userdel named
/bin/true
op=$1
shift
$op $*
named
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/sbin/named`
case "$1" in
start)
stat_busy "Starting DNS"
[ -z "$PID" ] && /usr/sbin/named -u named
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon named
stat_done
fi
stop)
stat_busy "Stopping DNS"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon named
stat_done
fi
restart)
$0 stop
sleep 1
$0 start
echo "usage: $0 {start|stop|restart}"
esac
exit 0
named.conf
// /etc/named.conf
options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
auth-nxdomain yes;
datasize default;
// Uncoment these to enable IPv6 connections support
// IPv4 will still work
// listen-on { none; };
// listen-on-v6 { any; };
zone "localhost" IN {
type master;
file "pri/localhost.zone";
allow-update { none; };
allow-transfer { any; };
zone "0.0.127.in-addr.arpa" IN {
type master;
file "pri/127.0.0.zone";
allow-update { none; };
allow-transfer { any; };
zone "." IN {
type hint;
file "root.hint";
//zone "example.org" IN {
// type slave;
// file "example.zone";
// masters {
// 192.168.1.100;
// allow-query { any; };
// allow-transfer { any; };
logging {
channel xfer-log {
file "/var/log/named.log";
print-category yes;
print-severity yes;
print-time yes;
severity info;
category xfer-in { xfer-log; };
category xfer-out { xfer-log; };
category notify { xfer-log; };
Also, if a developer read this, I recommend adding a dns-server to the provide/conflict list since right now a person can install more than one DNS server (Bind, PowerDNS for example).

you know it would have been far more practical to submit your "changes" to the bind maintainer than have several versions of one package floating around. it is also far more prudent and effective if you make a feature request  through the bug tracker than through the forum where the maintainer may never see it (this is with respect to your dns-server provides/conflicts suggestion)

Similar Messages

  • Update showing up in "Compliance 5 - Specific Computer" Report even after removing the update from the Software Update before creating Group and Package

    So I've created a Software Update Group and I did NOT want anything in there dealing with Internet Explorer 11 since the organization is currently stuck at using 10 as the highest. So I made sure that Internet Explorer was NOT in the list and then I deployed
    the package. 
    After running my Overall Compliance report it shows that the systems are compliant, but when I view the "Compliance 5 - Specific Computer" I see that "Internet Explorer 11 for Windows 7 for x64-based Systems" is listed in the report. 
    This is just a testing phase right now and I have not created a WSUS like Domain level GPO. I understand that the SCCM client creates a local policy on the clients for the location of the Software Update Point (Specify
    Intranet Microsoft update service location), but the "Configure Automatic Updates" policy is set to Not Configured, which it looks like when this
    is set, the "Install updates automatically (recommended)" at 3AM is the default. 
    Is the reason why the "Internet Explorer 11 for Windows 7 for x64-based Systems" update is showing up in the list due to the fact that the "Configure
    Automatic Updates" policy is set to Not Configured
    and therefore it is still reaching out to check Windows Update online? 
    So, if I do create a Domain level GPO to Disable the "Configure
    Automatic Updates" policy, then the "Internet Explorer 11 for Windows 7 for x64-based Systems" update would not show up in the "Compliance 5 - Specific Computer" report?
    By the way, I have a Software Update Maintenance Window configured for the hours of 1AM-4AM so the 3AM default time falls within this time frame, therefore, I am assuming the SCCM 2012 client will not allow the Windows Update Agent to install the "Internet
    Explorer 11 for Windows 7 for x64-based Systems" update, even though it has detected it is "Required". 
    Thanks

    But, don't you need a Deployment Package in order to deploy the Software Update Group? The Software Update Group uses the downloaded updates contained in the Deployment Package located in, wherever the Package Source is, right?
    One more quick question that you will know right off hand, because, well, you just will I'm sure.
    No. The software update group really has nothing to do with any update packages. The update group assigns updates to clients and in turn clients use update packages to download assign and applicable updates from. There is no connection between the two though
    as the client can download an update from any available update package. Thus, it's more than possible to updates in an update package that are not in any update groups and it is also possible for an update to be in an update group without being in any update
    package.
    If the "Configure Automatic Updates" policy is set to "Not Configured" and since this keeps the 3AM Automatic Updates default, if I was to remove the Software Update Maintenance Window from being between 1AM-4AM, will the WUA agent install updates
    at 3AM, or no because the SCCM 2012 client still manages and oversees it and basically blocks that from occurring?
    No, ConfigMgr does not in any way block the WUA; however, the WUA can only autonomously install updates it downloads directly from WSUS. Thus, since there are no updates approved or downloaded in your WSUS instance, there's nothing for it to download and
    install. If you happen to actually be going into WSUS and approving updates (which you should not be doing as its unsupported), then yes, it actually would install updates -- this is outside of ConfigMgr's control though. Generally, disabling the WUA via a
    GPO is the recommended to prevent any accidental installations or reboots (as the WUA wil also check for initiate pending reboots outside of ConfigMgr).
    Lots more info in these two blog posts:
    - http://blog.configmgrftw.com/software-update-management-and-group-policy-for-configmgr-what-else/
    - http://blog.configmgrftw.com/software-updates-management-and-group-policy-for-configmgr-cont/
    Jason | http://blog.configmgrftw.com

  • Bind variable inside a package

    Can we declare a bind variable inside a package specification?
    CREATE OR REPLACE PACKAGE GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE);
    VARIABLE O VARCHAR2(20);
    END GET_EMPLOYEEDETAILS ;
    CREATE OR REPLACE PACKAGE BODY GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE)
    IS
    BEGIN
    SELECT FIRST_NAME INTO F_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID = E_ID;
    DBMS_OUTPUT.PUT_LINE(F_NAME);
    END;
    END GET_EMPLOYEEDETAILS;
    Output:
    ERROR at line 4: PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
      := . ( @ % ; not null range default character
    The symbol ":=" was substituted for "VARCHAR2" to continue.
    2. IS
    3. PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE);
    4. VARIABLE O VARCHAR2(20);
    5. END GET_EMPLOYEEDETAILS ;
    6. /
    or is there any alternative for bind variables inside an package
    Thanks in advance
    Message was edited by: 1009739

    The "VARIABLE O VARCHAR2(20);" syntax is the way SQLPlus declared bind variables - it is specific to the client. Because PL/SQL packages and procedures are server code that continue past sessions, its only access to the client environment is what the client gives it - it can't go and create a bind variable in the client.
    PL/SQL procedures, functions and packages run from lots of environments, so they cannot access bind variables inside their body - you have to pass any external variables as parameters.
    Anonymous PL/SQL blocks can access bind variables.
    You can declare package public global variables - just leave out that "VARIABLE". E.g.
    CREATE OR REPLACE PACKAGE GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMP.EMPNO%TYPE, F_NAME OUT EMP.ENAME%TYPE);
    O VARCHAR2(20);
    END GET_EMPLOYEEDETAILS ;
    For local variables in your procedure, just put them between the IS and BEGIN. Using them in SQL inside the PL/SQL automatically uses them as a bind variable.
    create or replace PROCEDURE GET_FIRSTNAME(E_ID IN EMP.EMPNO%TYPE, F_NAME OUT EMP.ENAME%TYPE)
    IS
      O VARCHAR2(20);
      O2 VARCHAR2(21);
    BEGIN
      O := 'FR%';
    SELECT ENAME INTO F_NAME FROM EMP WHERE EMPNO = E_ID and ENAME like O;
    O2 := F_NAME || '2';
    DBMS_OUTPUT.PUT_LINE(F_NAME);
    END;
    O is bound in the query.
    To access bind variables from anonymous PL/SQL, first declare them in the calling environment. In SQL Plus that's
    VARIABLE O VARCHAR2(20);
    In Pro*C it's
    EXEC SQL BEGIN DECLARE SECTION;
      char[21] O
    EXEC SQL END DECLARE SECTION;
    Then reference it in anonymous PL/SQL with a colon as prefix:
    BEGIN
    SELECT FIRST_NAME INTO :O FROM EMPLOYEES WHERE EMPLOYEE_ID = E_ID;
    END;
    This only works for anonymous blocks (starting with BEGIN or DECLARE). As I said, PL/SQL procedures, functions and packages cannot see bind variables from the calling environment

  • How can i get the date of the last update of one PL/SQL package ?

    Hello,
    How can i get the date of the last update of a PL/SQL package
    named MYPACKAGE ?
    Thanks in advance ! ;-)

    to get the timestamp,last ddl time of object
    select timestamp,last_ddl_time from user_objects
    where object_name='<package name>';
    this will give you last transaction time ,date of object

  • Security issue in DNS ! Update bind.

    Apparently there is a massive security issue in DNS protocol : http://securosis.com/2008/07/08/dan-kam … -released/
    or http://www.kb.cert.org/vuls/id/800113
    I am surprised I haven't seen any post on the forum about it. For now a solution could be to update bind to 9.5.0-P1 (I don't know if the one in testing is this particular one, there is no "P1").
    Every DNS server has to be upgraded since the issue is in the protocol, not in the code !

    A lot of systems got updated yesterday/today. I just checked a Windows Server 2003 x64 RC2 at work; yesterday it was vulnerable, but today it's reported safe after the recent security updates (this site offers some kind of check: http://www.doxpara.com/)
    I believe all the "big" ones in Linux did release an update yesterday, so there's probably plentiful of patches around... which is beyond the limits of my brain cells at the moment.

  • Update Multiple Records by Using Package..

    Hi All,
    I have designed OA page which contains multiple records in a tabular format and few fields are editable. Now I want to update few records by using package. Bcoz page view object is too much complex. So it is impossible to create view object from EO. That’s why I want to update some value by using package.
    Please help me…
    Thanks in advance..
    Thanks
    --Subhas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    Use plsql record type for this type of requirement.
    Refer folllowing steps:
    1) Create a plsql record type in the database ,
    2) create a plsql procedure/package and use above record type as parameter in the procedure.
    3) call this procedure from OAF side.
    Thanks,
    Kumar

  • Updating an App-v 5 package in SCCM 2012, update not applying automatically

    Hello, just doing some testing of updating an App-v 5 package in SCCM. The application has been deployed and  run on a client pc. I've gone back and opened the package in the sequencer and made some changes and saved it as a new package.
    In SCCM I've updated the content and pointed it at the new package. That all looks fine. It's showing the new files in the content.
    The application deployment settings are set to required and set to install outside maintenance windows. The client has received the update, I can see it in the software center but it's not being applied automatically.
    I've waited over 12 hours so the client has also had its maintenance window but it still has not updated. I've also tried launching the application to see if that would bring in the update but still no joy.
    Just wondered what experience other people have had with this? 

    Firstly, just because you mentioned saving as a new package, if you select that option it will create a brand new v0.0.0.1 package and users settings will not transfer to the new version, so just use save or save as in most cases.
    Have you tried logging the user off and on again? And if the app is published globally, rebooting?
    If the application is in use, then the update will be delayed until either of these events occur, depending on how it was published. Also, if the app has certain integration points such as shell extensions or browser plugins, these can create a lock on the
    package even though you don't have the application running. You can run a powershell command to stop the package and speed things up if you wish, although this runs the risk of terminating explorer.exe or iexplore.exe:
    Get-AppvClientPackage *name* | Stop-AppvClientPackage   (and add -global to the end if it was globally published)
    Dan Gough - UK App-V MVP
    Blog: packageology.com
    Twitter: @packageologist
    LinkedIn

  • Unable to install itunes 10.5 after update issue. "windows installer package error"

    So when the update for itunes happened, it wiped my ipod, and then my ipod would not work with itunes. So I uninstalled itunes and tried to reinstall it and it gives me that error message. "There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor." I have tried all the fixes from deleting everything to running command prompts. I think i tried everything.
    Method 1: Right click on the setup file and, from the drop down menu, select 'run as administrator'
    Method 2: Open command prompt in elevated mode and, then unregistered and re-register Windows Installer.
    1. In the Start search box and then type 'cmd', when the command application appears at the top of the start window, right click on it and, from the drop down menu, select 'run as administrator' and type each of these commands in the command prompt and press Enter
       • msiexec /unregister
       • msiexec /regserver
    msiexec.exe belongs to the Windows Installer Component and is used to install new programs that use Windows Installer package files (MSI)
    http://windows.microsoft.com/en-US/windows7/Command-Prompt-frequently-asked-ques tions
    Method 3: Start the Windows Installer service
    1. Click Start, type Services.msc and press {ENTER}
    2. Double-click Windows Installer
    3. Set the Startup type of Windows Installer to Manual
    4. Click Start to start the service. Note down the error message if any.
    5. Click OK.
    If the above mentioned steps don’t resolve the issue, then
    follow the steps and check whether you can resolve the issue:
    Method 4: Empty your Temp directory and restart
    1.       Choose Start > Computer
    2.       In Computer, open the "C:" drive.
    3.       Open the Users folder.
    4.       Double-click the folder titled with your username.
    5.       If you see an AppData folder, skip to step 10. If you don't see an AppData folder, proceed to the next step.
    6.       Choose Organize > Folder and Search Options.
    7.       Click the View tab.
    8.       Select the option to "Show hidden files and folders." (In Windows 7 this option will be called "Show hidden files, folders, and drives").
    9.       Click OK.
    10.    Double-click the AppData folder to open it. If Windows needs your permission to continue click Continue.
    11.    Double-click the Local folder to open it.
    12.    Right-click on the Temp folder and choose Delete.
    13.    In the confirmation dialog that appears click Yes.
    14.    If you are unable to delete the Temp folder, close all programs, especially those in the Notification area ("System Tray") of the Windows Task bar and repeat step 12.
    15.    Restart your computer.
    Method 5: Removing iTunes
    Note: iTunes Store purchases or songs imported from CDs are saved in your My Music folder by default and are not deleted by removing iTunes.
    1.       Quit iTunes.
    2.       From the Start menu, click Control Panel.
    3.       In Control Panel, click Uninstall a program. The Programs and Features Control Panel opens.
    Alternately, in Classic Panel of Control Panel, click Programs and Features.
    4.       Select iTunes from the list of currently installed programs, then click Uninstall.
    5.       When asked if you would like to remove iTunes, click Yes.
    6.       After the uninstallation is complete, do not restart your computer if you are prompted to.
    7.       If other program entries were listed for iTunes in Programs and Features remove those as well.
    8.       In Programs and Features, also remove any iPod Updater applications that are listed in the same fashion as you removed iTunes.
    Method 6: You may also try downloading the Windows Installer Cleanup utility and run that to remove the leftover ITunes installer files that may be causing issues with your current installation.
    You may refer the following article to download the Windows Installer Cleanup Utility:
    http://support.microsoft.com/kb/290301
    1. Click on Start > All Programs and then click Windows Install Cleanup; the Windows Installer Clean Up Utility window appears, listing software that is currently installed on your computer.
    2. Select iTunes from the list and click Remove. If you have multiple iTunes files, remove all of them.
    3. Once you have completed the above steps to Empty your Temp directory, Completely remove iTunes and QuickTime, and Clean up iTunes installer files on the computer, you can install the latest version of iTunes from
    To this:
    This solution correct my bug.
    I had the same error in with the i-tunes installation and i did this and it worked.... This works for any i tunes that fails to install itself on 64 Bit
    You have to go into your registry.
    Start, run, type in “regedit”.
    Next go to HKEY_LOCAL_MACHINE.
    SYSTEM
    CurrentControlSet
    Services
    MSIServer
    To the right you’ll see WOW64. Double click on it, or right click on it and click on modify. Change the setting from 1 to 0.
    Next, go to the start menu again and type in the search box: “services.msc”.
    Look for and find the Windows Installer service.
    Double click on it and tell it to stop. Next, tell it to start.
    You should now be able to install your programs.
    ------  By the way I dont have the WOW64 option is not available.
    I was able to install quick time just fine. All of the other apple software associated with itunes installed fine but itunes did not. Im not sure if there is a virus that could do this. I didnt delete anything but apple folders.
    I have tried other things but i cant remember exactly there were.
    When the install process for itunes is running it changes with the error message shows up during install.
    Thanks.

    I should have posted this earlier, but anyway. I restored my laptop to factory version after backing up any useful data, and the first thing I the laptop was restored was connect to the internet, download and install the latest version of iTunes. And Bingo! It worked.
    Apple helps you find Original Sin with the Windows.

  • How to update bind variable and restrict values in a Model Driven LOV?

    Hi Guys,
    Using JDev 11.1.1.2.0
    I've recreated an excellent Frank Nimphius article about restricting values derived from a model driven LOV (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/44-restrict-lov-169186.pdf)
    But my bind variable isn't updating. Deleting the bind variable gets me the entire LOV. Activate the code below and insert a bind variable into the where clause like Frank says and I get nothing back. Bind variable is blank. Any ideas? Code wasn't supplied with the article. It seems simple enough but the bind variable isn't updating in the SQL, even though the updated value shows up here...
      public void onLovLaunch(LaunchPopupEvent launchPopupEvent)
        BindingContext bctx = BindingContext.getCurrent();
        BindingContainer bindings = bctx.getCurrentBindingsEntry();
        FacesCtrlLOVBinding lov = (FacesCtrlLOVBinding)bindings.get("DepartmentId");
        lov.getListIterBinding().getViewObject().setNamedWhereClauseParam("deptId","60");
        System.out.println("lov name: " + lov.getName().toString());
        System.out.println("lov Param Attrs: " + lov.getListIterBinding().getViewObject().getNamedWhereClauseParams().getAttribute("deptId").toString());
        System.out.println("lov View Object: " + lov.getListIterBinding().getViewObject().getName().toString());
        System.out.println("lov IterBinding: " + lov.getListIterBinding().getName().toString());
       }Gets me ...
    lov name: DepartmentId
    lov Param Attrs: 60
    lov View Object: _LOCAL_VIEW_USAGE_lov_model_queries_EmployeesView_DepartmentsView
    lov IterBinding: DepartmentIdList_2

    That's a good idea, but it's still not working. Here is how I implemented it. It might be different from your suggestion as I'm still pretty new to this.
    I have a recursive tree table. You select a node. You then click a button which calls the listener below. "findParents" is a method call to the AppModuleImpl class and it finds all parent nodes of your selection. "restrictPartBomLOV", also of the AppModuleImpl class, then modifies the model driven lists' View Object (partBomLOV) to exclude those parent node values.
    The resulting model driven LOV on the popup should be updated, yeah? But it still isn't udpating. If I manually type in the updated Where clause in PartBomLOV.xml query tab, it works, but it doesn't programmatically.
      public void insertPopupFetchListener(PopupFetchEvent popupFetchEvent)
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding("findParents");
        parents = (List)operationBinding.execute();
        operationBinding = bindings.getOperationBinding("restrictPartBomLOV");
        operationBinding.execute();
       public void restrictPartBomLOV(List parents)
          ViewObjectImpl vo = getPartBomLOV();
          String wcl = "";
          Object[]   p = parents.toArray();
          for(int i = 0; i < p.length; i++)
             if (i == 0)
                wcl = wcl + "PNUM <> '" + p.toString() + "'";
    else
    wcl = wcl + "AND PNUM <> '" + p[i].toString() + "'";
    vo.setWhereClause(wcl);
    System.out.println(vo.getWhereClause().toString());
    vo.executeQuery();
    Edited by: LovettWB on Nov 11, 2010 11:23 PM

  • Issue in Update routine due to Data Package

    We have this peculiar situation.
    The scenario is ..
    We have to load data from ODS1 to ODS2.
    The data package size is 9980 while transferring data from ODS1 to ODS2.
    In the update rule we have some calculations and we rank the records based on these calculations.
    The ODS key for both ODS1 and ODS2 is same ie Delivery Number , Delivery Item & Source System.
    For example a Delivery Number has 12 Delivery Items.
    These Delivery Items are in different Data Packages namely Data Package 1 and Data Package 4.
    So instead of having the ranks as 1 to 10 its calculating it as 1 to 5 and second item as 1 to 5.
    But what we require is Rank as 1 to 10.
    This is due to the fact that the items are in different Data packages.
    In this case the ABAP routine is working fine but the Data Package is the problem.
    Can anybody any alternative solution to this issue.?
    Thanks in advance for assistance.............

    CODE FOR INTER DATA PACKAGE TREATMENT
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    DATA: v_packet_nbr TYPE i VALUE 1.
    DATA:
      g_requnr  TYPE rsrequnr.
    DATA:
      l_is        TYPE string VALUE 'G_S_IS-RECNO',
      l_requnr    TYPE string VALUE 'G_S_MINFO-REQUNR'.
    FIELD-SYMBOLS: <g_f1> TYPE ANY,
                   <g_requnr> TYPE ANY.
    TYPES:
      BEGIN OF global_data_package.
            INCLUDE STRUCTURE /bic/cs8ydbim001.
    TYPES: recno   LIKE sy-tabix,
      END OF global_data_package.
    DATA lt_data_package_collect TYPE STANDARD TABLE OF global_data_package.
    DATA ls_datapack TYPE global_data_package.
    datapackage enhancement Declaration
    TYPES: BEGIN OF datapak.
            INCLUDE STRUCTURE /bic/cs8ydbim001.
    TYPES: END OF datapak.
    DATA: datapak1 TYPE STANDARD TABLE OF datapak,
          wa_datapak1 LIKE LINE OF datapak1.
    Declaration for Business Rules implementation
    TYPES : BEGIN OF ty_ydbsdppx.
            INCLUDE STRUCTURE /bic/aydbsdppx00.
    TYPES: END OF ty_ydbsdppx.
    DATA : it_ydbsdppx TYPE STANDARD TABLE OF ty_ydbsdppx WITH HEADER LINE,
           wa_ydbsdppx TYPE ty_ydbsdppx,
           temp TYPE /bic/aydbim00100-price,
           lv_tabix TYPE sy-tabix.
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS8YDBIM001.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    TABLES: rsmonfact.
      TYPES:
        BEGIN OF ls_rsmonfact,
          dp_nr TYPE rsmonfact-dp_nr,
        END OF ls_rsmonfact.
      DATA: k TYPE i,
            v_lines_1 TYPE i,
            v_lines_2 TYPE i,
            v_packet_max TYPE i.
    declaration of internal tables
      DATA: it_rsmonfact TYPE STANDARD TABLE OF ls_rsmonfact.
    INTER-PACKAGE COLLECTION TREATMENT *******************
      ASSIGN (l_requnr) TO <g_requnr>.
      SELECT dp_nr FROM rsmonfact
        INTO TABLE it_rsmonfact
        WHERE rnr = <g_requnr>.
      DESCRIBE TABLE it_rsmonfact LINES v_packet_max.
      IF v_packet_nbr < v_packet_max.
      APPEND LINES OF DATA_PACKAGE[] TO lt_data_package_collect[].
        CLEAR: DATA_PACKAGE.
        REFRESH DATA_PACKAGE.
        v_packet_nbr = v_packet_nbr + 1.
        CLEAR: MONITOR[], MONITOR.
        MONITOR-msgid = '00'.
        MONITOR-msgty = 'I'.
        MONITOR-msgno = '398'.
        MONITOR-msgv1 = 'All data_packages have been gathered in one. '.
        MONITOR-msgv2 = 'The last DATA_PACKAGE contains all records.'.
        APPEND MONITOR.
      ELSE.
    last data_package => perform Business Rules.
        IF v_packet_max > 1.
          APPEND LINES OF DATA_PACKAGE[] TO lt_data_package_collect[].
          CLEAR: DATA_PACKAGE[], DATA_PACKAGE.
          k = 1.
    We put back all package collected into data_package, handling recno.
          LOOP AT lt_data_package_collect INTO ls_datapack.
            ls_datapack-recno = k.
            APPEND ls_datapack TO DATA_PACKAGE.
            k = k + 1.
          ENDLOOP.
          CLEAR : lt_data_package_collect.
          REFRESH : lt_data_package_collect.
        ENDIF.
    sorting global data package and only keep the first occurence of the
    *record
      SORT DATA_PACKAGE BY material plant calmonth.
      DELETE ADJACENT DUPLICATES FROM DATA_PACKAGE
            COMPARING material plant calyear.
      SELECT * FROM /bic/aydbsdppx00
          INTO TABLE it_ydbsdppx
          FOR ALL ENTRIES IN DATA_PACKAGE
            WHERE material = DATA_PACKAGE-material
              AND plant    = DATA_PACKAGE-plant
              AND calyear  = DATA_PACKAGE-calyear.
    Enhance Data_package with Target additionnal fields.
      LOOP AT DATA_PACKAGE.
        CLEAR : wa_datapak1, wa_ydbsdppx.
        MOVE-CORRESPONDING DATA_PACKAGE TO wa_datapak1.
        READ TABLE it_ydbsdppx INTO wa_ydbsdppx
          WITH KEY material = DATA_PACKAGE-material
                      plant = DATA_PACKAGE-plant
                    calyear = DATA_PACKAGE-calyear.
        IF sy-subrc NE 0.       "new product price
          APPEND wa_datapak1 TO datapak1.
        ELSE.                   " a product price already exists
          IF wa_ydbsdppx-calmonth GE DATA_PACKAGE-calmonth.
    keep the eldest one  (for each year), or overwrite price if same month
            APPEND wa_datapak1 TO datapak1.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDIF.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Edited by: mansi dandavate on Jun 17, 2010 12:32 PM

  • Parameter error - bad bind variable in a Package..!!

    Hello All
    i am tring to create a security package with in one procedure i am trying to handle the number of times the user enters the wrong user name or password:
    -i created a parameter on my login form and add it to my procedure and it works just fine,But when i tried to copy the same procedure the package inside my library can't recognize that Parameter.
    -It gives me error : bad bind variable.
    The code is as follows.
    PARAMETER.COUNT := :PARAMETER.COUNT + 1;
    IF :PARAMETER.COUNT > 3 THEN
    WRONG_ALERT('WRONG_PASS',' ur number of trials has expiered the form will be closed ');
    EXIT_FORM;
    END IF;
    Can anyboady help me pls.
    Regards,
    Abdetu.

    Super,It works Just fine.
    Thanks Gerd,
    That's make me decide that if i have the following statatment for example:
    IF :USER_CODE IS NULL THEN .........
    I have to change it to :
    IF copy (name_in ('USER_CODE' )) IS NULL THEN..........
    But,if i have the following select statment :
    ==============================
         SELECT USER_CODE , USER_PASS WORD
         INTO :GLOBAL.USER_CODE , :GLOBAL.USER_PASS WORD
         FROM APP_USERS
         WHERE USER_CODE = :USER_CODE
         AND USER_PASS WORD= :USER_PASS WORD;
    Should i transfer it to the following:
    =========================
    SELECT USER_CODE , USER_PASS WORD
    INTO     COPY(NAME_IN ('GLOBAL.usr_code'), COPY(NAME_IN ('GLOBAL.PASSWORD')
    FROM APP_USERS
         WHERE USER_CODE = COPY(NAME_IN ('USER_CODE' )
    AND USER_PASS WORD=COPY(NAME_IN ('USER_PASS WORD');
    Pls help me,it's my first time ...
    Thanks in advance.
    Regards,
    Abdetu.

  • Bind variable issue in Package Body

    When I try to compile my package body, I get an error on the variables declared within the procedure. Bind variable not allowed. Any thoughts?

    Apparently the error was related to something else, and the message was mis-leading. When I re-structured the code for other reasons, the 'error' was no longer showing up. Sorry for the confusion.

  • Cant update Itunes/MacOS. say installer package is in trash

    I was trying to update my itunes so i could use the itunes store. When I install the
    MacOS update a message pops up saying that the installer package is in the trash. There are no files in the trash and Im guessing It was deleted. Anyone have a way of getting this file or fixing this problem? Thanks

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • Updating DB link in the package/view programatically.

    Guys,
    I have to refresh my prod database to DEV , which I am doing with RMAN duplicate command, there are few packages and views which refers database links, the database links in dev is different than prod,so after refreshing DEV from prod, I need to dynamically change the database link in the package and views pointing to prod to DEV and re-compile the object.so that after refresh all objects in the DEV using database link are pointing to DEV Database link.
    The prod db link name is SAMP.PROD.ORAP05
    DEV DB link is      SAMD.DEV.ORAD01
    I guess I will have to use REGEXP_REPLACE but not sure how exactly.

    Peter Gjelstrup wrote:
    , but its existing setup and it can't be changed. so I need to update the db link name in all objects which refers those links.Does not make sense to me. If you are about to change all objects that use links, that change might as well be to put in a synonym, instead of changing the link reference
    Voila, next time will be a lot easier.
    Regards
    PeterYes I agree, that synonyms will make it easier for next time, but I want to know if there is any way to change the db link reference in those objects programatically instead of doing manually?

  • Updating a JAR that uses packages

    Hi There,
    I have a problem in that I am trying to update a class within a JAR which uses packages. The issue is that when updating the JAR, the class I have requested to update is simply placed in the root of the JAR and not in the required package.
    I need to to this within a Java program, so unpacking and re-packing the JAR is not an option.
    Here is what i've been trying:
    I have a class called UserProfile.class, which resides within my messages package - Structure: /messages/UserProfile.class
    When I call the update command:
    jar uf C:\AdminUI.jar E:\project\code\Eclipse_Proj\messages\UserProfile.class
    It creates the folder structure /project/code/Eclipse_Proj/messages within the JAR file and places UserProfile.class within this folder - when in fact the UserProfile.class should be placed within the /messages folder.
    Any ideas on how I can place the class in the correct folder would be much appreciated.
    Thanks very much
    K
    null

    Thanks for the reply!
    Yeah that works, but i'm trying to update the JAR from a Java program using
    Runtime.getRuntime().exec()
    but when I try to run the command Runtime.getRuntime().exec("cd c:") I get the below exception:
    java.io.IOException: CreateProcess: cd c: error=2
    I understand there is a -C parameter to temporarily change directory so I tried the following command:
    jar uf C:\AdminUI.jar -C E:\project\code\Eclipse_Proj \messages\UserProfile.class
    But this simply inserts the UserProfile.class into a jar under the following directory structure:
    project/code/Eclipse_Proj/messages/UserProfile.class
    Thanks again for your help.
    Any input much appreciated
    K

Maybe you are looking for