Chnaging user name using command line
We have 2 DB users (db1 and db2).
in configuration tab, Services/JDBC/Connection Pools/bvdb on colsole, the user and password is listed.
Usually we change DB user from one to other from console. I want to write script for it.
I wanted to know the cammand with parameters to change the user and password.
When prgramming java, and surely when learning it, alway use the documentation. You ken find it @ http://java.sun.com/j2se/1.3/docs.html To do input and output with the console you need the java.lang.System (Doc are @ http://java.sun.com/j2se/1.3/docs/api/java/lang/System.html ). The system object has an open inputstream called in wich reads the standard input, normally what users type on the console. So System.in.read() will get you a char that is typed on the console.
In your case it might be easier to create a BufferedReader.
BufferedReader input = new BufferedReader(System.in); will create a buffered reader that reads from the console. The advantage is that you can now use input.readLine() to read a complete line (until return key is pressed).
Succes
AVee
Similar Messages
-
Getting user name (at command line argument)
At the beginning of my program I need to prompt for the user name and then follow this with a welcoming message. Please help as I have not yet learnt this in my studies!
When prgramming java, and surely when learning it, alway use the documentation. You ken find it @ http://java.sun.com/j2se/1.3/docs.html To do input and output with the console you need the java.lang.System (Doc are @ http://java.sun.com/j2se/1.3/docs/api/java/lang/System.html ). The system object has an open inputstream called in wich reads the standard input, normally what users type on the console. So System.in.read() will get you a char that is typed on the console.
In your case it might be easier to create a BufferedReader.
BufferedReader input = new BufferedReader(System.in); will create a buffered reader that reads from the console. The advantage is that you can now use input.readLine() to read a complete line (until return key is pressed).
Succes
AVee -
Read in file name + path using command line arguments
Hi guys,
I am trying to use command line arguments to read in the name of two files. The code below works as long as the files are on the class path.
public class cmdLineArguments {
public static void main(String[] args) {
String xmlFile1 = args[0];
String xmlFile2 = args[1];
System.out.println ("\nXmlFile1: " + args[0] + "\nXmlFile2: " + args[1]);
}I would like to be able to read files that are not on the class path as well by entering their full path along with their names.
In other words, It works if I type:
C:\Documents and Settings\user\workspace\CmdLineArgs\src>java cmdLineArgs file1.xml file2.xmlbut not if I type:
C:\Documents and Settings\user\workspace\CmdLineArgs\src>java cmdLineArgs c:\Documents and Settings\user\desktop\file1.xml c:\Documents and Settings\user\desktop\file2.xmlWould anyone please explain how I can edit the code to make it work? I guess I could take them both as a String, modify them manually (add a \ to it etc) but is there an easier way to do it? Even a reference to a tutorial, article etc about this would be very much appreciated.
Also, any idea why a code would compile and run fine in Eclipse but would create an error from command line?
Thanks a lot.You need to learn about cmd.exe which is used to process the command line. The arguments passed to any program is the command line split at white space so your command line arguments of
c:\Documents and Settings\user\desktop\file1.xml c:\Documents and Settings\user\desktop\file2.xmlis turned into an array of
"c:\Documents", "and", "Settings\user\desktop\file1.xml", "c:\Documents", "and", "Settings\user\desktop\file2.xml"In other words instead of 2 arguments you actually have 6.
To get round this the file names need to be quoted
java cmdLineArgs "c:\Documents and Settings\user\desktop\file1.xml" "c:\Documents and Settings\user\desktop\file2.xml" -
How to create user in workspace using command line with Internal APEX
Hi fellows,
I'm newbie with APEX and my i try doing something different. I need to build one application in Internal for create users in another workspaces. So, for do this, need use command line and PL/SQL code.
I know exists a CREATE_USER procedure. But, this procedure just create a user in Internal, not in workspace, like i want.
Its possible? Someone can help me?
Example of create_user procedure:
BEGIN
APEX_UTIL.CREATE_USER(
p_user_name => 'NEWUSER2',
p_first_name => 'FRANK',
p_last_name => 'SMITH',
p_description => 'Description...',
p_email_address => '[email protected]',
p_web_password => 'password',
p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
p_default_schema => 'MY_SCHEMA',
p_allow_access_to_schemas => 'MY_SCHEMA2',
p_change_password_on_first_use => 'N',
p_attribute_01 => '123 456 7890');
END;
Thank you.Did you try it like this?
DECLARE
l_workspace_id number;
BEGIN
l_workspace_id := apex_util.find_security_group_id (p_workspace => 'MY_WORKSPACE_NAME');
apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
APEX_UTIL.CREATE_USER(
p_user_name => 'NEWUSER2',
p_first_name => 'FRANK',
p_last_name => 'SMITH',
p_description => 'Description...',
p_email_address => '[email protected]',
p_web_password => 'password',
p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
p_default_schema => 'MY_SCHEMA',
p_allow_access_to_schemas => 'MY_SCHEMA2',
p_change_password_on_first_use => 'N',
p_attribute_01 => '123 456 7890');
END; -
Error while creating pool using command line
I am trying to create connection pool using command line as :
%JAVA_HOME%\bin\java weblogic.Admin -url %serUrl% -username %serUser% -password %serPwd% CREATE_POOL "XXXXXXXX" url=%DB2Url%,driver=com.ibm.db2.jcc.DB2Driver,testConnsOnReserve=true,testTableName=SYSTABLES,initialCapacity=2,maxCapacity=50,capacityIncrement=2,allowShrinking=true,props=user=%DB2Usr%;password=%DB2Pwd%
This was working fine in 8.1 ,but when i am using same in 9.2 it gives following error in console:
======================================================
<Feb 2, 2007 9:58:11 AM IST> <Error> <Deployer> <BEA-149265> <Failure occured in
the execution of deployment request with ID '1170390490712' for task 'weblogic.
deploy.configChangeTask.0'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
leListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
oymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
loymentCallbackFlow.java:56)
Truncated. see log file for complete stacktrace
weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class:
com.ibm.db2.jcc.DB2Driver
at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:2
92)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(Connect
ionEnvFactory.java:77)
=====================================================
when i am again trying to start server , its unable to start.
Anybody have idea why this exception is coming.Hi ,
Please check the FSV (field status variant) for your company code in OBY6 .
then go to transaction code OB14 --> enter the FSV --> Check if field status group G006(Material account) is maintained there or not.
if not please maintain it.
Thanks & Regards
Anshu -
Hello experts,
As mentioned in http://support.adobe.com/devsup/devsup.nsf/docs/52080.htm we can use command line instruction to open a pdf file in Acrobat Reader and print it.
Does anyone know if this works both in Windows and in UNIX?
Thank you.
Gie Kian SiauwHi Gie,
On Unix, you can use commandline instruction to create ps files from the pdf files.
for eg. "acroread -toPostScript -pairs a.pdf a.ps"
You can also pipe the ps output to a printer.
for eg: "acroread -toPostScript -pairs a.pdf - | lp -d <Printer Name>
This is a headless process of printing pdf files without the launching of acroread.
The file is not opened in the acroread and just printed.
Regards,
Rishi -
How to use command line with acrobat to extract page(s) from pdf file?
I have adobe acrobat, and have a pdf file with over 500 pages. I need to extract small chunks of pages from it as seperate pdf files. I was hoping I could use command line interface to do this faster.
Something like:
acrobat src des start end
so for example
adobe file.pdf my_folder 3 5
Is this possible? There are many chunks and I don't want to manually do it for every chunk. Command line would be much easier...
ThanksI can't find any programs... sorry.
Can you create one for me please.
It should at least have these 5 arguments: (well the first one is not neccessary since were not using acrobat anymore...)
[program] [src path/src file] [destination path/file name] [start page (inclusive)] [end page (inclusive)]
for example:
acrobat ./my_file.pdf ./my_folder/chunk1.pdf 3 5
if start page == end page, then it only extracts that one page.
So this way I can just stack these comands on a .bat file or something (maybe like 100 commands), then run the bat file, and it will create all the files.
Thanks for doing this, it is appreciated. -
Go Online on specific network using command line
i have a remote troubleshooting software that i wrote myself i have added to it the list of all my clients which can have one of the below:public ipsteamviewer accountslogmein hamachiof course, i'm a paid hamachi client, and i have the latest hamachi version installed whenever i want to troubleshoot any client, i just right click on their name, and select remote desktop.. and the my software will automatically connect to the client using the required authentication/application. when the client has hamachi,his network has to be online, for me to be able to access his ip. so what i'm currently doing is: open hamachi, scroll to my client's network, right click, go online, and then back to my software and troubleshoot! (this is a bit time consuming compared to the other solutions) is there any way, i can go online on a specific network in my local hamachi installation? it would be really a great feature, if we can use a command line script, or use command line arguments to launch special events (locally)example:hamachi.exe /online:mynetworkidhamachi.exe /offline:mynetworkid i appreciate any feedback on this, regards,Dan
Yes, It would be very interesting to have such a feature.E.g., I need to programmatically request Hamachi to GoOnline, because it often goes offline in some circumstances (after computer wakes from sleep mode for example).
-
Can I convert Word 2003 to PDF using Command Line
Hello All,
We have a document generation tool which generates documents in Word 2003 format. The document generation is initiated by the user and the process of generating document is on a remote server. The word file is sent back to the user in word format.
We would like to convert this doc file to PDF/A format. And we would like to do it programatically, may be using command line arguments. Is it possible?
Realistically, it is not possible that all the users will have Adobe writer installed in their desktops. In this case, it is possible that Adobe writer is installed in a server and the documents can be converted remotely using command lines?
Your support on this will be very helpful for us.
Thanks & Regards
Irfan> Can I use Acrobat Pro to convert a Word 2003 doc to PDF using the Windows command line?
No. -
Hello,
I need your advise, please. My customer requires to print a specfic page from a pdf document they receive, using command line or 3rd party solution.
Anything you can advise, please? I have seen AcroRD32.exe options, but can only print the whole document.
Kind RegardsNot sure if there are any examples. The Acrobat SDK is a must, but it is best treated as documentation to study rather than examples to copy. The examples only illustrate a tiny fraction of the capabiliies.
(One other note: the solution must involve the client owning Acrobat; Acrobat is not for server use). -
Hi,
Requirement: Get Windows User Name using Oracle Web Forms 6i.
Tools Using: Windows NT, Oracle web forms 6i, Oracle 10g DB.
Description: I am using GetClientInfo JBean from otn.oracle.com, which gets windows user name, IP address and machine name. The demo I got from oracle web site uses Jinitiator version 1.1.7.18. While we are using the latest version Jinitiator 1.3.1.17. Due to this reason, I am unable to use Javakey which comes with older version but doesn't come with newer version, that's why I can't create the new JavaBean Java identity (PJC).
Please advise what to do. All environment variables are set everything is done, this is the only thing bothering me.
I went through the article 202768.1 from metalink, but on step 5, it gives an error keytool error: java.lang.Exception: Input not an X.509 Certificate.
Also, please let me know if there is any other workaround for this requirement.
Thanks & Best Regards,
MoHi,
Thanks for your kind reply. Actually there was a problem in creating a certificate, now it is okay with the same method. Certificate got imported on client and everything is ready.
Now, the problem is when I try to set Bean Area Implementation Class property with oracle.forms.demos.GetClientInfo, it gives an error FRM-13008 Cannot find JavaBean with name 'oracle.forms.demos.GetClientInfo'.
I went through the articles 1072329.6, 196824.1, and set ClassPath and Path variables with proper values. Also, I have copied jar file and signature file in forms60/java folder. I don't see any problems. Please let me know what I am doing wrong. My limitation is that I have to do all this in forms6i.
I searched forums on metalink and found out that someone installed Patch 15, and everything went okay for him. Do you think I should install Patch 15? if YES, how will I do it, I mean should I first uninstall my forms and then install patch15 or install the patch on my forms?
Thanks so much for your help.
Thanks & Best Regards,
Mo -
How to open url in acrobat reader using command line
Hi,
I need to open file from url using command line, but I'm still getting some error (wrong filename).
I've tried for example this command:
AcroRd32.exe http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf
Can anyone help me and tell me what's wrong?You can't use a URL as parameter for AcroRd32.exe.
-
How to duplicate a target and add resources in xcode using command line?
I am trying to use command line tools to create, add resources, build, archive and export to ipa in xcode. I could do the Build, Archive and Exporting to IPA through the command line tools(xcodebuild). But I also wanted to duplicate the target in the same project,add a new Info.plist to the duplicated target resource through command line itself. How to do it? I could not find any valuable answers by Googling. I could not find any proper documentation also in Apple Sites.
Is there any tools that can be used to perform these? I don't want to use the UI. Please, help me out.The Mac App Store is not appropriate for command line tools. You can use any language you want.
-
Split PDF by pages using command line options
Hi,
I am after a product to split a PDF file by pages / bookmark using command line options. It would be good, if the product comes with functionality to call from VB/.NET SDK.
I googled and came across many products, out of these following looks good. Has anyone used this. Please suggest me.
www.neeviapdf.com
www.coherentpdf.com
Thanks
SaravYou are posting in the wrong forum. This forum is for Acrobat Scripting.
-
How can I create a NetBoot image using command line tools?
Is it possible to create a NetBoot image entirely using command line tools?
(That is, without using the SystemImageUtility)
If so, are there reasonable instructions posted somewhere?
I don't believe I can use SystemImageUtility with my current setup,
but I would be happy to hear how I could:
I have a set of Xserve clusternodes but without optical drives or video cards.
One node acts as the head, running DHCP, DNS, OpenDirectory, Xgrid.
They are wired to a gigabit switch.
I have a PowerBook connected on the subnet which has ServerAdmin Tools installed.
I don't think when I run SystemImageUtility on my PowerBook that I can successfully image one of the clusternodes disks over the network.
I have tried to start one node in target(Firewire) mode, connect it via Firewire
to the head node, and run hdiutil from the head node to make a complete disk image of the clusternode's drive.
But a NetBoot image requires the whole nbi file, right?
Could I then use copy this disk image to my PowerBook and use SystemImageUtility on my PowerBook to create a NetBoot image from it?
I really have tried to read the PDFs, but I found the section on System Imaging in the Command Line Reference rather unhelpful.
Thanks for anyones help.
dmaus
Mac OS X (10.4.4)To create a NetBoot image, you could just put the cluster node in target mode and attach it to your PowerBook. Then use SIU to create the NetBoot image.
If you're trying to create a backup image of the disk, use hdiutil, or put in in target mode and create the image with Disk Utility.
Maybe you are looking for
-
Trying to connect my iPad Air 1 to my iPhone 5S set as a hotspot via WiFi method. iPad sees the iPhone as wifi hotspot, but an error appears 'Remote Hotspot Failure .. Unable to start personal hotspot'. How do I fix this issue??
-
All My Mail Gone! PLEASE HELP.
I am on OS 10.3.9. First I obtained the v 2.4 Mail Application and replaced my v. 1.7. in the Applications folder. Then I went to launch the Mail Application and it does not launch. I suspect that Mail Version 2...and above require OSX 10.4. I tried
-
Open password-protected XLSX files in Numbers '09
Hi @ all, I've just started using Numbers a few days ago. I want to open password-protected xlsx-files. Numbers refuses opening it. Why? Chears Stefan
-
SQL Developer 1.5.3: SIZE honored in SET SERVEROUTPUT ON SIZE nbr ?
I'm running some PL/SQL in SQL Developer 1.5.3 and am getting some buffer overflow error messages while using dbms_output.put_line. At the top of my script, I've put: set serveroutput on size 100000 But get these errors: ORA-20000: ORU-10027: buffer
-
T.Code for cash book register in sap FICO.
Hi Can anyone give the transactions code for taking the cash book register in sap FICO. Thanks in advance for all help...