One or more connections to a database or database server. For questions about establishing a connection, use the connectivity tag instead.
Questions tagged [connections]
237 questions
109
votes
4 answers
How to use sqlplus to connect to an Oracle Database located on another host without modifying my own tnsnames.ora
I want to connect to an oracle database located on another host using sqlplus. This page suggested adding an item on my tnsnames to connect to that database
local_SID =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= hostname.network)(Port=…
Louis Rhys
- 1,285
- 4
- 11
- 8
94
votes
4 answers
How to drop all connections to a specific database without stopping the server?
I want to drop all connections (sessions) that are currently opened to a specific PostgreSQL database but without restarting the server or disconnecting connections to other databases.
How can I do that?
sorin
- 1,242
- 3
- 11
- 14
79
votes
3 answers
What is the difference between a connection and a session?
What is the difference between a connection and a session and how they are related?
jrara
- 5,393
- 20
- 58
- 65
41
votes
3 answers
Is a Postgres long-running query aborted if the connection is lost/broken?
If I open a connection to Postgres and issue a long-running query, and then break the connection (e.g., kill the client process that opened the connection), will the long-running query continue to run, or will it be automatically aborted? Is this…
Rob Bednark
- 2,253
- 6
- 22
- 22
25
votes
2 answers
Max number of user connections
In SQL Server 2012 Standard edition, I know that the max number of user connections is 32,767. What should I do as a DBA if I am heading towards this number?
Currently there are 30,000 user connections, and this number is expected to increase.
sebeid
- 1,415
- 2
- 17
- 29
21
votes
5 answers
Azure SQL Database "Login failed for user" in application, but works fine in SSMS
I wanted to try out the contained database users feature on Azure SQL Database V12, but I'm having a problem authenticating that seems odd to me.
I created a database called Classifier. I added my IP to the firewall rules so I could connect to…
Ben Collins
- 312
- 1
- 2
- 9
19
votes
4 answers
How can I check if connection to Sql Server is encrypted?
In SQL Server I can "Force Encryption" in protocols settings. If I leave that set to "No" any client can still require encryption.
Can I somehow see what connections to the database are using encryption?
Mathias Rönnlund
- 305
- 1
- 2
- 7
14
votes
7 answers
How to solve "Can't connect to local MySQL server through socket" error?
I kept getting this following error every time I tried to restart MySql. It was working fine before I changed the default data directory.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib …
MahuLovzYou
- 141
- 1
- 1
- 3
13
votes
4 answers
Find all IP's or users who access a specific SQL Server
Let's say I found a SQL Server and I have no idea which applications connect to it. Maybe I find one application but I am not sure if it is the only one using it.
Is there a nice way of finding all distinct connections?
RayofCommand
- 1,373
- 5
- 15
- 31
12
votes
6 answers
How to deny access to SQL Server to certain login over SSMS, but allow over .Net SqlClient Data Provider
We have a situation where Developers do not have any UPDATE permissions, BUT they work with applications and see connection strings -> they know passwords from some SQL accounts (example SQLLogin1) that have UPDATE permissions. Our operations…
Aleksey Vitsko
- 6,148
- 5
- 39
- 70
10
votes
4 answers
Logon failed for login due to trigger execution
I have been trying to login using one of my sql server logins but I am getting the error message below:
General Error Message
Copy Message Text
TITLE: Connect to Server
------------------------------
Cannot connect to…
Marcello Miorelli
- 17,274
- 53
- 180
- 320
10
votes
2 answers
What reason could cause AWS RDS connections to spike
It's my first time using RDS on AWS, I use a t2.medium instance running MySQL Aurora with default configs. The CPU usage and DB connections is quite normal until "something" happens, which causes the DB connections go all the way up to its maximum…
TrungDQ
- 199
- 1
- 1
- 7
9
votes
1 answer
How to limit the connections per host in MongoDB?
I'm running a mongo server which accepts connections from other clients through java driver. The thing I have noticed is after a while some users open too many ports, and this prevents other users to connect to the mongo. They create only 1…
itaied
- 235
- 2
- 3
- 7
9
votes
1 answer
SQL server temp table using # - is it only accessible by the containing query for multiple connections with the same login?
Say we have 2 completely different queries, that reference a temp table with the same name:
query one
....operates on:
#tempTableName
query two
....operates on:
#tempTableName
I've researched this and found out that "#temp is a local…
Chris Halcrow
- 265
- 1
- 5
- 10
7
votes
2 answers
Are CNAME aliases for connection strings a good idea?
To be very flexible and move database to different servers more easily, we came up with the idea of using an alias per database. So by simply changing a DNS entry, we can route all queries to a different database server without changing the…
SwissCoder
- 369
- 1
- 4
- 11