cx-oracle-users Mailing List for cx_Oracle (Page 54)
Brought to you by:
atuining
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Amaury F. d'A. <ama...@gm...> - 2010-07-03 21:11:38
|
2010/7/3 Jason Boorn <jb...@gm...>: > Thank you, but I'm using python - could you tell me what kind of a structure > the argument should be? And how to populate it? > > My original function call was called with an array argument, an array > containing all of the fields being inserted. In the docs: http://cx-oracle.sourceforge.net/html/cursor.html#Cursor.setinputsizes you should not call setinputsizes() with one argument, but with one argument per variable. since you already have a list containing the various sizes, cursor.setinputsizes(*inputsizes) (note the * symbol) will "explode" the list and pass each list items as separate arguments to the function. -- Amaury Forgeot d'Arc |
From: Jason B. <jb...@gm...> - 2010-07-03 21:03:00
|
Thank you, but I'm using python - could you tell me what kind of a structure the argument should be? And how to populate it? My original function call was called with an array argument, an array containing all of the fields being inserted. On Sat, Jul 3, 2010 at 3:28 PM, Amaury Forgeot d'Arc <ama...@gm...>wrote: > Hi, > > 2010/7/3 Jason Boorn <jb...@gm...>: > [...] > > destination_cursor.setinputsizes(inputsizes) > [...] > > I get the following error: > > Could not insert: expecting an array of two elements [type, numelems] > > You pass only one argument to cursor.setinputsize; this will define > only one variable, this is certainly not what you want. Try with > destination_cursor.setinputsizes(*inputsizes) > to define multiple variables. > > -- > Amaury Forgeot d'Arc > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Amaury F. d'A. <ama...@gm...> - 2010-07-03 19:28:47
|
Hi, 2010/7/3 Jason Boorn <jb...@gm...>: [...] > destination_cursor.setinputsizes(inputsizes) [...] > I get the following error: > Could not insert: expecting an array of two elements [type, numelems] You pass only one argument to cursor.setinputsize; this will define only one variable, this is certainly not what you want. Try with destination_cursor.setinputsizes(*inputsizes) to define multiple variables. -- Amaury Forgeot d'Arc |
From: Jason B. <jb...@gm...> - 2010-07-03 16:52:07
|
Hello - I'm using the cx_oracle module for an insertion whose sql is created dynamically. The relevant code is: while staging_row != None: sqlstring = sectionconfig["INSERTIONSQL1"] valuesstring = " VALUES (" rownum += 1 isfirst = True clobs = [] inputsizes = [] for cidx in range(len(colnames)): if (isfirst): isfirst = False else: valuesstring += "," try: curval = staging_row[colnames[cidx]] if (len(curval) > 4000): clobs.append(curval) inputsizes.append(cx_Oracle.CLOB) valuesstring += ":" + str(len(clobs)) else: inputsizes.append(None) valuesstring += curval except Exception: log.exception("Unable to get field value) executestring = sqlstring + valuesstring + ")" #log.debug(executestring) try: #log.debug(executestring) if (len(clobs) == 0): destination_cursor.setinputsizes(inputsizes) destination_cursor.execute(executestring) else: destination_cursor.execute(executestring, clobs) except Exception: e = sys.exc_info()[1] log.error("Could not insert: %s" % e) log.error(executestring) I get the following error: Could not insert: expecting an array of two elements [type, numelems] I thought the argument to setinputsizes was supposed to be an array whose length was the number of columns. Why does it expect a 2-element array? Note that I need to construct the sql dynamically and use CLOB by position, so explicitly doing omething like setinputsizes(value1=cx_Oracle.CLOB, . . .) isn't an option. Running v5.03 for python 2.6 Thanks for any help. |
From: Chuck W. <chu...@ch...> - 2010-06-21 14:29:37
|
Thank you for sending me the example. Worked nicely. If you don't mind, I do have a couple of questions about the example: 1. when can I close the connection? do I have to send a decoy job which is identified by the worker which in turn closes the connection? Or, is there a better way? 2. I see that multiprocessing has support for logging. Is it possible to instantiate logging in the main code, and have the workers write to it? Thanks again. ---- Amaury Forgeot d'Arc <ama...@gm...> wrote: > 2010/6/20 Chuck White <chu...@ch...>: > > Thanks for your response. > > > > Can you please post an example with the multiprocessing module. My understanding is that objects have to be picklable to spawn processes using multi-processing. Maybe I am missing something here. > > The parameters have to be picklable, yes. But not the state of the > worker process... > In the following sample, the "connection" object would be a cx_Oracle > connection. > The important thing is that it's a global variable, so reused the next > time the worker process gets a new task. |
From: Henning v. B. <H.v...@t-...> - 2010-06-21 13:59:48
|
Of course, if I actually extract the code from the program to create a simple test case, then there's no crash... Sometimes I hate computers! As a workaround, I created my own version of a bindnames() routine, which is fairly simple unless you try to take care of ":" in SQL strings literals and comments. The next exception in my program now is DatabaseError: <unprintable DatabaseError object> when I expected a NO_DATA_FOUND exception. I guess I have to step back from the WITH_UNICODE version of cx_Oracle and use the str version again. > -----Ursprüngliche Nachricht----- > Von: Henning von Bargen > Gesendet: Donnerstag, 17. Juni 2010 17:29 > An: 'cx-...@li...' > Betreff: curs.bindnames ACESS_VIOLATION crash with cx_Oracle 5.0.3 unicode build on Windows Python 2.6.5 > > > > 2) The connection is from a Session Pool and it's using an InputTypeHandler as follows: > conn = dbtools.session_pool.acquire() > conn.setupConnection("something") > The last line should read: dbtools.setupConnection(conn, "something") |
From: Amaury F. d'A. <ama...@gm...> - 2010-06-20 20:40:32
|
2010/6/20 Chuck White <chu...@ch...>: > Thanks for your response. > > Can you please post an example with the multiprocessing module. My understanding is that objects have to be picklable to spawn processes using multi-processing. Maybe I am missing something here. The parameters have to be picklable, yes. But not the state of the worker process... In the following sample, the "connection" object would be a cx_Oracle connection. The important thing is that it's a global variable, so reused the next time the worker process gets a new task. connection = None def worker(param): import time time.sleep(0.1) global connection if connection is None: print "%d Connect" % param connection = param else: print "%d Connected by %d" % (param, connection) return param + 10 if __name__ == '__main__': import multiprocessing pool = multiprocessing.Pool(processes=4) results = [] for x in range(10): def callback(result, x=x): results.append((x, result)) pool.apply_async(worker, [x], callback=callback) pool.close() pool.join() print "results", results -- Amaury Forgeot d'Arc |
From: Chuck W. <chu...@ch...> - 2010-06-20 18:47:22
|
Thanks for your response. ---- Amaury Forgeot d'Arc <ama...@gm...> wrote: > Another solution is to use the "multiprocessing" module: a > multiprocessing.Pool keeps the spawned processes alive between jobs, > and you can cache the connection in a global variable. Can you please post an example with the multiprocessing module. My understanding is that objects have to be picklable to spawn processes using multi-processing. Maybe I am missing something here. > Did you actually try? The compression functions can truly run > concurrently in several threads, since > they care to release the Python "Global Interpreter Lock". No, I did not try. Thanks. |
From: Amaury F. d'A. <ama...@gm...> - 2010-06-20 17:47:48
|
Hi, 2010/6/20 Chuck White <chu...@ch...>: > Hello -- I am trying to export data from an Oracle 10 db (~1TB) to a Netezza db. The ORCL db has >150tables with tables which range from a few kb to 300GB. > > I am using Python 2.6.5/cx_Oracle to download the data as bzipped csv files and then loading in Netezza. I have written a script which spawns as many processes as specified (using threading, Queue and subprocess modules) and pulls down the data. The large tables are pulled down as multiple files, each of which is a partition. Briefly, here's the code which spawns the processes. > > ==== > jobq = Queue.Queue(...) > put stuff in the queue > > def worker(): > while True: > j = jobq.get() > p = subprocess.Popen(command+" --job=%s"%j, stdout=subprocess.PIPE, shell=True) > p.wait() > jobq.task_done() > > for i in xrange(int(options.nproc)): > t = threading.Thread(target=worker) > t.setDaemon(True) > t.start() > > jobq.join() > ==== > > Since, I am spawning multiple processes, and cx_Oracle connection object is not picklable, each process has to start and close its own connection (adds about 15seconds to each process). While that is fine for the larger tables, it adds a lot of time for the 100 or so small tables. > > Is there any way in which all the connections can be started by the master and passed to the worker processes? I realize I can easily spawn multiple threads and just use one process. However, with all the compression that needs to happen, I am thinking that would be much slower. Did you actually try? The compression functions can truly run concurrently in several threads, since they care to release the Python "Global Interpreter Lock". Another solution is to use the "multiprocessing" module: a multiprocessing.Pool keeps the spawned processes alive between jobs, and you can cache the connection in a global variable. -- Amaury Forgeot d'Arc |
From: Chuck W. <chu...@ch...> - 2010-06-20 04:22:42
|
Hello -- I am trying to export data from an Oracle 10 db (~1TB) to a Netezza db. The ORCL db has >150tables with tables which range from a few kb to 300GB. I am using Python 2.6.5/cx_Oracle to download the data as bzipped csv files and then loading in Netezza. I have written a script which spawns as many processes as specified (using threading, Queue and subprocess modules) and pulls down the data. The large tables are pulled down as multiple files, each of which is a partition. Briefly, here's the code which spawns the processes. ==== jobq = Queue.Queue(...) put stuff in the queue def worker(): while True: j = jobq.get() p = subprocess.Popen(command+" --job=%s"%j, stdout=subprocess.PIPE, shell=True) p.wait() jobq.task_done() for i in xrange(int(options.nproc)): t = threading.Thread(target=worker) t.setDaemon(True) t.start() jobq.join() ==== Since, I am spawning multiple processes, and cx_Oracle connection object is not picklable, each process has to start and close its own connection (adds about 15seconds to each process). While that is fine for the larger tables, it adds a lot of time for the 100 or so small tables. Is there any way in which all the connections can be started by the master and passed to the worker processes? I realize I can easily spawn multiple threads and just use one process. However, with all the compression that needs to happen, I am thinking that would be much slower. Thank you. |
From: Mark H. <mh...@pi...> - 2010-06-17 21:06:40
|
On 6/17/10 1:33 PM, Robert wrote: > How to make below code work ? > curs1 has 8 columns, I want to insert into table with 9 columns - 'FOO' in col_9 > > >> for row in curs1: >> curs2.execute('insert into emp2(empno,ename,job,mgr,hiredate,sal,comm,deptno, col_9) values (:1,:2,:3,:4,:5,:6,:7,:8)',row, 'FOO') >> > > TypeError: function takes at most 2 arguments (3 given) do this: print row and you will see that it is a list of length 8 that corresponds to the row fetched from curs1. so, do these two things: - add :9 to the values clause, to correspond with col_9 - add 'FOO' to row, so there will be 9 items in the list row.append('FOO') and it should be good. |
From: Robert <web...@gm...> - 2010-06-17 20:33:37
|
How to make below code work ? curs1 has 8 columns, I want to insert into table with 9 columns - 'FOO' in col_9 > for row in curs1: > curs2.execute('insert into emp2(empno,ename,job,mgr,hiredate,sal,comm,deptno, col_9) values (:1,:2,:3,:4,:5,:6,:7,:8)',row, 'FOO') > TypeError: function takes at most 2 arguments (3 given) |
From: Robert <web...@gm...> - 2010-06-17 18:17:46
|
Thanks, Yes, as long time Oracle dev, i know :) Just wanted to present a very simple case. On Thu, Jun 17, 2010 at 2:02 PM, Fawcett, David (MPCA) <Dav...@st...> wrote: > If the data is really coming from one table and going unmodified into another table, couldn't you do something like this? > > curs1.execute("""insert into emp2 select * from emp""") > db.commit() > |
From: Fawcett, D. (MPCA) <Dav...@st...> - 2010-06-17 18:02:41
|
If the data is really coming from one table and going unmodified into another table, couldn't you do something like this? curs1.execute("""insert into emp2 select * from emp""") db.commit() -----Original Message----- From: Robert [mailto:web...@gm...] Sent: Thursday, June 17, 2010 11:38 AM To: cx-...@li... Subject: [cx-oracle-users] INSERT examples Given this: curs1.execute("""select * from emp""") result_set = curs1.fetchall() can someone please provide me with sample code to INSERT into emp2 with "result_set" ? thanks ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Mark H. <mh...@pi...> - 2010-06-17 17:37:57
|
On 6/17/10 9:38 AM, Robert wrote: > Given this: > curs1.execute("""select * from emp""") > result_set = curs1.fetchall() > > can someone please provide me with sample code to INSERT into emp2 > with "result_set" ? here's one way... cx_Experts, any nice shorthand for :1,:2,:3,...? curs1.execute('select empno,ename,job,mgr,hiredate,sal,comm,deptno from emp') for row in curs1: curs2.execute('insert into emp2(empno,ename,job,mgr,hiredate,sal,comm,deptno) values (:1,:2,:3,:4,:5,:6,:7,:8)',row) |
From: Robert <web...@gm...> - 2010-06-17 16:38:31
|
Given this: curs1.execute("""select * from emp""") result_set = curs1.fetchall() can someone please provide me with sample code to INSERT into emp2 with "result_set" ? thanks |
From: Henning v. B. <H.v...@t-...> - 2010-06-17 15:45:03
|
Hi, I am converting an existing application to cx_Oracle 5.0.3 Unicode on Windows with Python 2.6.5. With cx_Oracle 4.4, iso-8859-1 and bytestrings, it worked. Now, with Unicode, it crashes with ACCESS_VIOLATION at the call to curs.bindnames() The database is using NLS_CHARACTERSET='UTF8', NLS_LANG is set to GERMAN_GERMANY.UTF8. curs = conn.cursor() perflog.info("Vor prepare") curs.prepare( u"""begin update BRLRS set STATUS = 'STARTING' , DAT_STATUS = SYSDATE , RESOURCES_USED = 0 , RESOURCES_MAX = 0 where RECO_ID = :RECO_ID and HOST_IP = :HOST_IP and HOST_PORT = :SERVER_PORT ; if SQL%ROWCOUNT = 0 then raise NO_DATA_FOUND; -- LRS ist nicht im Repository eingetragen. end if; end;""") perflog.info("Nach Prepare") try: perflog.info("Vor bindnames") k = curs.bindnames() perflog.info("nach bindnames") except: perflog.error("Exception beim Zugriff auf bindnames") k = [] Note: 1) I do not get any Python exception, but the python process crashes with ACCESS_VIOLATION (exit code -1073741819). The last line in the log output is "Vor bindnames". 2) The connection is from a Session Pool and it's using an InputTypeHandler as follows: conn = dbtools.session_pool.acquire() conn.setupConnection("something") # Code excerpt from dbtools: log = logging.getLogger("main") def uc(val): "UTF8-Strings nach Unicode konvertieren" log.info("uc called for %r", val) if isinstance(val, str): if log.isEnabledFor(logging.DEBUG): log.debug("Conversion necessary from utf-8 to unicode for value %r, called from %s", val, inspect.stack()[1][1:4]) try: return val.decode("utf-8") except: log.exception("Value is not utf-8!") return val.decode("utf-8", errors="replace") return val def InputTypeHandler(cursor, value, numElements): "UTF8-Strings nach Unicode umwandeln" log.info("InputTypeHandler called for %r", value) if isinstance(value, str): try: 1/0 except: log.exception("Conversion from utf-8 to unicode for value=%r", value) return cursor.var(unicode, arraysize=numElements, inconverter=uc) return None def createSessionPool(*args, **kwargs): """ Wrapper zum Erzeugen des Session Pools. """ global session_pool if cx_Oracle.version >= "4.4" and cx_Oracle.version[0].isdigit(): session_pool = cx_Oracle.SessionPool(*args, **kwargs) else: session_pool = DummySessionPool(*args, **kwargs) def setupConnection (conn, threadDescr): """ Schreibt Informationen in die V$SESSION. Setzt außerdem die Session so, dass immer in UTC gerechnet wird. """ conn.inputtypehandler = InputTypeHandler rechnerDescr = u"Bla Bla Bla" curs = conn.cursor() _ = curs.callproc (u"dbms_session.reset_package", tuple()) _ = curs.callproc (u"dbms_application_info.set_module", (u"BlaBla", uc(threadDescr[:32]))) _ = curs.callproc (u"dbms_application_info.set_client_info", (uc(rechnerDescr[:64]), )) _ = curs.execute (u"alter session set TIME_ZONE='+00:00'") curs.close() Any ideas? Henning |
From: rwe <rog...@to...> - 2010-06-17 14:35:27
|
Hi, I had a DB machine crash, but the client doing a connection.ping() didnt notice! I have previously tested connection.ping() by shutting down the databse, and it allways caught the loss of database. Are there any known issues with connection.ping()? Roger |
From: Alexander G. <xr...@ya...> - 2010-06-16 08:30:19
|
Hello, Bernard Delmée <bdelmee@...> writes: > Anyone with an idea or HP-UX expertise, please chime in! so far I've managed to omit dependency on libnnz10.so by linking against "static" version of libclnt (-lclntst10). This involved editing cx_Oracle's setup.py to remove "clntsh" from libs: ilink@tunis:~/src/cx_Oracle-5.0.3 > grep libs setup.py libs = ["oci"] libs = ["oci"] # libs = ["clntsh", "ttsh10"] libs = [] libraries = libs, ilink@tunis:~/src/cx_Oracle-5.0.3 > Another way is to add libttsh10, and you can see it being commented out in the above grep output. The ttsh10 seems to satisfy libnnz10's deps, and comments in setup.py suggest doing so on HP-UX. -- WBR, xrgtn |
From: Eric P. <er...@ac...> - 2010-06-14 19:42:45
|
I'm working on a generalized database explorer tool lets you browse Oracle databases. It work for me, but some other people are reporting this error message when an attempt to connect to their DB fails: DatabaseError: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor I build up this connection string: "%s/%s@%s" % (username, password, host) // with an optional ":%d" % (port,) at the end, // but the error is triggered without it. I do all my testing with Oracle running on a dedicated server, and can connect with this string, using this code: conn = cx_Oracle.connect(connectionString) cu = conn.cursor() ... I've been told I should look for two alternatives: 1. Provide a tnsnames.ora file, that contains the database-specific name, and something called the SERVICE_NAME. How would cx_Oracle work with this? 2. An alternative is to bypass tnsnames.ora using this string: <<USER_NAME>>/<<PWD>>@<<HOST>>:<<PORT>>/<<SERVICE_NAME>> ======== Can anyone shed some light on what I have to do to fix the connection problem? Is the SERVICE_NAME what we MySQLer's call the database name? Thanks, Eric |
From: Weber, G. <Geo...@PA...> - 2010-06-14 18:56:14
|
Sounds good! I have been browsing through and it looks like it might be simple enough to do, but I was wondering if you wanted to set it up as part of the Subscribe object or part of the Connection object? The Subscribe object would be the "quick-and-easy" approach, but it looks like a lot of these parameters are implemented at the connection level in the JDBC (and .NET) driver(s). Well, you need the "enviroment handle" at any rate, and that appears to be at a lower level than the Subscription object. If I'm incorrect in this, then like I said earlier, I probably know just enough to be dangerous to myself and others here :), and I'm still browsing through documentation... Regards, Geoff ________________________________________ From: Anthony Tuininga [ant...@gm...] Sent: Monday, June 14, 2010 11:48 AM To: cx-...@li... Subject: Re: [cx-oracle-users] Setting listening port for DatabaseChangeNotification feature... Hi, I am on holidays right now but when I get back I can make sure that the relevant code is in place for the next release. Its likely just a simple OCI call that will only take about 5-10 minutes to do.... :-) Anthony On Mon, Jun 14, 2010 at 7:15 AM, Weber, Geoffrey <Geo...@pa...> wrote: > I've done some more digging and found the OCI call that will do the same thing: http://www.comp.dit.ie/btierney/oracle11gdoc/appdev.111/b28395/oci09adv.htm#CJGDFFFJ > > Depending on my time, I may try to take a quick look at the driver code to see if this is there or I can insert it somehow. I'm really hesitant to take that last step, however, as I probably just know enough to get into trouble instead of accomplish what I set out to do there :D... > > > > ________________________________________ > From: Weber, Geoffrey [Geo...@PA...] > Sent: Monday, June 14, 2010 8:18 AM > To: cx-...@li... > Subject: [cx-oracle-users] Setting listening port for DatabaseChangeNotification feature... > > I've discovered with Anthony's help that a bug in Oracle causes Python3.1 to not understand DCN callbacks in 10g or 11gR1. So now I'm using 11gR2 and things test out locally just fine. However, my environment is strictly controlled and firewall connections are managed on a one-off basis. > > ...so basically now I need to be able to specify the listening port of the DCN client (Python side of the connection). Unless this is specified as an option, Oracle chooses a port at random. Obviously in my environment, this will not work for me. I am unable to find such a parameter in either the Connection object or register function call (or anything else in the docs), and I didn't find anything in the driver source code using 'grep' either. As an example, JDBC has a parameter found in this table: http://www.comp.dit.ie/btierney/oracle11gdoc/java.111/b31224/dbmgmnt.htm#CHDBDJHC called "NTF_LOCAL_TCP_PORT". > > Is it possible to set parameters on connections as in the JDBC driver? > > Thanks! > Geoff Weber > geo...@pa... > > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Anthony T. <ant...@gm...> - 2010-06-14 16:48:09
|
Hi, I am on holidays right now but when I get back I can make sure that the relevant code is in place for the next release. Its likely just a simple OCI call that will only take about 5-10 minutes to do.... :-) Anthony On Mon, Jun 14, 2010 at 7:15 AM, Weber, Geoffrey <Geo...@pa...> wrote: > I've done some more digging and found the OCI call that will do the same thing: http://www.comp.dit.ie/btierney/oracle11gdoc/appdev.111/b28395/oci09adv.htm#CJGDFFFJ > > Depending on my time, I may try to take a quick look at the driver code to see if this is there or I can insert it somehow. I'm really hesitant to take that last step, however, as I probably just know enough to get into trouble instead of accomplish what I set out to do there :D... > > > > ________________________________________ > From: Weber, Geoffrey [Geo...@PA...] > Sent: Monday, June 14, 2010 8:18 AM > To: cx-...@li... > Subject: [cx-oracle-users] Setting listening port for DatabaseChangeNotification feature... > > I've discovered with Anthony's help that a bug in Oracle causes Python3.1 to not understand DCN callbacks in 10g or 11gR1. So now I'm using 11gR2 and things test out locally just fine. However, my environment is strictly controlled and firewall connections are managed on a one-off basis. > > ...so basically now I need to be able to specify the listening port of the DCN client (Python side of the connection). Unless this is specified as an option, Oracle chooses a port at random. Obviously in my environment, this will not work for me. I am unable to find such a parameter in either the Connection object or register function call (or anything else in the docs), and I didn't find anything in the driver source code using 'grep' either. As an example, JDBC has a parameter found in this table: http://www.comp.dit.ie/btierney/oracle11gdoc/java.111/b31224/dbmgmnt.htm#CHDBDJHC called "NTF_LOCAL_TCP_PORT". > > Is it possible to set parameters on connections as in the JDBC driver? > > Thanks! > Geoff Weber > geo...@pa... > > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Weber, G. <Geo...@PA...> - 2010-06-14 14:45:10
|
I've done some more digging and found the OCI call that will do the same thing: http://www.comp.dit.ie/btierney/oracle11gdoc/appdev.111/b28395/oci09adv.htm#CJGDFFFJ Depending on my time, I may try to take a quick look at the driver code to see if this is there or I can insert it somehow. I'm really hesitant to take that last step, however, as I probably just know enough to get into trouble instead of accomplish what I set out to do there :D... ________________________________________ From: Weber, Geoffrey [Geo...@PA...] Sent: Monday, June 14, 2010 8:18 AM To: cx-...@li... Subject: [cx-oracle-users] Setting listening port for DatabaseChangeNotification feature... I've discovered with Anthony's help that a bug in Oracle causes Python3.1 to not understand DCN callbacks in 10g or 11gR1. So now I'm using 11gR2 and things test out locally just fine. However, my environment is strictly controlled and firewall connections are managed on a one-off basis. ...so basically now I need to be able to specify the listening port of the DCN client (Python side of the connection). Unless this is specified as an option, Oracle chooses a port at random. Obviously in my environment, this will not work for me. I am unable to find such a parameter in either the Connection object or register function call (or anything else in the docs), and I didn't find anything in the driver source code using 'grep' either. As an example, JDBC has a parameter found in this table: http://www.comp.dit.ie/btierney/oracle11gdoc/java.111/b31224/dbmgmnt.htm#CHDBDJHC called "NTF_LOCAL_TCP_PORT". Is it possible to set parameters on connections as in the JDBC driver? Thanks! Geoff Weber geo...@pa... ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Weber, G. <Geo...@PA...> - 2010-06-14 13:45:44
|
I've discovered with Anthony's help that a bug in Oracle causes Python3.1 to not understand DCN callbacks in 10g or 11gR1. So now I'm using 11gR2 and things test out locally just fine. However, my environment is strictly controlled and firewall connections are managed on a one-off basis. ...so basically now I need to be able to specify the listening port of the DCN client (Python side of the connection). Unless this is specified as an option, Oracle chooses a port at random. Obviously in my environment, this will not work for me. I am unable to find such a parameter in either the Connection object or register function call (or anything else in the docs), and I didn't find anything in the driver source code using 'grep' either. As an example, JDBC has a parameter found in this table: http://www.comp.dit.ie/btierney/oracle11gdoc/java.111/b31224/dbmgmnt.htm#CHDBDJHC called "NTF_LOCAL_TCP_PORT". Is it possible to set parameters on connections as in the JDBC driver? Thanks! Geoff Weber geo...@pa... |
From: Mark H. <mh...@pi...> - 2010-06-09 08:16:55
|
On 6/8/10 9:29 PM, Robert wrote: > Can I reuse a cursor ? Yes, that is no problem. |