Questions tagged [database-connection]

1

votes
1

answer
636

Views

Mongo-Go-Driver Failing to Connect

So I am trying to use https://github.com/mongodb/mongo-go-driver to connect to a mongo database in golang. Here is my connection handler: var DB *mongo.Database func CreateConnectionHandler()(*mongo.Database, error){ fmt.Println('inside createConnection in database package') godotenv.Load() fmt.Pri...
Peter Weyand
1

votes
1

answer
23

Views

How to Execute couchbase N1ql query through java [closed]

i am getting a N1Ql query as a string through another service as a input, so i want to execute it by making a connection to couchbase
Shubam Garg
1

votes
0

answer
718

Views

Tableau could not receive data from server: Software caused connection abort

I have a Tableau (reporting) server on Windows 10 that internally uses PostgresDB. Besides I have a PostgresDB, where my data is located, so reports are aggregated using this data. What should our end-user experience? - He or she opens in a web browser a report by url and see the data. For some rea...
Marcel Mars
1

votes
1

answer
479

Views

How to make Spring Boot application run despite whether a datasource is available

In my Spring Boot application, a datasource is configured. application.properties is like: spring.datasource.url=jdbc:mysql://localhost/test_db spring.datasource.username=test spring.datasource.password=test The application code looks like: public class Foo { @Autowired private JdbcTemplate jdbcTemp...
Yu Hao
1

votes
0

answer
413

Views

Connecting to Informix Connection Manager Using JDBC

I need some clarification on how (some) JDBC drivers connect to (Informix) Databases. We had the issue of 'connection refused' when trying to connect to Informix connection manager from a Java application via JDBC,although access was granted via firewall. When we consulted Informix Team,they told us...
selman
1

votes
2

answer
77

Views

Where is it better to initialise the Database connection [closed]

