Simultanuo​us start in cloned vi's
Hi
I have following situation:
A master vi (that makes some visualisationand other stuff) and several cloned subvi's (set to reentrant) where calculations are done. Those subvi's are started withe "vi reference".
I need to start a process in those clones simultanuously. I'd say that this function should be implemented in the master vi. I have already tried to do it with semaphores and notifier but did not get a working result.
Also it necessary that I know when the calculations are done in the clones.
Any idea and suggestion?
Thanks alot
Yves
Yves,
honestly, i do not understand your code. At least not by reading it in a reasonable amount of time. So please care about your code design and please think about possible architectures before implementing anything....
Attached you can find an example on how it could work for your needs.
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Attachments:
Master_2009f2.vi 16 KB
Slave_2009f2.vi 11 KB
Similar Messages
-
Can't start a cloned connection while in manual transaction mode
Hi every body
I'm trying to set my connection autoCommit to false and begin a manual transaction in my application .I use sql server 2000 as my dbms and I set the connection selectMethod to "cursor" ,but when I run my application I see this error
Can't start a cloned connection while in manual transaction mode
what's wrong??Very hard to say using the code posted. However, a few things immediately jump out at me:
Call setAutoCommit() immediately after getting the Connection. I have never tried calling that method in the middle of a transaction, and I imagine the results are not good.
Where are your Statements? You should use PreparedStatement whenever possible. At worst, use a Statement. I don't even see that.
Either commit and rollback yourself, or let auto-commit do it. IMO, whenever you write SQL, you should be coginzant of when a commit or rollback should occur. Therefore, I never use auto-commit.- Saish -
Concurrent Manager not starting after cloning
Hi,
I am not able to start concurrent manager after cloning the CM tier. I am gettiing below error in the manager log file,
Could not initialize the Service Manager FNDSM_<Node name>_<Env>. Verify that <Node Name> has been registered for concurrent processing.
Routine AFPEIM encountered an error while starting concurrent manager RCVOLTM with library /u01/app/hl.../...appl/po/11.5.0/bin/RCVOLTM.
What might be cause of the error?
Thanks,
PrasadHi Prasad,
Using normal hostsnames or virtual hostsnames? Also did you experience issues during the dbTier clone (check all log files created even if the cloning did not error out)
Possible the hostsnames in FND_NODES are not cleared properly during the DB clone
Running the following might give a better result:
1 - SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT;
2 - Run AutoConfig on all tiers, firstly on the DB tier and then the APPS tiers,
3 - check if the concurrent managers are starting.
Regards,
Ronald -
2 login items started after cloning my HD, cannot be turned off
Ok so i copied my HD off onto an external disk, it booted fine, erased the internal drive and copied back (my machine was uber slow and the files had gotten so fragmented it was hindering normal usage and by coping off and back on the files get written together and are not fragmented. it did speed my machine up a lot so that part worked). after that both of the drives would boot and have preview and adobe fireworks open. preview would have a small swatch sample from an iWeb template in it and fireworks just opened. then i tried to erase my user folder and reload it from my TM back up (i didnt use my TM back up because a-i dont have my leo disk on me and b-it took my brother over 12 hours last week to restore from TM so i was skeptical of it)
neither are in log in items under account, i looked in all 3 of the libraries in the preference panes folders, launch agents, launch services, login items. tried looking at the launch processes via terminal and found nothing relating to it. i tried changing the names of the programs and moving them out of my apps folder. tried installing the 10.5.5 combo installer over my current 10.5.5, also ran applejack on the deep auto mode
and i also was able to confuse a tech (not hard) and an expert tech (now i feel accomplished)
i was told "o well then just do an archive and install and dont save the user preferences/folders" then what is the freaking point. they also told me to delete all my log in items that are in my sys prefs but its a system wide issue (made a new user and it happened) and also half of the helpers i have no way of knowing where the heck to look to bring them back in so i just skipped that because im pretty sure it wont do anything.
only thing i havent tried yet has been an SMC reset and pram reset but i doubt that will do anything but im going to give it a whirl for S's and G's
any ideas? its not hindering usability at all its just annoying and shouldnt be happening
-mattHi Terri 4514,
If you are having a "free space" alert when you try to sync, you may find the following article helpful:
iOS: "Not enough free space" alert when trying to sync
http://support.apple.com/kb/ts1503
Regards,
- Brenden -
Cannot Start Cloned SAP Instance
Hi,
We cloned a SAP Instance on VM from a production system. However, I am not able to start the cloned system.
It's giving the error:
Starting Database Instance...
Error! Connection failed to node sapgrfpd for database GMP:
database not found
Opening Database...
We've checked thru the mount points to ensure that all the access rights are granted correctly. I am able to start the x_server.[root@sapprod bin]# ./sdbverify
Server Utilities 7.6.00.35 64 bit in /sapdb/programs
check files... failed
mode of /sapdb/programs/bin/x_server was modified
mode of /sapdb/programs/pgm/starter/sdbstarter was modified
owner of /sapdb/programs/pgm/starter/sdbstarter was modified
check dependencies... ok
package data is inconsistent
DB Analyzer 7.6.00.35 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
PCR 7300 7.3.00.55 in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
PCR 7301 7.3.01.18 in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
PCR 7500 7.5.00.24 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
check rte registration of package... ok
package data is consistent
SAP Utilities 7.6.00.35 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
Base 7.6.00.35 64 bit in /sapdb/programs
check files... failed
mode of /sapdb/programs/bin/starter/sdbstarter was modified
owner of /sapdb/programs/bin/starter/sdbstarter was modified
mode of /sapdb/programs/bin/getdbroot was modified
check dependencies... ok
check rte registration of package... ok
package data is inconsistent
Redist Python 7.6.00.35 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
JDBC 7.6.00.30 in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
Messages MSG 0.3951 in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
ODBC 7.6.00.35 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
Database Kernel 7.6.00.35 64 bit in /sapdb/PRO/db
check files... failed
mode of /sapdb/PRO/db/pgm/dbmsrv was modified
mode of /sapdb/PRO/db/pgm/starter/sdbstarter was modified
owner of /sapdb/PRO/db/pgm/starter/sdbstarter was modified
mode of /sapdb/PRO/db/pgm/dbmverifypw was modified
owner of /sapdb/PRO/db/pgm/dbmverifypw was modified
check dependencies... ok
check rte registration of package... ok
package data is inconsistent
Loader 7.6.00.35 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
SQLDBC 7.6.00.35 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
SQLDBC 76 7.6.00.35 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
Fastload API 7.6.00.35 64 bit in /sapdb/programs
check files... ok
check dependencies... ok
package data is consistent
VERIFICATION SUMMARY:
INVALID PACKAGES: 0
VALID PACKAGES: 16
INCONSISTENT PACKAGES: 3
TOTAL FILES: 330
MISSED FILES: 0
MODIFIED FILES: 0
FILES WITH MODIFIED PERMISSIONS: 7
when I check the program in error ( like /sapdb/programs/bin/starter/sdbstarter ) seems like orphaned links when I ls -al them in my source system and normal files in my destination system.
[root@sapprod bin]# mount | grep /sapdb
/dev/sdc7 on /sapdb type ext3 (rw)
[root@sapprod bin]# id sdb
uid=1008(sdb) gid=503(sdba) groupes=503(sdba)
[root@sapprod bin]# id proadm
uid=1012(proadm) gid=125(sapsys) groupes=125(sapsys),501(sapinst),503(sdba)
[root@sapprod bin]# ls -l /sapdb/programs/pgm/starter
total 796
-r-xx- 1 sdb sdba 803251 nov 6 2006 sdbstarter
[root@sapprod bin]# ls -l /sapdb/programs/pgm
total 15620
-r-xr-xr-x 1 sdb sdba 5320170 nov 7 2006 lserver
-r-xr-xr-x 1 sdb sdba 901356 nov 6 2006 maketi
-r-x------ 1 sdb sdba 856749 nov 6 2006 niserver
-r-x------ 1 sdb sdba 856845 nov 6 2006 nisslserver
-r-xr-xr-x 1 sdb sdba 5522110 nov 6 2006 python
-r-xr-xr-x 1 sdb sdba 752254 nov 7 2006 regupd
-r-xr-xr-x 1 sdb sdba 732502 nov 6 2006 sqlping
dr-x------ 2 sdb sdba 4096 avr 9 2008 starter
-r-x------ 1 sdb sdba 944481 nov 6 2006 vserver
[root@sapprod bin]# ls -l /sapdb/programs/bin
total 44972
-r-xr-xr-x 1 sdb sdba 2226673 nov 7 2006 dbanalyzer
-r-xr-xr-x 1 sdb sdba 4373797 nov 7 2006 dbmcli
-r-xr-xr-x 1 sdb sdba 1871802 nov 7 2006 dbmevtdisp
-r-xr-xr-x 1 sdb sdba 924291 nov 7 2006 dbmgetf
-r-xr-xr-x 1 sdb sdba 6546066 nov 7 2006 dbmrfc
-r-xxx 1 sdb sdba 803328 nov 6 2006 getdbroot
-r-xr-xr-x 1 sdb sdba 5448002 nov 7 2006 loadercli
-r-xr-xr-x 1 sdb sdba 878958 nov 7 2006 protconv
-r-xr-xr-x 1 sdb sdba 75135 nov 6 2006 sdbconfig
-r-xr-xr-x 1 sdb sdba 25750 nov 7 2006 sdbinfo
-r-xr-xr-x 1 sdb sdba 14128 nov 7 2006 SDBINST
-r-xr-xr-x 1 sdb sdba 14128 nov 7 2006 sdbpack
-r-xr-xr-x 1 sdb sdba 14096 nov 7 2006 sdbreg
-r-xr-xr-x 1 sdb sdba 13872 nov 7 2006 sdbregview
-r-xr-xr-x 1 sdb sdba 16520 nov 7 2006 SDBSETUP
-r-xr-xr-x 1 sdb sdba 13872 nov 7 2006 sdbuninst
-r-xr-xr-x 1 sdb sdba 13872 nov 7 2006 sdbverify
-r-xr-xr-x 1 sdb sdba 2621305 nov 7 2006 sqlcli
-r-xr-xr-x 1 sdb sdba 2551118 nov 7 2006 sqldbc_cons
-r-xr-xr-x 1 sdb sdba 23575 nov 6 2006 sqlver
-r-xr-xr-x 1 sdb sdba 23530 nov 6 2006 sqlwhat
dr-x------ 2 sdb sdba 4096 avr 9 2008 starter
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 sysmon
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_analys
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 xbackup
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_cons
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 xinstinfo
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_maketi
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_ping
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 xpu
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_python
-r-xr-x--x 1 sdb sdba 966431 nov 7 2006 x_server
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_start
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_stop
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 xsysrc
-r-xr-xr-x 1 sdb sdba 767938 nov 6 2006 xuser
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_wiz
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_wizard
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_wizstop
-r-xr-xr-x 1 sdb sdba 966431 nov 7 2006 x_wiztrc
[root@sapprod bin]# ls -l /sapdb/programs/bin/starter
total 796
-r-xx- 1 sdb sdba 803251 nov 6 2006 sdbstarter
Thank you.
Olivier. -
Greeting to Everyone
I am running two virtual machines.
I am going to do cold cloning from one server to another server in same host.
vmware machine 01 : testdb (10.2.0.4.0)
vmware machine 02 : no db is running (10.2.0.1.0) - Just i installed s/w only.
Before cloning , i am applying patch on 10.2.0.1.0 binary without database (only with $ORACLE_HOME) . then i i'll start cold cloning.
>>>> Here problem ----> Without database and SID in vmware machine 02 , how can i stop dbconsole ?
$ emctl stop dbconsole
TZ set to Asia/Calcutta
OC4J Configuration issue. /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_oel5.testserver_TSH1 not found.
Thanks in advance.Hi Daid
I am asking my friends .. how can i share here .. just wait.
As i said i have created database using dbca and i did not execute catupgrd.sql script.
After db creation i have executed following command.
$ opatch lsinventory
Invoking OPatch 10.2.0.4.2
Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2013-10-22_18-17-38PM.log
Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2013-10-22_18-17-38PM.txt
Installed Top-level Products (2):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
There are 2 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
OPatch succeeded.
------------------------------------------ COLD CLONING -----------------------------------
[oracle@oel5 ~]$ export ORACLE_SID=clonedb
[oracle@oel5 ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 22 18:28:12 2013
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup nomount pfile='/u01/app/oracle/admin/clonedb/pfile/initclone.ora' ;
ORACLE instance started.
Total System Global Area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 188744520 bytes
Database Buffers 415236096 bytes
Redo Buffers 2924544 bytes
SQL> @ctrl.sql;
ORA-01081: cannot start already-running ORACLE - shut it down first
Control file created.
SQL> alter database open resetlogs;
alter database open resetlogs
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/clonedb/system01.dbf'
Thanks .. -
Database listener not starting
hi all,
Database listener is not starting at cloned instance. strange thing is that when listener name is 'PROD' I can not start listener , and when I set listener name to any other name then there is no problem i can start it normally.
Please find details below.
OS : Linux
DB release: 9r2
$ ./addlnctl.sh start PROD
You are running addlnctl.sh version 115.7
Logfile: /oradata/oradb/proddb/9.2.0/appsutil/log/PROD_proddb/addlnctl.txt
Starting listener process PROD ...
addlnctl.sh: exiting with status 1
while viewing logfile (/oradata/oradb/proddb/9.2.0/appsutil/log/PRODproddb/addlnctl.txt)_*
LSNRCTL for Linux: Version 9.2.0.6.0 - Production on 28-JAN-2010 09:37:02
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCPROD))
The command completed successfully
LSNRCTL for Linux: Version 9.2.0.6.0 - Production on 28-JAN-2010 09:37:17
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCPROD))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=clondb.testdomain.com)(Port=1531))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
LSNRCTL for Linux: Version 9.2.0.6.0 - Production on 28-JAN-2010 09:37:17
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Starting /oradata/oradb/proddb/9.2.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.6.0 - Production
.logd280: error creating log stream /oradata/oradb/proddb/9.2.0/network/admin
NL-00278: cannot open log file
SNL-00016: snlfohd: error opening file
Linux Error: 2: No such file or directory
Listener failed to start. See the error message(s) above...
Permission for files is as folow*
$ pwd
/oradata/oradb/proddb/9.2.0/network/admin/PROD_proddb
$ ls -l
total 36
-rwxr--r-- 1 oradb oinstall 1213 Sep 6 10:11 listener_ifile_old.ora
-rw-r--r-- 1 oradb oinstall 1204 Jan 27 11:43 listener_ifile.ora
-rwxr--r-- 1 oradb oinstall 1335 Jan 27 11:25 listener_old.ora
-rw-r--r-- 1 oradb oinstall 1197 Jan 28 09:37 listener.ora
-rwxr--r-- 1 oradb oinstall 324 Jan 23 09:13 PROD_proddb_ifile.ora
-rw-r--r-- 1 oradb oinstall 2 Feb 21 2008 sqlnet_ifile.ora
-rwxr--r-- 1 oradb oinstall 631 Sep 6 10:25 sqlnet.ora
-rwxr--r-- 1 oradb oinstall 2530 Jan 27 11:25 tnsnames_old.ora
-rwxr--r-- 1 oradb oinstall 2530 Sep 6 09:04 tnsnames.ora
and permission for log files*
$ pwd
/oradata/oradb/proddb/9.2.0/network/log
$ ls -l
total 100
-rw-r--r-- 1 oradb oradb 0 Jan 27 13:32 listener.log
-rw-r--r-- 1 oradb oinstall 2170 Feb 21 2008 listener_old.log
-rw-r--r-- 1 oradb oinstall 5020 Jan 28 09:37 proddg.log
-rw-rw-r-- 1 oradb oradb 352 Jan 28 09:37 prod.log
-rw-r--r-- 1 oradb oinstall 3168 Jan 27 12:01 prod_old.log
-rw-r--r-- 1 oradb oinstall 74089 Sep 4 11:01 sqlnet.log
regardsuser4041390 wrote:
hi all,
Database listener is not starting at cloned instance. strange thing is that when listener name is 'PROD' I can not start listener , and when I set listener name to any other name then there is no problem i can start it normally.
<snip>Why not make life easier on yourself and just let the listener go with the default name of 'listener'? -
VCenter Cloning Operation Never Completes
I have VDI 3.1.1 installed and configured with a Provider to vCenter. I had no problems configuring this Provider. I have created a RedHat Pool and found/selected the RedHat template that had been created by the Linux support team. When I enable cloning, vCenter begins the clone process, completes the operation, and I'm able to login to the clone. However, VDI never realizes that the clone operation has completed and eventually times out. Once VDI times out, it issues a delete command for the clones that it attempted to create. vCenter deletes them, VDI reissues the clone request, and vCenter starts the cloning again. The viscous cycle continues...
What is the mechanism that VDI uses to determine that the vCenter cloning has completed?
Can this be a configuration issue with vCenter or VDI?
TIA,
Hal RaffenspergerRichK may have found the reason for this, see his post in TPF.
Andy ______________________________________
Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
Deutsche Community Comunidad en Español English Community Русскоязычное Сообщество
PepperonI blog -
I want to do a clean install of maverick on my 2010 mbp. I need to know what disk to use and also how i take certain files off my external hard drive and put on my computer. When I was having problems with my airport they did a clean install and they pulled files of my time machine. however they forgot to put the partition back in for a windows side. Originally I had Parellels on my computer. After my external hard drive got corrupted i called apple and they fixed the problem but didn't have me set up the time machine except for the external hard drive. Now my only back up is from the external not from the laptop. I am not sure how to do any of this. I am not computer savvy...PLEASE I NEED HELP>
First, you need to make a backup of your MBP onto your external drive. I suggest you start by cloning your MBP drive to the external drive:
Clone Mavericks, Lion/Mountain Lion using Restore Option of Disk Utility
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
1. Select Disk Utility from the main menu then press the Continue
button.
2. Select the destination volume from the left side list.
3. Click on the Restore tab in the DU main window.
4. Select the destination volume from the left side list and drag it
to the Destination entry field.
5. Select the source volume from the left side list and drag it to
the Source entry field.
6. Double-check you got it right, then click on the Restore button.
Destination means the external backup drive. Source means the internal startup drive.
This clone is fully bootable and also contains a clone of your Recovery HD.
Second, you need to do a clean install of OS X onto your MBP as follows:
Install or Reinstall Mavericks or Mountain Lion from Scratch
Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
OS X Mavericks- Erase and reinstall OS X
OS X Mountain Lion- Erase and reinstall OS X
OS X Lion- Erase and reinstall Mac OS X
Note: You will need an active Internet connection. I suggest using Ethernet if possible
because it is three times faster than wireless.
This should accomplish your goals. You will have a clean install of OS X on your MBP and a bootable clone of your old system and all your files on the external drive. -
Error while Importing SQL Table's Metadata
Hi
I am creating an External defination of category "dbtab". when i try to import the table in 3rd step i get this error.
"Error occurred while attempting to connect to database".
I checked the JDBC channel, in the channel getting this error "Error processing request in sax parser: Error when executing statement for table/stored proc. 'metadataRequest' (structure 'statement'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode."
Please helpHi,
Check this discussion.
Re: JDBC Channel : Connection reset
Also try setting AutoCommit = true (Check box in the JDBC adapter)
Regards,
Ravi Kanth Talagana
Edited by: Ravi Kanth Talagana on Oct 27, 2009 11:07 AM -
RC-00118: Error occurred during creation of database Raised by oracle.apps.
Hi Experts,
Please note i am doing the clonning from production to test server.
Production Server -
1. Run the adpreclone.pl on the apps & db tier.
2. run the autoconfig on the apps and db tier.
3. shut down the production instance.
4. Moved the files and started the clonning process on the db tier i am getting the below issue.
My current E-Business Suit Version is R12.0.4 Database Version is 10.2.0.3. Operating system is SUN SPARC 64 BIT SUN SOLARIS 10.
Executing CreateDB...
ADX Database Utility
getConnectionUsingAppsJDBCConnector() -->
APPS_JDBC_URL='null'
Trying to get connection using SID based connect descriptor
getConnection() -->
sDbHost : proddb
sDbDomain : clientdomain
sDbPort : 1530
sDbSid : TEST
sDbUser : APPS
Trying to connect using SID...
getConnectionUsingSID() -->
JDBC URL: jdbc:oracle:thin:@proddb.clientdomain:1530:TEST
Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
Trying to connect using SID as ServiceName
getConnectionUsingServiceName() -->
JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=proddb.clientdomain)(PORT=1530))(CONNECT_DATA=(SERVICE_NAME=TEST)))
Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
Trying to connect using SID as ServiceName.DomainName
getConnectionUsingServiceName() -->
JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=proddb.clientdomain)(PORT=1530))(CONNECT_DATA=(SERVICE_NAME=TEST.clientdomain)))
Exception occurred: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=proddb.clientdomain)(PORT=1530))(CONNECT_DATA=(SERVICE_NAME=TEST.clientdomain)))
Connection could not be obtained; returning null
-------------------ADX Database Utility Finished---------------
adcrdb.sh started at Wed Mar 21 18:09:54 WAT 2012
The environment settings are as follows ...
ORACLE_HOME : /erptestdata2/u01/d01/tech_st/10.2.0
ORACLE_SID : TEST
TWO_TASK :
PATH : /erptestdata2/u01/d01/tech_st/10.2.0/perl/bin:/erptestdata2/u01/d01/tech_st/10.2.0/bin:/usr/ccs/bin:/usr/sbin:/erptestdata2/u01/d01/tech_st/10.2.0/appsutil/jre/bin:/erptestdata2/u01/d01/tech_st/10.2.0/appsutil/clone/bin/../jre/bin:/erptestdata2/u01/d01/tech_st/10.2.0/appsutil/clone/bin/../jre/bin:/usr/sbin:/usr/bin:/opt/EMCpower/bin:/etc/emc/bin:/etc:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/SUNW,SPARC-Enterprise/sbin:/opt/sun/bin:/opt/SUNWexplo/bin:/opt/SUNWsneep/bin
LD_LIBRARY_PATH : /erptestdata2/u01/d01/tech_st/10.2.0/lib:/usr/dt/lib:/usr/openwin/lib:/erptestdata2/u01/d01/tech_st/10.2.0/ctx/lib:/erptestdata2/u01/d01/tech_st/10.2.0/lib32
Executable : /erptestdata2/u01/d01/tech_st/10.2.0/bin/sqlplus
The log information will be written to
/erptestdata2/u01/d01/tech_st/10.2.0/appsutil/log/TEST_proddb/adcrdb_TEST.txt
Creating the control file for TEST_proddb database ...
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Mar 21 18:09:54 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.
ORACLE instance shut down.
Connected to an idle instance.
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 2035496 bytes
Variable Size 432017624 bytes
Database Buffers 624951296 bytes
Redo Buffers 14737408 bytes
CREATE CONTROLFILE REUSE SET DATABASE "TEST"
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01167: two files are the same file/group number or the same file
ORA-01110: data file 31: '/erptestdata2/u01/d01/apps_st/data/olap.dbf'
ORA-01110: data file 31: '/erptestdata2/u01/d01/apps_st/data/odm.dbf'
alter database open resetlogs
ERROR at line 1:
ORA-01507: database not mounted
alter tablespace TEMP1 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp01.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
alter tablespace TEMP1 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp02.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
alter tablespace TEMP2 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp03.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
alter tablespace TEMP2 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp04.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
alter tablespace TEMP1 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp10a5.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
ALTER DATABASE RENAME GLOBAL_NAME TO "TEST.clientdomain"
ERROR at line 1:
ORA-01109: database not open
ORA-01507: database not mounted
ORACLE instance shut down.
Connected to an idle instance.
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 2035496 bytes
Variable Size 432017624 bytes
Database Buffers 624951296 bytes
Redo Buffers 14737408 bytes
ORA-00205: error in identifying control file, check alert log for more info
BEGIN dbms_backup_restore.zeroDbid(0); END;
ERROR at line 1:
ORA-00210: cannot open the specified control file
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 4168
ORA-06512: at line 1
ORACLE instance shut down.
Connected to an idle instance.
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 2035496 bytes
Variable Size 432017624 bytes
Database Buffers 624951296 bytes
Redo Buffers 14737408 bytes
CREATE CONTROLFILE REUSE SET DATABASE "TEST"
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01167: two files are the same file/group number or the same file
ORA-01110: data file 31: '/erptestdata2/u01/d01/apps_st/data/olap.dbf'
ORA-01110: data file 31: '/erptestdata2/u01/d01/apps_st/data/odm.dbf'
alter database open resetlogs
ERROR at line 1:
ORA-01507: database not mounted
alter tablespace TEMP1 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp01.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
alter tablespace TEMP1 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp02.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
alter tablespace TEMP2 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp03.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
alter tablespace TEMP2 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp04.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
alter tablespace TEMP1 add tempfile '/erptestdata2/u01/d01/apps_st/data/temp10a5.dbf' REUSE
ERROR at line 1:
ORA-01109: database not open
ALTER DATABASE RENAME GLOBAL_NAME TO "TEST.clientdomain"
ERROR at line 1:
ORA-01109: database not open
Error Running create/replace library with adupdlib.sql
ORA-01109: database not open
PL/SQL procedure successfully completed.
File created.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
exit_code=0
Checking for errors ...
The database has not been successfully created. Shutting down the instance ...
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Mar 21 18:10:16 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected.
ORACLE instance shut down.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
.end std out.
.end err out.
ADX Database Utility
getConnectionUsingAppsJDBCConnector() -->
APPS_JDBC_URL='null'
Trying to get connection using SID based connect descriptor
getConnection() -->
sDbHost : proddb
sDbDomain : clientdomain
sDbPort : 1530
sDbSid : TEST
sDbUser : APPS
Trying to connect using SID...
getConnectionUsingSID() -->
JDBC URL: jdbc:oracle:thin:@proddb.clientdomain:1530:TEST
Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
Trying to connect using SID as ServiceName
getConnectionUsingServiceName() -->
JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=proddb.clientdomain)(PORT=1530))(CONNECT_DATA=(SERVICE_NAME=TEST)))
Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
Trying to connect using SID as ServiceName.DomainName
getConnectionUsingServiceName() -->
JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=proddb.clientdomain)(PORT=1530))(CONNECT_DATA=(SERVICE_NAME=TEST.clientdomain)))
Exception occurred: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=proddb.clientdomain)(PORT=1530))(CONNECT_DATA=(SERVICE_NAME=TEST.clientdomain)))
Connection could not be obtained; returning null
-------------------ADX Database Utility Finished---------------
RC-00118: Error occurred during creation of database
Raised by oracle.apps.ad.clone.ApplyDatabase
Please advise ASAP.
Regards
Mohammed.Nikki,
Check alert<SID>.log file for more details about the error.
It looks like that the source database was not cleanly shutdown before copying the files to the target node. Please do the following and check then:
SQL> connect / as sysdba
SQL> startup mount;
SQL> recover database using backup controlfile until cancel;
-- type CANCEL
SQL> alter database open resetlogs; If the above does not help, then shutdown the source database normally (make sure it is down), re-copy the files and start the cloning process again. -
Clone in same machine cold/hot
Hi,
1,What are the things i have to consider before start the cloning(both cold,hot).
2,please anyone provide steps for that.
3,Is the listener should be started before starting the procedure in target machine?
4,I am planned to do in same machine or different location(mount point) in another machine.
Should I set db/log_file_name_convert in init.ora file?
If i used same machine,should i change instance_name in clone database?
5,If i used same machine or different location(mount point) in another machine ,should i take control file backup from source?
6,what situation we used the control file trace?
7, when will use reset or set in creation of control file manually?user3266490 wrote:
Hi,
1,What are the things i have to consider before start the cloning(both cold,hot).
2,please anyone provide steps for that.
To get Cold backup using rman just need STARTUP MOUNT and BACKUP DATABASE command from RMAN.But if you want manually(user managed) then you must first identify all control/data and online log files according from v$controlfile,v$datafile and v$logfile views,After that you need SHUTDOWN IMMEDIATE and copy using OS commands(cp or copy) these files to other location and this will your cold backup.
But to getting HOT backup your database must be running in ARCHIVELOG mode.After enabling ARCHIVELOG( using SHUTDOWN IMMEDIATE;STARTUP MOUNT;ALTER DATABASE ARCHIVELOG);Then while database running you can execute BACKUP DATABASE command through rman or using user managed you need ALTER DATABASE BEGIN BACKUP(or ALTER TABLESPACE BEGIN BACKUP) and copy all data/control and logfile toother location and this will your hot backup.
3,Is the listener should be started before starting the procedure in target machine?
Do not need listener
4,I am planned to do in same machine or different location(mount point) in another machine.
Should I set db/log_file_name_convert in init.ora file?
Yes,you can use.But in this case you also have to use DB_UNIQUE_NAME initialization parameter.
If i used same machine,should i change instance_name in clone database?
Yes.
>
5,If i used same machine or different location(mount point) in another machine ,should i take control file backup from source?
You always/anyway need backup/copy controlfile.
6,what situation we used the control file trace?
In this situation do not need.
7, when will use reset or set in creation of control file manually?Reset controlfile use performin incomplete recovery which we want return database past time which before resetlog.In this case you need reset database(it means controlfile).But recreating controlfile need if you do not have backup of controlfile and have all data/online log files.So in this case you can use recreate controlfiles. -
Hi folks
I used the cmd R option on booting the MBP and did a disk scan and it reported errors that could not be fixed/repaired.
So I opted to install a brand new 1Tbyte Seagate hybrid hard drive and restore from my time machine backup.
So I installed the new drive in the MBP...it stated that it needed to restore from the internet and I was treated with a rotating globe for about 10 minutes.
It then gave the normal restore options and I opened to format the new drive as a mac drive etc...
Selected the most recent TM backup from USB drive and pointed it to the new formatted HD in the MBP.
So far so good I thought....it said it was restoring....
waited about 4.5 hours and apparently it completed when I was out so I did not see any messages just a normal looking mavericks desktop BUT with "?" In the dashboard where all the applications icons should be?????
I assume something went wrong somewhere so I reinstalled the old HD and restarted TM and it's not starting to backup all 493Gbyte of disk whichI. Understand is normal after a full restore.
So...what to do now??? I'll wait for the 7 odd hours of TM to complete but how best should I proceed with the new HD etc...should I reinstall and copy mavericks to it from a memory stick and then attempt a new restore from the recent TMS backup? Or will this cause issues....
I also have an Inateck hard drive cloning device (brand new never used) so I had wondered if I should simply install the old drive and new drives into this and start the cloning mechanism? OR will this simply clone the errors that were reported on the old drive when it was in the MBP?
In short I'm not sure what to do for the best now and would welcome helpful suggestions as to how to proceed.
thanks
Nick<<<<UPDATE>>>>
If at first you don't succeed...
Last night after the new 493 Gbyte time machine completed. I once again installed the new drive and restarted the MBP ...waited 10 min for the internet to download the basic disk utilities...restarted the restore from TM and waited 6 hours...Happy days it worked perfectly and like a rocket...the old disk had a read write speed of approx 50-60 Mb/s the new one (hybrid drive) measures at 100-110 Mb/s...programmes open and close noticeably faster and it's better than when the MBP was new...
Apparently this new hybrid drive "learns" frequently used programmes and caches parts that improves start up time etc as time progresses etc...the MBP now starts from cold boot in less than 1 minute compared to 2 plus before...I know minutes should not really matter but it does improve the user experience. I should add I have 16G of RAM installed which does make a difference with Photoshop and Aperture etc.
Hope this helps others or at least encourages people to try hybrid drives over the much more expensive SSD option. -
External hard drive doesn't wake up fast enough for Time Machine
I am having trouble with using SuperDuper and Time Machine doing their jobs with my external firewire drives.
Config: One 750GB drive (one partition called DataDisk) and one 1TB drive (with two partitiions - Clone and TMDisk) connected thru daisychained firewire to the mac mini.
*Backup Strategy*: SuperDuper clones the internal hard drive to the Clone partition once a week. The Time Machine is setup to backup the DataDisk to the TMDisk.
Usage: My Mac mini is essentially a media server with iTunes always running. Per advice on another thread, I have the mini's power saving setup to let the hard drives go to sleep when possible.
Problem: Once the external drives have gone to sleep, and the SuperDuper tries to do the cloning, it fails. Similarly, the TM fails to find the backup drive. However, if I keep the drive active at the time of these backups, both SD and TM work fine.
Is there a way for me to wake up the drives before SD starts its cloning? Note: I am not letting the mini go to sleep as I use Apple TV to play its contents remotely.
Also, is there a way to wake up the drive before TM starts its operation every hour?
Appreciate any help.
Message was edited by: new2appletvHi Andy,
Thank you very much for your suggestions.
I will try to test with USB connection. I will try with the 1TB drive first as the 750GB drive needs work. The 750GB drive needs the firewire interface card to be replaced by the USB card whereas the 1TB has both available together.
I am not terribly in favour of keeping everything ON for the following reasons:
1. The mini or the drives make a whirring noise all the time that they are ON. One of the reasons, I retired my windows PC is that it is inside a computer armoire in my bedroom and even then the noise from the SMPS and CPU fans drive me crazy.
2. The TM starts a backup cycle every hour even when there is nothing to backup and this causes clicking noise from the drives. If I could configure TM to run only once a day so that I can get the rollback uption (which SD can't) when I accidentally delete some data file. But, I am told that TM can't be configured thus.
3. Power consumption: I have a power meter that plugs into the AC outlet into which I can connect the devices under measurement. I will find out how much power it really consumes. I had purchased this device to measure the power consumption of the pump/filter in my Koi pond as that runs 24/7 and I don't like drawing too much of electricity as it is a scarce resource today (the electricity cost is also very high in Northern California).
I am just wondering if I should buy one of those RF remotes that you connect to USB port which can operate from upto a distance of 60ft. I could keep this next to my Apple TV remote and use it to wake up the mac mini before using my Apple TV. I only hope that the mac mini wakes up on this type of remote as well. -
Help! I can't do anything with my database even though i've connected!
Hello,
I think I have properly connected to my MS SQL Server 2000 database, cause I'm not throwing any exceptions when I connect, but I can't insert or update any data, it displays error messages when i try to do either..i haven't tested delete cause its a database with empty tables. I think something has to be wrong iwth my database, cause this code works fine when i use jdbc-odbc with MS ACCESS 2000. I'll post my code here, just in case.
<code>
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.sql.*;
import java.rmi.*;
import javax.swing.text.*;
import java.net.InetAddress;
public class mygui extends JPanel implements ActionListener, DocumentListener
//creates a frame object to add the application GUI components to.
private JFrame mgframe;
//text fields and text areas for user input
// private JTextField file;
private JTextField function;
private JTextArea description;
private JTextField context;
private JTextField actions;
private JTextArea name;
private JTextArea type;
private JTextArea arguments;
private JTextArea rvalues;
private JTextArea rvdescrip;
private JTextArea rvnotes;
private JTextArea notes;
private JTextArea funccalled;
//scrollpanes for text areas
private JScrollPane sdescription;
private JScrollPane sname;
private JScrollPane stype;
private JScrollPane sarguments;
private JScrollPane srvalues;
private JScrollPane srvdescrip;
private JScrollPane srvnotes;
private JScrollPane snotes;
private JScrollPane sfunccalled;
// private JLabel lfile;
private JLabel lfunction;
private JLabel ldescription;
private JLabel lcontext;
private JLabel lactions;
private JLabel lname;
private JLabel ltype;
private JLabel larguments;
private JLabel lrvalues;
private JLabel lrvdescrip;
private JLabel lrvnotes;
private JLabel lnotes;
private JLabel lfunccalled;
//buttons
private JButton load;
private JButton savenew;
private JButton newreturncode;
private JButton update;
private JButton delete;
private JButton deletereturncode;
private JButton prev;
private JButton next;
//panels
private JPanel filep;
private JPanel mainp;
private JPanel mainp2;
//documents
private Document insource;
private Document upsource;
private Document delsource;
//strings which contain inputted function information
private String functionname;
private String descriptionname;
private String rvvaluesname;
private String rvdescripname;
private String notesname;
//class constructor that builds the necessary labels
//and text fields, buttons, and panels.
public mygui()
JFrame mgframe = new JFrame("Welcome to the U_Fec function database");
// Closes from title bar
//and from menu
mgframe.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
mgframe.getContentPane().setLayout(new BorderLayout());
mgframe.setBackground(Color.white);
mgframe.setSize(800,999);
mgframe.setVisible(true);
//intializes text fields
// file = new JTextField();
function = new JTextField ();
description = new JTextArea();
context = new JTextField();
actions = new JTextField();
name = new JTextArea();
type = new JTextArea();
arguments = new JTextArea();
rvalues = new JTextArea();
rvdescrip = new JTextArea();
rvnotes = new JTextArea();
notes = new JTextArea();
funccalled = new JTextArea();
//scrollpanes for each text area
sdescription = new JScrollPane(description);
sname = new JScrollPane(name);
stype = new JScrollPane(type);
sarguments = new JScrollPane(arguments);
srvalues = new JScrollPane(rvalues);
srvdescrip = new JScrollPane(rvdescrip);
srvnotes = new JScrollPane(rvnotes);
snotes = new JScrollPane(notes);
sfunccalled = new JScrollPane(funccalled);
//initializes labels for text fields
// lfile = new JLabel("File: ");
lfunction = new JLabel("Function: ");
ldescription = new JLabel ("Description: ");
lcontext = new JLabel ("Context: ");
lactions = new JLabel ("Actions: ");
lname = new JLabel ("Name: ");
ltype = new JLabel ("Type: ");
larguments = new JLabel ("Arguments: ");
lrvalues = new JLabel ("Return Values: ");
lrvdescrip = new JLabel ("Description: ");
lrvnotes = new JLabel ("Notes: ");
lnotes = new JLabel ("Notes: ");
lfunccalled = new JLabel ("Functions called: ");
//initialize buttons
load = new JButton("Load");
update = new JButton ("Update");
savenew = new JButton ("Insert new function");
newreturncode = new JButton ("Insert new return code for existing function");
delete = new JButton ("Del");
deletereturncode = new JButton ("Delete return code");
prev = new JButton ("Prev");
next = new JButton ("Next");
//calls methods to build each panel
buildFilePanel();
buildMainPanel();
//places panel info into correct border location
mgframe.getContentPane().add (filep, BorderLayout.NORTH);
mgframe.getContentPane().add (mainp, BorderLayout.CENTER);
mgframe.getContentPane().add (mainp2,BorderLayout.SOUTH);
private void buildMainPanel()
//main panel
mainp = new JPanel();
//Sets color and layout.
//Adds text fields and labels for user input
mainp.setBackground(Color.white);
mainp.setLayout ( new GridLayout (6, 2, 2, 2));
//grid of name, type, argument, return values,
//return values description, and return value
//notes, which is contained within the main panel
mainp2 = new JPanel();
mainp2.setBackground(Color.white);
mainp2.setLayout( new GridLayout (4, 3, 5, 5));
mainp2.add(lname);
mainp2.add(ltype);
mainp2.add(larguments);
mainp2.add(sname);
mainp2.add(stype);
mainp2.add(sarguments);
mainp2.add(lrvalues);
mainp2.add(lrvdescrip);
mainp2.add(lrvnotes);
mainp2.add(srvalues);
mainp2.add(srvdescrip);
mainp2.add(srvnotes);
// mainp.add(lfunction);
// mainp.add(function);
mainp.add(lfunction);
mainp.add(function);
mainp.add(ldescription);
mainp.add(sdescription);
mainp.add(lcontext);
mainp.add(context);
mainp.add(lactions);
mainp.add(actions);
mainp.add(lnotes);
mainp.add(snotes);
mainp.add(lfunccalled);
mainp.add(sfunccalled);
//sets border around panel and a title
mainp.setBorder(BorderFactory.createTitledBorder("function information"));
//listeners for each text field and text area
//adds property for eact text area/field
function.getDocument().addDocumentListener(this);
function.getDocument().putProperty("name","function");
description.getDocument().addDocumentListener(this);
description.getDocument().putProperty("name", "description");
context.getDocument().addDocumentListener(this);
context.getDocument().putProperty("name","context");
actions.getDocument().addDocumentListener(this);
actions.getDocument().putProperty("name","actions");
name.getDocument().addDocumentListener(this);
name.getDocument().putProperty("name","name");
type.getDocument().addDocumentListener(this);
type.getDocument().putProperty("name","type");
arguments.getDocument().addDocumentListener(this);
arguments.getDocument().putProperty("name","arguments");
rvalues.getDocument().addDocumentListener(this);
rvalues.getDocument().putProperty("name","return values");
rvdescrip.getDocument().addDocumentListener(this);
rvdescrip.getDocument().putProperty("name","return values description");
rvnotes.getDocument().addDocumentListener(this);
rvnotes.getDocument().putProperty("name","return values notes");
notes.getDocument().addDocumentListener(this);
notes.getDocument().putProperty("name","notes");
funccalled.getDocument().addDocumentListener(this);
funccalled.getDocument().putProperty("name","functions called");
private void buildFilePanel ()
filep = new JPanel();
//Sets color and layout
//Adds text field and buttons for file input
filep.setBackground(Color.white);
filep.setLayout(new GridLayout(2,3,0,5));
//Adds each component to the panel
filep.add(load);
filep.add(update);
filep.add(savenew);
filep.add(newreturncode);
filep.add(delete);
filep.add(deletereturncode);
//filep.add(prev);
// filep.add(next);
//sets border around panel
filep.setBorder(BorderFactory.createTitledBorder("buttons"));
//adds an actionListener for file name
// file.getDocument().addDocumentListener(this);
//sets border around buttons
load.setBorder(BorderFactory.createRaisedBevelBorder());
savenew.setBorder(BorderFactory.createRaisedBevelBorder());
newreturncode.setBorder(BorderFactory.createRaisedBevelBorder());
update.setBorder(BorderFactory.createRaisedBevelBorder());
delete.setBorder(BorderFactory.createRaisedBevelBorder());
deletereturncode.setBorder(BorderFactory.createRaisedBevelBorder());
// prev.setBorder(BorderFactory.createRaisedBevelBorder());
// next.setBorder(BorderFactory.createRaisedBevelBorder());
//listeners for the buttons
load.addActionListener(this);
savenew.addActionListener(this);
newreturncode.addActionListener(this);
update.addActionListener(this);
delete.addActionListener(this);
deletereturncode.addActionListener(this);
// prev.addActionListener(this);
// next.addActionListener(this);
public void actionPerformed(java.awt.event.ActionEvent evt)
String dataSourceName = "db1";
String dbURL = "jdbc:odbc:" + dataSourceName;
try{
DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver() );
//Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
// Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver ");
} catch (Exception e) {
System.out.println(e.getMessage());
// } catch (SQLException e) {
// System.out.println(e.getMessage());
try{
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://NJ8650MONDAL", "m", "m");
Statement stmt = con.createStatement();
if (evt.getSource()==load)
try{
ResultSet result = stmt.executeQuery("SELECT * FROM function_description, return_code_description " + "WHERE function_description.Function = return_code_description.Function_Name AND (((Function)='"+ functionname + "'));");
result.next();
function.setText(result.getString("Function"));
description.setText(result.getString("Description"));
notes.setText(result.getString("Notes"));
rvalues.setText(result.getString("Return_Codes"));
rvdescrip.setText(result.getString("Return_Codes_Description"));
}catch (Exception e) {function.setText("Record not found in database.");}
if(evt.getSource() == update)
try{
con.setAutoCommit(false);
PreparedStatement updateDesc = con.prepareStatement("UPDATE function_description SET Description = ? WHERE Function LIKE ?");
updateDesc.setString(1, descriptionname);
updateDesc.setString(2, functionname);
updateDesc.executeUpdate();
PreparedStatement updateNote = con.prepareStatement("UPDATE function_description SET Notes = ? WHERE Function LIKE ?");
updateNote.setString(1, notesname);
updateNote.setString(2, functionname);
updateNote.executeUpdate();
con.commit();
con.setAutoCommit(true);
con.setAutoCommit(false);
PreparedStatement updateRvalue = con.prepareStatement("UPDATE return_code_description SET Return_Codes = ? WHERE Function_Name LIKE ?");
updateRvalue.setString(1, rvvaluesname);
updateRvalue.setString(2, functionname);
updateRvalue.executeUpdate();
PreparedStatement updateRvdesc = con.prepareStatement("UPDATE return_code_description SET Return_Codes_Description = ? WHERE Function_Name LIKE ?");
updateRvdesc.setString(1, rvdescripname);
updateRvdesc.setString(2, functionname);
updateRvdesc.executeUpdate();
con.commit();
con.setAutoCommit(true);
}catch (Exception e) {function.setText("Could not update function. Make sure record is found in database");}
if(evt.getSource()==savenew)
try{
con.setAutoCommit(false);
// PreparedStatement insertRvalues = con.prepareStatement("INSERT INTO return_code_description VALUES (?,?,?)");
// insertRvalues.setString(1,functionname);
// insertRvalues.setString(2,rvvaluesname);
// insertRvalues.setString(3,rvdescripname);
// insertRvalues.execute();
PreparedStatement insertFvalues = con.prepareStatement("INSERT INTO function_description VALUES (?,?,?)");
insertFvalues.setString(1,functionname);
insertFvalues.setString(2,descriptionname);
insertFvalues.setString(3,notesname);
insertFvalues.execute();
insertFvalues.close();
PreparedStatement insertRvalues = con.prepareStatement("INSERT INTO return_code_description (Function_Name, Return_Codes, Return_Codes_Description) VALUES (?,?,?)");
insertRvalues.setString(1,functionname);
insertRvalues.setString(2,rvvaluesname);
insertRvalues.setString(3,rvdescripname);
insertRvalues.execute();
con.commit();
con.setAutoCommit(true);
insertRvalues.close();
}catch (Exception e) {function.setText("Could not create new record. Make sure it is not already there.");}
insertRvalues.setString(1, functionname);
insertRvalues.setString(2, rvdescripname);
insertRvalues.setString(3, rvvaluesname);
insertRvalues.executeUpdate();
con.commit();
con.setAutoCommit(true);
// stmt.executeUpdate("INSERT INTO function_description" + "(Function, Description, Notes)" +
// "VALUES (('"+ functionname + "'), ('"+ descriptionname + "'), ('"+ notesname + "'));");
String sql = "INSERT INTO function_description" +
" (Function, Description, Notes)" +
" VALUES (functionnname, descriptionname, notesname)";
stmt.executeUpdate(sql);
String sql2 = "INSERT INTO return_codes_description" +
"(Function Name, Return Codes, Return Codes Description" +
" VALUES (functionname, rvaluesname, rvdescripname)";
stmt.executeUpdate(sql2);
if (evt.getSource() == newreturncode)
try{
PreparedStatement insertnewRvalues = con.prepareStatement("INSERT INTO return_code_description (Function_Name, Return_Codes, Return_Codes_Description) VALUES (?,?,?)");
insertnewRvalues.setString(1,functionname);
insertnewRvalues.setString(2,rvvaluesname);
insertnewRvalues.setString(3,rvdescripname);
insertnewRvalues.execute();
}catch (Exception e){function.setText("Could not add new return code. Make sure function record exists.");}
if (evt.getSource() == delete)
int n = JOptionPane.showConfirmDialog(mgframe,"Do you want to delete '"+ functionname + "'",
"An Important Question",
JOptionPane.YES_NO_OPTION);
if(n== JOptionPane.YES_OPTION)
try{
con.setAutoCommit(false);
PreparedStatement rDelete = con.prepareStatement("Delete from return_code_description where Function_Name = ?");
rDelete.setString(1, functionname);
int deleteCount2 = rDelete.executeUpdate();
PreparedStatement fDelete = con.prepareStatement("Delete from function_description where Function =? ");
fDelete.setString(1, functionname);
int deleteCount = fDelete.executeUpdate();
con.commit();
con.setAutoCommit(true);
}catch (Exception e) {function.setText("Could not delete record. Make sure it is in database.");}
if (evt.getSource()== deletereturncode)
try{
PreparedStatement rDelete = con.prepareStatement("Delete from return_code_description where Function_Name = ?");
rDelete.setString(1, functionname);
int deleteCount2 = rDelete.executeUpdate();
}catch (Exception e){function.setText("Could not add new return code. Make sure function record exists.");}
if (evt.getSource() == next)
try{
ResultSet result = stmt.executeQuery("SELECT * FROM function_description, return_code_description " + "WHERE function_description.Function = return_code_description.Function_Name AND (((Function)='"+ functionname + "'));");
result.next();
result.next();
function.setText(result.getString("Function"));
description.setText(result.getString("Description"));
notes.setText(result.getString("Notes"));
rvalues.setText(result.getString("Return_Codes"));
rvdescrip.setText(result.getString("Return_Codes_Description"));
}catch (Exception e) {function.setText("Record not found in database.");}
*/} catch (SQLException e) {System.out.println(e.getMessage());}
public static void main (String [] args)
mygui mg = new mygui();
//The following 3 methods are DocumentListener methods
public void insertUpdate(javax.swing.event.DocumentEvent evt)
updateLog (evt, "inserted into");
public void changedUpdate (javax.swing.event.DocumentEvent evt)
//not fired by plain text components
public void removeUpdate(javax.swing.event.DocumentEvent evt)
updateLog(evt, "removed from");
public void updateLog(javax.swing.event.DocumentEvent evt, String ac)
Document doc = evt.getDocument();
if( doc.getProperty("name") == "function")
try{
functionname = doc.getText(0,doc.getLength());
}catch (BadLocationException ble) {
// Shouldn't get here
else if ( doc.getProperty("name") == "description")
try{
descriptionname = doc.getText(0,doc.getLength());
}catch (BadLocationException ble) {
// Shouldn't get here
else if ( doc.getProperty("name") == "notes")
try{
notesname = doc.getText(0,doc.getLength());
}catch (BadLocationException ble) {
// Shouldn't get here
else if ( doc.getProperty("name") == "return values")
try{
rvvaluesname = doc.getText(0,doc.getLength());
}catch (BadLocationException ble) {
// Shouldn't get here
else if ( doc.getProperty("name") == "return values description")
try{
rvdescripname = doc.getText(0,doc.getLength());
}catch (BadLocationException ble) {
// Shouldn't get here
//Closes class
</code>
Thanks in advance!!!!This error message is explained on MSDN site (Article Q313181). Here is an excerpt:
SYMPTOMS
While using the Microsoft SQL Server 2000 Driver for JDBC, you may experience the following exception:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.
CAUSE
This error occurs when you try to execute multiple statements against a SQL Server database with the JDBC driver while in manual transaction mode (AutoCommit=false) and while using the direct (SelectMethod=direct) mode. Direct mode is the default mode for the driver.
RESOLUTION
When you use manual transaction mode, you must set the SelectMethod property of the driver to Cursor, or make sure that you use only one active statement on each connection as specified in the "More Information" section of this article.
Maybe you are looking for
-
To update this application, sign in to the account you used to purchase it. - I get this message for a couple of the apps that were installed from original
-
How Do I Use the New Adobe Forums?
I know this thread will be moved somewhere else, but I have no clue where the "forum bugs" forum is, so I'm posting here in "Premiere" since that is where I hang out most of the time. In the old forums I was able to get in, find the hot issues, eith
-
Mac OS X Server and Solid Works
I have a Xserve and Xserve Raid running AFP and Windows File Services. The problem is when opening Solid Works files on a PC. Some files open fine but others come up with the message "Access to unnamed file is denied". If you copy the file off the se
-
Has anyone run into this one? I make an exact copy of a Captivate project file in My Documents. Both file sizes are the same. I open the copy in Captivate and delete three slides. I also go into the library and delete unused objects. I save the proje
-
Error in connecting to liveCache from DBMGUI
hi all, I am getting the following error while connecting to liveCache server. First it throws a popup with "0" on it and then it throws another pop with the following message Internal Error on page 'Main' 91: Object variable or With block variable n