If script executing locally- do this, if remote-do that

hello everyone,
  need some advice on the best way to do this, not sure if some logic like this is even needed, i may be over thinking it.
First a little background:
I have a clipbucket 2.6 site.  works great on remote.  when i install with xampp on my personal computer errors being thrown of
Call to undefined method ADODB_mysql::select()
now i found a fix for this on their site, it is to change a line in their code:
require 'adodb/adodb.inc.php';
to something that will reference the file correctly in a local environment.  some people suggest
require '/FULL PATH TO/adodb/adodb.inc.php';
but that does not work for me, i get errors of not being able to find file, turns out it only works on wamp or lampp, i use xampp
THIS is what works on my local xampp test server:
require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';
NOW MY QUESTION:
require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';
will not work on remote to reference the file correctly.
How can i make some logic to decide if a script is being executed on local or remote and include a filepath accordingly?
if file exists?
server root?
suggestions?'
ideas?
is this even the right way to go about this?  I cant figure out a way to scructure the include to work with both, i have it disabled to use variables in include statements (whatever its called), ha
any suggestions on how to do this effectively and most importantly safely??
thanks a ton for your attention!

as i tried to explain in my first post, (maybe not all that well but i tried) the path to the file is different on the remote and localhost.  Normally a file refrence can be structured to not make this a big deal.  But in this particular situation xampp does not recognize the short path or the FULL PATH TO way of doing things.  I agree it sucks, but it is what it is.  as long as the if else is structured effeciently and securely, it would make a cross platform solution.  Plus some poeple only use the clipbucket cms locally, kindof like a picture album, this way they can use it too.
Thanks Rob, thats kindof what I was leaning towards, just wasnt sure if there was a better way of doing it.  This topic i found a few places on the clip bucket forum and neither of them had a solid cross platform solution.  Just thought id check with the adobe crowd before i posted a solution.
My final code if anyone is curious:
if($_SERVER['DOCUMENT_ROOT'] !== 'C:/xampp/htdocs')     
//works for remote     
require 'adodb/adodb.inc.php';     
}else{     
//works for localhost     
require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';    
Thanks a lot everyone!

Similar Messages

  • SSIS Execute Process Task to Unzip Remote Files

    I have created an SSIS Execute Process Task to unzip files on a remote server.
    Executable: \\servername\c$\Program Files (x86)\7-Zip\7z.exe
    Arguments: -o\\servername\d$\DBFiles\ -y x \\servername\d$\DBFiles\somefile.zip
    The zip file size is about 40MB.
    The SSIS task runs very slowly, close to 5 minutes. I know it should not take this long. When I remote logon to the server and run the 7z program to unzip the same file, it unzips in less than 10 seconds.
    It seems that the way it is set up now, it constantly sending instructions back and forth from my PC to the server when I run the SSIS package on my PC.  
    I have 50 files of varying sizes that need to be processed daily. The SSIS unzip task takes 2 hours just to unzip these files.
    How should I set up the SSIS Execute Process Task so that it can unzip files on remote server efficiently?
    Many thanks in advance

    The reason is that the files contain data that need to be loaded to the database. So, the zipped data files are copied to the server where the database lives. The SSIS package unzips the files and loads the database. The SSIS package is stored on the same
    server. The server lives in the remote data centre.
    My team run the SSIS package using Managament Studio running their PCs in the office, which is a different location to the data centre.
    Since the package and files live on the same remote server, I would have thought that that would not be an issue. But the fact that we run the package locally means that the package is executed locally.
    My goal is to put the zipped data files on the server, unzip the files, load data to a database on a remote server. I need to allow my team of 4 to be able to use Management Studio to run the SSIS packages to do the above. Would I be better off Remote
    Desktop connecting to the server and execute the package there?
    I will check out the PowerShell option.

  • ODI11G:Network MSaccessfile throgh DSN executing Locally but not with Agent

    Hi,
    We able to access Network MSaccessfile and running fine using loca(No agent) agent from our dev machine but when we configured the MS acess DSN on Agent machine and trying to execute the packageusing agent , it is failing with below error.
    Even when we connect to agent machine and try to execute the package from agent machine locally(no agent) it is working( the same case as mentioned above i.e. able to execute locally from our dev machine) but execution using agent not able to run from our dev/Agent machine. Throwing the below error.
    What could be the problem?? I gueseed this would be a access issue as our customer has given network access on agent machine using some different user and this user might not be having proper access on ODI machine as package is failig for local execution if we execute the package from Agent machine
    While accesing ODBC\Remote file ODI uses which account to access those files ?
    does it needs to create any specific account for that ? or something like that?
    Error on excutinng using Agent-->
    oracle.odi.runtime.agent.invocation.InvocationException: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Access database engine cannot open or write to the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view and write its data.
    at oracle.odi.runtime.agent.invocation.RemoteRuntimeAgentInvoker.invoke(RemoteRuntimeAgentInvoker.java:279)
    at oracle.odi.runtime.agent.invocation.RemoteRuntimeAgentInvoker.invokeTestDataServer(RemoteRuntimeAgentInvoker.java:653)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.remoteTestConn(SnpsDialogTestConnet.java:847)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.remoteConnect(SnpsDialogTestConnet.java:820)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.jButtonTest_ActionPerformed(SnpsDialogTestConnet.java:758)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.connEtoC1(SnpsDialogTestConnet.java:137)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$1(SnpsDialogTestConnet.java:133)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$IvjEventHandler.actionPerformed(SnpsDialogTestConnet.java:87)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6267)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    With Thanks,
    Shilpa
    Edited by: shilpa on Feb 6, 2012 2:00 AM

    Hello Surya,
    As on ODI development machine(BDVMD122) where we configured the MS access DSN for remote file, the package with local Agent(No agent) is executing perfectly. So I dont think its a Topology-context issue.
    Please let me know if my statement is wrong
    Venkat,
    There is a very less possibility of 'file is open somewhere' as it is executing locally perfectly.
    The package execution in PROD is done using Agent(not with Local agent).
    Dev environment-
    Machine-----------------------------DSN-Configuration-----------ODI Execution------------------------------------Status
    BDVMD122- ODIdevMachine-----On BDVMD122-------------on BDVMD122 with Local(No agent)----------Success in execution
    BDVMD122- ODIdevMachine-----On BDVMD122------------- same as above but in UATwithUAT login--- Success
    BDVMD122- ODIdevMachine-----On devAgent - BDVMD100---on BDVMD122 using agent BDVMD100-----Failure with the msg mentioned above
    UAT Environment-after code movement to different repository
    BDVMD122- ODIdevMachine Local(No agent)     on BDVMD122 with Local(No agent) Failure with the msg mentioned above
    Comment on your point
    1> Make sure the file is accessible from the server(where its failing). if possible create an an agent on the server specifying host as your desktop. use this agent to execute the interface.
    <Shilpa> We have created the DSN on ODI agent where we are able to access the network file. As we dont have any thing to check for the exact permission on ODI agent, we are unsure of what type of access we have on ODI agent machine. We raised this as a query to our customer. But when we RDP ODI agent machineand try to execute the ODI package from ODI Agent machinre With Local ( No agent), it is giving the same error.
    Our customer has given remote access to file on ODI agent's machine using some different user and we have created the DSN on ODI agent machine by logging into ODImachine using our dev id's( through RDP). I guess, this could be the permission issue also
    I did not get your point-"if possible create an an agent on the server specifying host as your desktop. use this agent to execute the interface"-
    What does here server means, how to host desktop?
    2> There is another option..use an intermediary system to pile all your source files and load from. however you will have to install odi on this system and create an agent , again.
    <Shilpa>
    We have to access files from remote server only.
    With Thanks,
    Shilpa Dhote
    Edited by: shilpa on Feb 7, 2012 4:52 AM
    Edited by: shilpa on Feb 7, 2012 5:14 AM
    Edited by: shilpa on Feb 7, 2012 5:19 AM
    Edited by: shilpa on Feb 7, 2012 5:19 AM
    Edited by: shilpa on Feb 7, 2012 5:20 AM
    Edited by: shilpa on Feb 7, 2012 5:20 AM
    Edited by: shilpa on Feb 7, 2012 5:20 AM
    Edited by: shilpa on Feb 7, 2012 5:21 AM
    Edited by: shilpa on Feb 7, 2012 5:21 AM
    Edited by: shilpa on Feb 7, 2012 11:12 PM
    Edited by: shilpa on Feb 8, 2012 2:46 AM

  • I need helping!!! configuring RDP access to my local server from a remote location on my Cisco ASA 5505 Firewall.

    I need helping configuring RDP access to my local server from a remote location on my Cisco ASA 5505 Firewall.
    I have attempted to configure rdp access but it does not seem to be working for me Could I please ask someone to help me modify my current configuration to allow this? Please do step by step as I could use all the help I could get.
    I need to allow the following IP addresses to have RDP access to my server:
    66.237.238.193-66.237.238.222
    69.195.249.177-69.195.249.190
    69.65.80.240-69.65.80.249
    My external WAN server info is - 99.89.69.333
    The internal IP address of my server is - 192.168.6.2
    The other server shows up as 99.89.69.334 but is working fine.
    I already added one server for Static route and RDP but when I try to put in same commands it doesnt allow me to for this new one. Please take a look at my configuration file and give me the commands i need in order to put this through. Also please tell me if there are any bad/conflicting entries.
    THE FOLLOWING IS MY CONFIGURATION FILE
    Also I have modified IP information so that its not the ACTUAL ip info for my server/network etc... lol for security reasons of course
    Also the bolded lines are the modifications I made but that arent working.
    ASA Version 7.2(4)
    hostname ciscoasa
    domain-name default.domain.invalid
    enable password DowJbZ7jrm5Nkm5B encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    interface Vlan1
    nameif inside
    security-level 100
    ip address 192.168.6.254 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    ip address 99.89.69.233 255.255.255.248
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    ftp mode passive
    dns server-group DefaultDNS
    domain-name default.domain.invalid
    object-group network EMRMC
    network-object 10.1.2.0 255.255.255.0
    network-object 192.168.10.0 255.255.255.0
    network-object 192.168.11.0 255.255.255.0
    network-object 172.16.0.0 255.255.0.0
    network-object 192.168.9.0 255.255.255.0
    object-group service RDP tcp
    description RDP
    port-object eq 3389
    object-group service GMED tcp
    description GMED
    port-object eq 3390
    object-group service MarsAccess tcp
    description MarsAccess
    port-object range pcanywhere-data 5632
    object-group service MarsFTP tcp
    description MarsFTP
    port-object range ftp-data ftp
    object-group service MarsSupportAppls tcp
    description MarsSupportAppls
    port-object eq 1972
    object-group service MarsUpdatePort tcp
    description MarsUpdatePort
    port-object eq 7835
    object-group service NM1503 tcp
    description NM1503
    port-object eq 1503
    object-group service NM1720 tcp
    description NM1720
    port-object eq h323
    object-group service NM1731 tcp
    description NM1731
    port-object eq 1731
    object-group service NM389 tcp
    description NM389
    port-object eq ldap
    object-group service NM522 tcp
    description NM522
    port-object eq 522
    object-group service SSL tcp
    description SSL
    port-object eq https
    object-group service rdp tcp
    port-object eq 3389
    access-list outside_1_cryptomap extended permit ip 192.168.6.0 255.255.255.0 object-group EMRMC
    access-list inside_nat0_outbound extended permit ip 192.168.6.0 255.255.255.0 192.168.0.0 255.255.0.0
    access-list inside_nat0_outbound extended permit ip 192.168.6.0 255.255.255.0 object-group EMRMC
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 host 99.89.69.334 eq pcanywhere-data
    access-list outside_access_in extended permit udp 69.16.158.128 255.255.255.128 host 99.89.69.334 eq pcanywhere-status
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 host 99.89.69.334 object-group RDP
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 192.168.6.0 255.255.255.0 eq ftp
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 192.168.6.0 255.255.255.0 eq ldap
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 192.168.6.0 255.255.255.0 eq h323
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 192.168.6.0 255.255.255.0 eq telnet
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 192.168.6.0 255.255.255.0 eq www
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 host 99.89.69.334 object-group SSL
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 192.168.6.0 255.255.255.0 object-group NM522
    access-list outside_access_in extended permit tcp 69.16.158.128 255.255.255.128 192.168.6.0 255.255.255.0 object-group NM1731
    access-list outside_access_in extended permit tcp 173.197.144.48 255.255.255.248 host 99.89.69.334 object-group RDP
    access-list outside_access_in extended permit tcp any interface outside eq 3389
    access-list outside_access_in extended permit tcp host 66.237.238.194 host 99.89.69.333
    access-list outside_access_in extended permit tcp host 66.237.238.194 host 99.89.69.333 object-group rdp
    access-list outside_access_in extended permit tcp any host 99.89.69.333 object-group rdp
    access-list out_in extended permit tcp any host 192.168.6.2 eq 3389
    pager lines 24
    logging enable
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    icmp unreachable rate-limit 1 burst-size 1
    asdm image disk0:/asdm-524.bin
    no asdm history enable
    arp timeout 14400
    global (outside) 1 interface
    nat (inside) 0 access-list inside_nat0_outbound
    nat (inside) 1 0.0.0.0 0.0.0.0
    static (inside,outside) tcp 99.89.69.334 3389 192.168.6.1 3389 netmask 255.255.255.255
    static (inside,outside) tcp interface 3389 192.168.6.2 3389 netmask 255.255.255.255
    access-group outside_access_in in interface outside
    route outside 0.0.0.0 0.0.0.0 99.89.69.338 1
    timeout xlate 3:00:00
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    http server enable
    http 192.168.6.0 255.255.255.0 inside
    http 0.0.0.0 0.0.0.0 outside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart
    crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
    crypto map outside_map 1 match address outside_1_cryptomap
    crypto map outside_map 1 set peer 68.156.148.5
    crypto map outside_map 1 set transform-set ESP-3DES-MD5
    crypto map outside_map interface outside
    crypto isakmp enable outside
    crypto isakmp policy 10
    authentication pre-share
    encryption 3des
    hash md5
    group 1
    lifetime 86400
    crypto isakmp policy 30
    authentication pre-share
    encryption 3des
    hash md5
    group 2
    lifetime 86400
    telnet timeout 5
    ssh timeout 5
    console timeout 0
    dhcpd auto_config outside
    tunnel-group 68.156.148.5 type ipsec-l2l
    tunnel-group 68.156.148.5 ipsec-attributes
    pre-shared-key *
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect esmtp
      inspect sqlnet
      inspect skinny
      inspect sunrpc
      inspect sunrpc
      inspect xdmcp
      inspect sip
      inspect netbios
      inspect tftp
    service-policy global_policy global
    prompt hostname context
    Cryptochecksum:f47dfb2cf91833f0366ff572eafefb1d
    : end
    ciscoasa(config-network)#

    Unclear what did not work.  In your original post you include said some commands were added but don't work:
    static (inside,outside) tcp interface 3389 192.168.6.2 3389 netmask 255.255.255.255
    and later you state you add another command that gets an error:
    static (inside,outside) tcp 99.89.69.333 3389 192.168.6.2 3389 netmask 255.255.255.255
    You also stated that 99.89.69.333 (actually 99.89.69.233, guessing from the rest of your config and other posts) is your WAN IP address.
    The first static statement matches Cisco's documentation, which states that a static statement must use the 'interface' directive when you are trying to do static PAT utilizing the IP address of the interface.  Since 99.89.69.333 is the assigned IP address of your WAN interface, that may explain why the second statement fails.
    Any reason why you are using static PAT (including the port number 3389) instead of just skipping that directive?  Static PAT usually makes sense when you need to change the TCP port number.  In your example, you are not changing the TCP port 3389.

  • Unable to update this object because the following attributes associated with this object have values that may already be associated with another object in your local directory services

    Getting this error from DirSync
    Unable to update this object because the following attributes associated with this object have values that may already be associated with another object in your local directory services: [UserPrincipalName
    [email protected];].  Correct or remove the duplicate values in your local directory.  Please refer to
    http://support.microsoft.com/kb/2647098 for more information on identifying objects with duplicate attribute values.
    Quick eyeball and couldn't see the cause in the user account so used the script here:
    http://gallery.technet.microsoft.com/office/Fix-Duplicate-User-d92215ef
    And got these outputs:
    PS C:\Windows\System32\WindowsPowerShell\v1.0> Export-OSCADUserPrincipalName -UserPrincipalName "[email protected]" -Path .\outputs.csv
    WARNING: Cannot find objects with specified duplicate user principal name
    [email protected]
    Found 0 user(s) with duplicate user principal name.
    Where to from here?
    Richard P

    Hi,
    Did you talk about the Microsoft Azure Active Directory Sync tool ?
    If yes, this issue occurs if one or more of the following conditions are true:
    An object in the on-premises Active Directory has an SMTP address that's the same as the SMTP address of the object that's reporting the problem.
    An object in the on-premises Active Directory has a mail attribute that's identical to the object that's reporting the problem.
    An object already exists in your organizational account and has the same SMTP address or mail attribute as the object in the on-premises Active Directory
    More detail information, please refer to:
    http://support.microsoft.com/kb/2520976/en-us
    [Troubleshooting] Unable to update this object because the following attributes associated with this object
    http://blogs.technet.com/b/aadsyncsupport/archive/2014/05/20/troubleshooting-unable-to-update-this-object-because-the-following-attributes-associated-with-this-object.aspx
    Regards.
    Vivian Wang

  • How to find the local system name in remote desktop through oracle

    Hi all,
    i am useing oralce 9i,D2K (Forms 6i) ,Presently i had a small problem when ever i am useing the application through the remote desktop i can not able to find the local system name .If i am accessing from the local system name then i can get the system name but when the user accessing the application through remote desktop i want to find from which local system he is accessing the remote desktop through the application is there any way to find it .If please let me know .
    Thanks in advance
    Srini

    Hi,
    Not sure of what you want.
    Have a look at v$session view. Machine column is maybe what you're looking for.
    If you want to retrieve the local host executing remote desktop, it's actually not possible natievely, since it's still remote host that is connecting to the database.
    Hope it helps.

  • How to Execute Remote procedures that use DBLinks?

    Using Oracle 10g (RAC Linux) to remote connect Windows 10g to dblink to AS/400 <
    <I have created a procedure that I execute remotely by issuing the following:
    CALL GLOBAL.REFRESH_STAGING@KRONOSLINK();
    The procedure errors as
    Error at line 2
    ORA-20001: ERROR OCCURED
    ORA-06512: at "GLOBAL.REFRESH_STAGING", line 47
    ORA-06512: at line 1
    The procedure runs without error from the host database. The problem is when the procedure makes a call to the dblink.
    I unsuccessfully attempted to capture the error message.
    Question: Is it possible to execute remote procedures that use dblinks? If so, How is that accomplished.
    Question: What is the proper way to handle exceptions in this case?
    Bonus: What can be done to improve this procedure? (Suggestions, like adding return on the procedure).
    CREATE OR REPLACE PROCEDURE GLOBAL.REFRESH_STAGING IS
    NOOBJECT EXCEPTION;
    OBJECTEXIST EXCEPTION;
    PRAGMA EXCEPTION_INIT(NOOBJECT, -00942); -- Exception handling for ORA-00942 - table or view does not exist
    PRAGMA EXCEPTION_INIT(OBJECTEXIST, -00955); -- Exception handling for ORA-009555 - name is already used by an existing object
    sT LONG := '';
    sS LONG := '';
    sST LONG := '';
    cursor csrO is
    SELECT
    SCHEMANAME,
    TABLENAME
    FROM GLOBAL.STAGING_TABLES;
    csrR csrO%ROWTYPE;
    BEGIN
    FOR csrR IN csrO
    LOOP
    sT := csrR.TABLENAME;
    sS := csrR.SCHEMANAME;
    sST := sS || '.' || sT;
    BEGIN
    EXECUTE IMMEDIATE 'drop table global.' || sT || ' purge';
    EXCEPTION
    WHEN NOOBJECT THEN
    NULL;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.FORMAT_CALL_STACK);
    DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.FORMAT_ERROR_STACK);
    RAISE_APPLICATION_ERROR (-20001, 'ERROR OCCURED');
    END;
    BEGIN
    EXECUTE IMMEDIATE 'create table global.' || sT || ' nologging as select * from ' || sST || '@thebosslink';
    COMMIT;
    EXCEPTION
    WHEN OBJECTEXIST THEN
    NULL;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.FORMAT_CALL_STACK);
    DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.FORMAT_ERROR_STACK);
    DBMS_OUTPUT.PUT_LINE(SQLCODE || ' - ' || SQLERRM);
    RAISE_APPLICATION_ERROR (-20001, 'ERROR OCCURED');
    END;
    END LOOP;
    END REFRESH_STAGING;
    Thanks,
    blevels

    SET LINESIZE 500;
    COLUMN DB_LINK FORMAT a20
    COLUMN HOST FORMAT a20
    COLUMN USERNAME FORMAT a20
    COLUMN OWNER FORMAT a10
    COLUMN TABLE_NAME FORMAT a20
    select db_link,username, host from all_db_links where db_link = 'KRONOSLINK';
    select privilege from dba_sys_privs where grantee = 'SYSTEM';
    select owner, table_name from dba_tab_privs where grantee='SYSTEM';
    DBLINK_ USERNAME HOST
    KRONOSLINK SYSTEM ORCL
    1 row selected.
    PRIVILEGE
    GLOBAL QUERY REWRITE
    CREATE MATERIALIZED VIEW
    CREATE TABLE
    UNLIMITED TABLESPACE
    SELECT ANY TABLE
    5 rows selected.
    OWNER TABLENAME_
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCEXP
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCVID
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS INCFIL
    SYS DBMS_ALERT
    SYS DBMS_SYS_ERROR
    SYS DBMS_RULE_EXIMP
    SYS DBMS_AQ
    SYS DBMS_AQADM
    SYS DBMS_AQ_IMPORT_INTER
    NAL
    SYS DBMS_AQELM
    SYS DBMS_TRANSFORM_EXIMP
    SYS SYS_GROUP
    SYS DBMS_DEFER_IMPORT_IN
    TERNAL
    SYS DBMS_REPCAT
    WMSYS WM$UDTRIG_INFO
    SYS SET_TABLESPACE
    SYS CHECK_UPGRADE
    SYS AVINASH
    SYS AVINASH
    SYS AVINASH1
    SYS AVINASH1
    SYS DB_PMP
    SYS DB_PMP
    SYS DIR_TESTCASE
    SYS DIR_TESTCASE
    SYS EXPORT_FULL_DIR
    SYS EXPORT_FULL_DIR
    SYS PUMP
    SYS PUMP
    SYS LOGS
    SYS LOGS
    SYS DPUMP_DIR2
    SYS DPUMP_DIR2
    SYS AVIS
    SYS AVIS
    SYS DPDIR_LCLLGS
    SYS DPDIR_LCLLGS
    67 rows selected.
    Edited by: user10860953 on Jan 28, 2010 10:43 AM

  • Best method to execute a command on a remote machine?

    I am currently using runtime.exec to execute commands on the machine where my java gui is running. What I would like to do is to execute the programs on a remote networked machine.
    What should I be looking at? creating sockets, using rmi?
    eventually it would be good to utilise ssh for the connection.
    Any help is much appreciated.

    haven't really looked at this properly, was really after some advice on what methods would be useful.....
    I can see that a telnet type solution can work... need to look further at rmi i think

  • Linked server problem, its works locally but not from remote machine

    Hi,
    i am using the application NAV and have written the query in the application. am using automation variable to link to the SQL Server.
    The problem is that , the query which i have written executes only when i am working on local machine .
    I mean when i want to execute the same query from remote machine through my app Dynamics NAV then its not getting executed.
    Thanks in advance

    Depends on what you are trying to do and what security you are using.
    What error did you get?
    If you are using windows authentication then take a look at delegation
    http://www.databasejournal.com/features/mssql/article.php/3696506/Setting-Up-Delegation-for-Linked-Servers.htm
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • HTMLLoader - local HTML file with remote access

    Hi,
    I use the HTMLLoader to load a local HTML file. (AIR
    development with Flash)
    In this local HTML file is a remote JavaScript, which I need.
    It doesn't work, because of the sandbox.
    But is it possible to deactivate the sandbox or anything
    else, that I can use the local HTML file with remote access?

    Hi,
    I use the HTMLLoader to load a local HTML file. (AIR
    development with Flash)
    In this local HTML file is a remote JavaScript, which I need.
    It doesn't work, because of the sandbox.
    But is it possible to deactivate the sandbox or anything
    else, that I can use the local HTML file with remote access?

  • Execute locally - no data available

    Hi,
    when I edit an application in Design Studio, the instant preview in Design Studio works fine. There are all data from the data source available. So I guess the connection to the backend BW server and the query should be ok. See Screenshoot -application_Design Studio.PNG-
    When I execute the application locally, there is an error "no data available" (in german as shown in the screenshoot: "Keine Daten verfügbar").
    See Screenshoot -application_execute locally.PNG -
    Do you know why this happen? And how can I solve this problem so I have my data during executing locally?
    Best Regards
    Jasper

    When I force Prompts at Startup from the application I can see my data.
    Is there a way I can specify the Prompt automatically per event? I tried the two methods setFilter and setFilterExt from the data source as an "On Startup"- event. But this has no effect and there is still the hint "no data available".

  • Shell script executing Java program

    Hi
    I have the following shell script:
    #!/bin/sh
    export GENTOO_VM=sun-jdk-1.5
    exec java -cp . EchoEnv
    Does this shell script execute a .class file or a .java file? Does the java file have to be in the same folder as the script file?
    Thanks,
    Paul

    DrClap wrote:
    It executes a compiled Java class. The class must be in the current working directory.and must be in the default package.

  • Problem while executing procedure thru Shell script (EXECUTE IMMEDIATE)

    Hi All,
    I have created a procedure where i am passing column name, tablename and business date. The procedure gets last 5 business date excluding Saturday and sunday based on business date.
    i am using EXECUTE IMMEDIATE statement in the procedure, where i am replacing the column name, table name, and business date & then executing this statement.
    stmt := 'select count(1) FROM '||tblname||' where trunc('||date_column||')= :1';
    EXECUTE IMMEDIATE l_stmt into tbl_count using to_char(in_date, 'DD-MON-YYYY') ;
    It will give me the count of all 5 days for a particular dates. When i run the procedure in SQL*Plus/TOAD, it gives me desired result. When i run this in UNIX shell script, it runs fine but at end gives following error:
    SP-xxx: Bind varaible not declared.
    Can someone tell me where might be the problem?

    Hello, if you could put a {noformat}{noformat} before and after your snippets of code please, it makes it much easier to decipher.
    You have:EXECUTE IMMEDIATE l_stmt into tbl_count using to_char(in_date, 'DD-MON-YYYY') ;
    Where it should be:EXECUTE IMMEDIATE l_stmt into tbl_count using TRUNC(in_date) ;
    Additionally, you do not need the SQL script, you could simply have:sqlplus -S $ORA_UID/$ORA_PWD@$DSQuery <<EOF >>${TMP_DIR}/report.log 2>&1
    whenever sqlerror exit failure
    whenever oserror exit failure
    set serveroutput on;
    set pages 0;
    set feed off;
    exec return_date ('20090515','STIFAPACDTR','ASOFD','n');
    print;
    quit
    EOF
    if [[ $? -ne 0 ]]
    then
    echo "sqlplus did not run successfully,verify"
    echo "For errors please check ${TMP_DIR}/report.log file\n Exiting..."
    else
    echo "$0 script executed successfully"
    fi
    exit $?
    You don't need any of this:if /usr/xpg4/bin/grep -e 'ORA-' -e '^ERROR at' -e 'unknown command' ${TMP_DIR}/report.log
    then
    print "sqlplus did not run successfully,verify"
    print "For errors please check ${TMP_DIR}/report.log file\n Exiting..."
    exit 1
    fi
    if [http:// -s ${TMP_DIR}/report.log ]
    then
    print "`echo $0 script executed successfully"
    grep -v '^$'${TMP_DIR}/report.log > ${TMP_DIR}/report.csv
    else
    print "${TMP_DIR}/report.log file not generated, verify, \n exiting"
    exit 1
    fi
    outFLAG="n"
    done
    I'm not sure that that will fix your problem here, but can you try again with those changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Execute commonj.WorkManager work on remote member of application cluster

    Hi,
    We have configured a WorkManager for our web application which works with Spring & Quartz to execute jobs asynchronously. However, all jobs get picked up by the same machine and the other members of the cluster are not given any tasks to execute.
    The commonj documentation says that a Serializable Work returns a RemoteWorkItem which can execute jobs on a remote jvm. Weblogic docs, however, say that it doesn't support this interface and implements its own cluster load balancing.
    How do we configure the Workmanager such that work is distributed across remote jvms in a cluster.
    Thanks.
    Regards
    Kaizer

    Hi,
    Do you have TestStand 2.x or are you using a later version TS 3.5.
    TestStand 2.0 didn't handle remote execution, that wasn't available until TS3.0 or TS3.1.
    This example, shows how an executable can access the same execution of a TestStand sequencefile not a remote execution.
    If you have TestStand 3.x, then there should be some examples employing remote execution within theTestStand examples folders. or try this link http://zone.ni.com/devzone/conceptd.nsf/webmain/955A560B0B0052B88625698500563621
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • HT201269 When I plug my iPhone 5s into the computer to restore it from iTunes a pop-up comes up and says "this version of iTunes has not been correctly localized for this language. Please run the English version." I have no idea what that means or how to

    In need of help figuring this phone stuff out! I am trying to get all the apps from my husbands old phone to his new one. I have already backed up the old phone and got everything onto iTunes, but every time I plug the new iPhone 5s into my computer it says that the version of iTunes is not correctly localized for this language and asks for me to run the English version. I have no idea how to do that? Please help.

    Hi Celia51510,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    I can't tell from your post if you are using a Windows or a Mac Computer.
    Try deleting the iTunes application and redownloading the version you need below:
    iTunes 11.1 Download for Mac
    http://support.apple.com/kb/DL1614
    iTunes 11.1 for Windows (64-bit)
    http://support.apple.com/kb/DL1615
    Cheers,
    - Judy

Maybe you are looking for

  • How to record the records deleted in a table

    Hi Experts I want to run a report as a batch which should deleted the records which are sysdate - 60 and The report should log the number of records deleted from each table at End Of Run. Criteria for selecting records to be deleted are as follows: 1

  • Problem with java packages

    i have defined a package that contains numerous files. the package is com.assignment. now there are two files inside the package namely member and friends. when i try to call the member class in the friends class suppose member newmember; it gives me

  • Trace other session in 9.2.0.6

    Hi, I'm mostly using oradebug for setting 10046 trace event in other session . This works without problems , until I hit old 9.2.0.6 DB on WINDOWS 2000 . Every time I'm using that approach ORADEBUG SETOSPID &OSPID ; ORADEBUG EVENT 10046 TRACE NAME CO

  • Batch Rename Order Getting Mixed Up

    When batch renaming a large amount (usually over 100) of RAW NEF photos, in the format of YEAR_Month_DAY_TIME_#### (where #### is a 4 digit sequence number) EX/ 2014_10-25-122506_0001, the files get renamed and when sorted by file name are in order,

  • How to get songs from itunes to ipod shuffle

    I just seem to be having problems finding anything I download in itunes on my ipod shuffle. I am not techo savy at all!