I am working on a project, while doing coding I got confused, as to where to initialize the connection in the constructor of the class or in the function I am using it. My code in the constructor is as below: public class clsTest { private readonly MySql.Data.MySqlClient.MySqlConnection _dbInstance;...
Ram Singh
1

votes
0

answer
57

Views

Connecting to two diffrent data bases using Pro* C code

how can we connect to two different databases using Pro* C code. I have entries in tnsnames.ora file. By default it is connection to one of the Databases using EXEC SQL CONNECT statement which I am not sure how it is connecting. I want to connect to another DB which is having an entry in tnsnames.or...
Vijay Kumar
1

votes
1

answer
329

Views

Connecting UWP App to Remote SQL Server 2008 provider: TCP Provider, error: 0

System.Data.SqlClient.SqlException: 'A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The operation completed successfully)' I'm trying to connect to SQL Server 2008 R2 database with a UWP APP. Remote...
Lee
1

votes
1

answer
546

Views

IntelliJ/PyCharm: Connection to localhost MySQL failed

I am using PyCharm to connect to my local MySQL database running at localhost port 3306. Here's my JDBC url in the 'Data Sources and Drivers' window as shown by PyCharm: jdbc:mysql://localhost:3306/mydb When I try to connect or click 'Test Connection' I am getting this error in IntelliJ: Error: Conn...
Babken Vardanyan
1

votes
1

answer
905

Views

Python 3.4 - Sybase ASE connection

I would like to connect to a Sybase Ase 15 db with Python. Unfortunately I couldnt find any working solution for Windows with Python 3.4. Could anyone refer something? I tried with a few without luck. Can I use OleDb driver (dll) maybe somehow? It would be great something free which is updated recen...
hkoko
1

votes
0

answer
410

Views

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. provider: SSL Provider, error: 0

I have an exe which runs twice a day. I am getting the error when the exe runs in the morning but works fine in the evening. The exe generates logs and it logs the below error: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (pro...
Swapnil Khanorkar
1

votes
2

answer
373

Views

HBase Spark connection options [Java]

I am trying to access HBase from a java Spark application running on YARN, but I need some clues on how to do it. I've already searched online, but I cannot find definitive answers. Here they are: The basic one: how do I interact with HBase from Spark? Do I need to set up an HBase connection on each...
riccamini
1

votes
0

answer
190

Views

Is there a way to setup 2 separate DB pools on a Sequelize connection with replication enabled?

Read Replication Docs I'm essentially trying to decouple the number of connections my master and slaves get in order to maximize the number available connections and load across my read replicas. I'm currently looking for a quick an easy optimization for a Heroku hosted application (40 dynos) that i...
asdfqwer
1

votes
0

answer
379

Views

Rails ActiveRecord with_connection idle db connections leaked?

I have a small rails app that spawns new threads to update itself in the background until a certain condition is met. class SomeModel < ApplicationRecord def self.some_action if some_condition Thread.new do begin sleep some_arbitrary_time ActiveRecord::Base.connection_pool.with_connection do update(...
Alfaro
1

votes
1

answer
1.1k

Views

Microsoft SQL Server 2016, Error: 1068 AND Error: 3417 AND Error: 1225 in Windows 10 Pro

When try to connect to SQL Server from Microsoft Server Management Studio, I got an error: 1225 occurred; few days ago, it was working fine, but now this error occurs: When try to start SQL Server from Services (local) Error 3417 occurred When try to start to SQL Service Agent through services, then...
Coder...
1

votes
0

answer
52

Views

Unable To Connect to External Data Source Via EBS instance

We have a database server hosted on Jealastic PaaS and our java application created in EC2 via EBS. I'm connecting to the Jelastic DB locally via Mysql Workbench and it's working properly. But, while connecting via EBS it's giving the following exception. I'm not sure from how/where it's replacing t...
Pankaj P
1

votes
1

answer
202

Views

Azure Sql and Azure Web App loosing connection

I run a web application on Azure and it connects with Azure Sql. This has worked without any problems for a few years now. But today I have started to get the following message: The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured...
Dennis C
1

votes
0

answer
76

Views

How to know if SqlSessionTemplate has closed the DB connection gracefully

I am using MySQL with Spring and SqlSessionTemplate. I know SqlSessionTemplate automatically close a connection after it has been used, so we don't need to do anything about this. But when I checked my MySQL status I found out that Aborted_clients is too high. total connection is 26030 and Aborted_c...
closering
1

votes
0

answer
42

Views

Large sql dump to be importend into Oracle Express database

can you plese give an advice on how to import into Oracle Express database an large sql dump (over 6 GB). Oracle Express is designed to deal with such a large import because when I try to import via @/path to file.sql I'm getting all kind of errors regarding the size of import and the database conn...
SocketM
1

votes
1

answer
482

Views

MySQL Error 2013: Lost connection to MySQL server during query

I've read all post with the same or very close headline, but still can't find a proper solution or explanation to my problem. I'm working with MySQL Workbench 6.3 CE. I have been able to create a database with several tables, and create a conexion with python to write data to it. Still, I had a prob...
puppet
1

votes
0

answer
63

Views

Connecting to MySQL Database with Aulux Barcode software

I have a local MySQL Database which stores all the details for my Point of Sale software - Unicenta oPOS. I am able to connect to the database just fine with Unicenta and with my website software. I am trying to use a piece of software called Aulux Barcode Label Maker 7 to create labels for my prod...
NewfieTechie
1

votes
0

answer
28

Views

Dynamic connection to Database ASP.NET

I want write autorization system in asp.net - user of Postgres (which created throws CREATE ROLE...) entering login and password and working with own tables. Problem is i working in ASP.NET core and connecting throws Dapper. appsettings.json { 'Logging': { 'IncludeScopes': false, 'LogLevel': { 'Defa...
Travis Bincle
1

votes
0

answer
279

Views

Connecting Spring Boot app to the MySQL Database

I have created a Spring Boot app and I am trying to connect the same to MySQL database. The database.sql file that I have included looks like below: Database.sql snapshot However, for some reasons, I am unable to select any Name and Database options from the down drop. However, I am able to run th...
P.K.
1

votes
0

answer
222

Views

Django Connection Pooling to Postgresql

After two days of searching, I thought someone here might be able to help me. I am using Python 3.6 and Django 2.0.4 and pulling client data from a Postgresql database. We process the data to create trends for each client. We then check to see if a trend currently exists and either add a new one or...
GeorgeLPerkins
1

votes
3

answer
44

Views

Passing images to Java

I am working on a project where I have extracted images from sensor and saved them to the operating system directory. I have a Java API for uploading images to the server. I need to upload these images and some other data typically float data type to the main server. I need to decide an inter-media...
Alee
1

votes
1

answer
68

Views

Check connection details to SQL Server 2000/2005

I want to migrate some DBs hosted on SQL 2000/2005 to SQL 2014, I don't have direct access to DBs and I want to know all applications connecting to it and connection details. Is there any best way to get this information? I tried using DB profiling but its not allowed as its taking up lot of space o...
Rahul
1

votes
1

answer
331

Views

Oracle connection string to use Oracle Native Client 12 specifying driver

I have simple c# application that conencts to Oracle 12c. User provides information about their Oracle server: host, port, service name, user name and password. On the machine where application is launched i have 'fat' Oracle Native Client 12.02.00.01 installed together with my app. I need a connect...
tkond
1

votes
0

answer
79

Views

mysql: Cpanel Database connection php_network_getaddresses error

I am facing database connection error in Cpanel hosting with below code; Error Log... Connection failed: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
Mir Karam
1

votes
0

answer
10

Views

org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData

I have created a micro service and it runs fine in production for 3-4 weeks. Its a low volume service with few calls every couple of days. After 3-4 weeks all requests starts failing with below message in the logs 2019-04-15T22:33:17.628901587Z 2019-04-15 22:33:17.627 WARN 1 --- [nio-8080-exec-5] o...
user11380842
1

votes
0

answer
32

Views

Tomcat jdbc connection pool - idle connection is not created after abandoned was removed

I've configured to have a least 10 idle connections in my connection pool. Sometimes due to unknown reason I there are some abandoned connections that are stuck. To remove then I added configuredDataSource.getPoolProperties().setRemoveAbandonedTimeout(300); configuredDataSource.getPoolProperties()...
Vitalii
1

votes
0

answer
57

Views

SQL-Server with Visual c++ , connection fail ( SQL_ERROR)

Hi i'm just doing a connection with c++ to SqlServer , i'm using de IDE VS 2017 ,SQL Server 2017 On runtime I get a error of SqlServer (its like a mem dir or something like that because it change between executions) These are my vars: SQLHANDLE SQLEnvHandle = NULL; SQLHANDLE SQLConnectionHandle = N...
1

votes
1

answer
272

Views

Best practices to avoid “Too many connections” error

I recently noticed several 'Too many connections' errors on my site. I know the reasons and ways to 'solve' this problem but I have to admit that I don't know the best practices to avoid this problem or how to improve my code. I will post a theoretical code (Please assume that everything is working)...
suicidebilly
1

votes
1

answer
56

Views

What is the optimal connection pool max for Heroku Postgres' 'Standard-0' database?

I'm just configuring a system for production and we have chosen Heroku's Postgres Standard-0 as the database. This states the maximum connections is 120 but I am aware that this does not mean I can set Sequelize's POOL_MAX to 120 as there are other considerations. From experience, what would be an...
Dave Sag
1

votes
0

answer
31

Views

Connecting/Querying Data Access Database in C# using DBLINQ

Bear with me, I'm new to databases. I have an Access database, 'Database.accdb'. It's located on my local computer: 'C:\Users\MyUserName\Documents\Database.accdb'. I have a C# program trying to establish a connection with this database. I attempt to create a class derived from DbLinq Datacontext. na...
Misha
1

votes
1

answer
39

Views

What is the correct way to sync a database?

Assume I have one large database (mongoDB for example) that is used by many users and is installed on a server. I'm building a desktop application that should be able to interact with the database and should also be able to function temporarily if the internet connection is lost. My idea is that lo...
ninesalt
1

votes
0

answer
36

Views

Does missing logout event in SQL Server trace mean connection leak?

I am investigating possibility of unreleased SQL Server database connections. I ran SQL Server Profiler and collected event traces. Typically after an executed SQL command, I see 'Audit Logout' event and often exec sp_reset_connection that indicates that connection is reused for a new command. Howe...
Vagif Abilov
1

votes
0

answer
242

Views

Change Connection String dynamically from user input using Spring Boot

Requirements - My Application have multiple clients having their own database servers and database name, but all databases have same structure( as in tables and Keys ) . I want a plug-in service, where when client login and register its connection string in our local database. Our application fetch...
1

votes
0

answer
117

Views

H2o in R Connection reset by peer

I am running h2o in R using h2o.glm(). For some reason I keep getting this error: CURL ERROR: Recv failure: Connection reset by peer I varied the size of my cluster and dataset and yet the connection seems to break. Does anybody know how to solve this I am running out of ideas! Thanks in advance, J
jjm
1

votes
3

answer
39

Views

Increment of column ID

I've got two methods, one is used to insert data into db, the another one is to delete them. So let's say I've added 3 rows which have id=1, id=2, id=3. Now i decided to delete the last one and again insert 1 row. so insted of having three rows with ids 1,2,3 I've got three rows with ids 1,2,4. How...
uiguyf ufdiutd
1

votes
0

answer
114

Views

Tomcat 8.5.31 shutdown issue with Connection pool with timeBetweenEvictionRunsMillis

Am using Tomcat8.5.31 while shutdown the process still exists when i grep. After debugging i seen a weird issue where am using connection pool with attribute timeBetweenEvictionRunsMillis if i remove the attribute from resource then shutdown is working properly. Please help me out what will be the...
sunil

View additional questions