database-connection

SQL Server temp table not available in pyodbc code

亡梦爱人 提交于 2020-01-01 09:11:45
问题 I'm running a series of complex sql queries in python and it involves temp tables. My auto-commit method doesn't seem to be working to retrieve the data from the temp table. The code snippet I'm using below and this is the output I'm getting: testQuery=""" Select top 10 * INTO #Temp1 FROM Table1 t1 JOIN Table2 t2 on t1.key=t2.key """ cnxn=pyodbc.connect(r'DRIVER={SQL Server Native Client 11.0};SERVER=server;DATABASE=DB;UID=UID;PWD=PWD') cnxn.autocommit=True cursor=cnxn.cursor() cursor.execute

How to handle too many concurrent connections even after using a connection pool?

拟墨画扇 提交于 2020-01-01 04:52:06
问题 Scenario Say you have a website or app that has tons of traffic. And even with a database connection pool, performance is taking a real hit (the site/app may even be crashing) because there are too many concurrent connections. Question What are someone's options for dealing with this problem? My thoughts I was thinking someone with this problem could create multiple databases (possibly on different machines although I'm not sure that's necessary), each with the same information and updated at

Hibernate c3p0 connection pool not timing out idle connections

谁都会走 提交于 2019-12-31 17:53:36
问题 We have a java server connecting to a MySQL 5 database usingHibernate as our persistence layer which is using c3p0 for DB connection pooling. I've tried following the c3p0 and hibernate documentation: Hibernate - HowTo Configure c3p0 connection pool C3P0 Hibernate properties C3P0.properties configuration We're getting an error on our production servers stating that: ... Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection

Connecting to Oracle DB using Ruby

我们两清 提交于 2019-12-31 16:11:31
问题 I am stuck with connecting to Oracle DB, have read lots of stuff but no help on result. I have remote Oracle DB, I am connecting to it using DBVisualizer setting connection like this: DB Type : Oracle Driver (jdbc) : Oracle thin Database URL: jdbc:oracle:thin:@10.10.100.10:1521/VVV.LOCALDOMAIN UserIdf: SomeUser Pass: SomePass Connection works ok. What I do in Ruby is : require 'oci8' require 'dbi' ... conn = OCI8.new('SomeUser','SomePass','//10.10.100.10:1521/VVV.LOCALDOMAIN') ... What I get

Connecting to Oracle DB using Ruby

ε祈祈猫儿з 提交于 2019-12-31 16:10:41
问题 I am stuck with connecting to Oracle DB, have read lots of stuff but no help on result. I have remote Oracle DB, I am connecting to it using DBVisualizer setting connection like this: DB Type : Oracle Driver (jdbc) : Oracle thin Database URL: jdbc:oracle:thin:@10.10.100.10:1521/VVV.LOCALDOMAIN UserIdf: SomeUser Pass: SomePass Connection works ok. What I do in Ruby is : require 'oci8' require 'dbi' ... conn = OCI8.new('SomeUser','SomePass','//10.10.100.10:1521/VVV.LOCALDOMAIN') ... What I get

@mysql_connect and mysql_connect

白昼怎懂夜的黑 提交于 2019-12-31 13:30:51
问题 I have no problem connecting to a database using PHP however in some scripts I have tested, I have seen a small difference in the connect command. What is the difference between @mysql_connect and mysql_connect ? I have never used the @ symbol when writing my own script so was just wondering if it served a purpose. Thanks in advance 回答1: The @ symbol in front of a function silences it. Meaning, you won't get any types of error messages when executing it, even if it fails. So I suggest: don't

Call to undefined function sqlsrv_connect() - Troubleshooting

喜你入骨 提交于 2019-12-31 03:01:30
问题 System Information CMS: Wordpress Web Server: XAMPP PHP Version: 5.5.30 MS Management Studio 17 Goal Establish MSSQL Database connection using PHP What has been done Downloaded SQLSRV Drivers Copied files php_pdo_sqlsrv_55_nts.dll and php_pdo_sqlsrv_55_ts.dll to the directory C:\xampp\php\ext Added the following lines to the dynamic extensions part in the php.ini file: extension=php_pdo_sqlsrv_55_ts.dll and extension=php_pdo_sqlsrv_55_nts.dll Restarted Web Server Confirmed sqlsrv is listed in

Testing Connection Parameters with NHibernate

六月ゝ 毕业季﹏ 提交于 2019-12-31 02:53:06
问题 We have a program where users can specify their database connection parameters. The usual suspects including host, port, username, password, and table name. We are connecting to the database using NHibernate. What we'd like to do is be able to build the configuration with NHibernate and then test the connection parameters before continuing with other operations; notifying the user of failure. Is this possible to do through NHibernate, or will it require using each database type we support's

Laravel migrations/db:seed super slow

五迷三道 提交于 2019-12-30 16:22:08
问题 I recently upgraded from my old Windows computer into a gen. 4 I7 Ubuntu 15.04 Runs like a dream, well...Except that any Laravel artisan command that touch the database takes a million years to complete, while my old computer performed any of those commands in seconds. The major difference is that instead of XAMPP I'm running MySQL as a local service. Also in my old computer I could see how migrations slowly showed on screen as they appear to be processed while now, it takes like 2~5 minutes

SAS connection to Teradata Database using Teradata ODBC

烂漫一生 提交于 2019-12-30 11:09:47
问题 I'm trying to connect to Teradata in SAS. I set up an teradata ODBC on the machine. The assumption currently for me is that using ODBC is the only way for me to access the database. And here is the syntax of my connection command: Libname Teradata ODBC dsn = 'dsnname' uid = 'uid' pwd = 'pwd'; results: Error: The ODBC engine cannot be found. Error: Error in the LIBNAME statement. It keeps saying that the ODBC engine cannot be found. I'm really confused now. Is there anything wrong with the