Skip to main content

Questions tagged [session]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
655 views

What are the ramifications of long open sessions?

I'm looking after a SQL server having long open sessions. There is no open transaction, or actively running query (requests) for this session. What is the reason why a session may remain open? Is it ...
variable's user avatar
  • 3,476
1 vote
1 answer
140 views

Understanding last_request_start_time and last_request_end_time in sys.dm_exec_sessions

I've been working with the sys.dm_exec_sessions dynamic management view and I'm hoping to gain a better understanding of the last_request_start_time and last_request_end_time columns. From the ...
Fajela Tajkiya's user avatar
0 votes
0 answers
39 views

Mismatch Between Transactions and Sessions in DMVs sys.dm_tran_session_transactions and sys.dm_tran_database_transactions

I've been working with several Dynamic Management Views (DMVs) in SQL Server to monitor transactions, specifically sys.dm_tran_session_transactions, sys.dm_tran_database_transactions, and sys....
Fajela Tajkiya's user avatar
0 votes
1 answer
118 views

Indexing of hash-value column vs INT IDs for session tokens

Let's say: your application should use session IDs generated with a CSPRNG, which shall authenticate your user sessions your system uses PHP 8.2 and MariaDB 10.6 Which of the approaches below ...
DevelJoe's user avatar
  • 163
0 votes
1 answer
572 views

PG Admin Sessions

I have a frontend written in MS Access that connects to a Postgres backend through ODBC. Sometimes the number of sessions reaches 100 and at that point I get an "ODBC call failed" error. I ...
Christos Arapidis's user avatar
0 votes
1 answer
758 views

Best approach for basic PHP DB session data storage

I've decided to switch from PHP's native session management based on $_SESSION to use my own, due to many different issues I've had so far with PHP's possibilities, and also because I'm building an ...
DevelJoe's user avatar
  • 163
0 votes
1 answer
106 views

Valid characters for PostgreSQL session parameters

Where can I find the list of characters which are valid for PostgreSQL configuration parameter names? By trial and error I found that '.' and '_' are valid, but ':' isn't. Quoting doesn't seem to help....
Isac Casapu's user avatar
0 votes
0 answers
365 views

See Max Simultaneous Sessions Per User

In an effort to set a reasonable sessions_per_user profile setting for shared database accounts or other non-unique account (ie. an account an application uses to log into the database for all app ...
Jeff Bauersfeld's user avatar
1 vote
0 answers
3k views

Many sessions AWAITING COMMAND

I need some guidance please. An application is going through migration and the processes seem to be quite cpu intensive. CPU utilisation on the server is very high - in the 90's. The headblocker ...
PTL_SQL's user avatar
  • 341
0 votes
0 answers
103 views

What establish a session?

As an analyst I'm running multiple queries on our Oracle ERP via Power Query (Power BI). Now, I hit some form of session limit on my default profile's session limit. How do you evaluate how many ...
Douwe van der Meer's user avatar
3 votes
1 answer
863 views

Function in same Session become increasingly slow when run multiple times concurrently

PostgreSQL 12.2 (Ubuntu 12.2-2.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit Client is Data Grip and same behavior from my report server which uses ...
James's user avatar
  • 33
0 votes
2 answers
590 views

How to connect to specific session id & serial# ? Blocked sessions

I have blocked sessions and see which session is blocking them, having session_id and serial#. Is it possible to connect to such session? How? Background: using V$SESSION_BLOCKERS I see sessions are ...
Jakub P's user avatar
  • 157
-1 votes
1 answer
107 views

Using session variables to generate GROUP information

We want to know whether the given approach is correct or not. I understand that there might other and presumably better and more optimized ways of accomplishing the task. But it is a curiosity that I ...
Subrata Das's user avatar
0 votes
1 answer
3k views

Same session ID(with same SQL text) but 3 different connection ids

I was listing out all sessions open in my sql server 2016 production server. I have issues with slow performance and i have been investigating it. I see that i have several same sessions(session_id) ...
user9516827's user avatar
  • 1,315
6 votes
1 answer
3k views

If sp_ExecuteSql creates a new session, how come I can access a local temp table created (prior to it's execution) outside of the dynamic SQL?

If local temp tables are only available to the current session, and sp_ExecuteSql creates a new session to execute the dynamic SQL string passed into it, how can that dynamic SQL query access a temp ...
J.D.'s user avatar
  • 38.3k
2 votes
1 answer
1k views

User connections without a login

I was looking at SQL Server performance and noticed that CPU utilization goes high when the number of connections go high(I believe it is normal).Usually number of connections on an average was ...
user9516827's user avatar
  • 1,315
2 votes
1 answer
433 views

Session ID in SQLCMD running multi-batch script

My script contains multiple GO keywords. I know that SQLCMD interprets GO as a batch delimiter, so the code is not run as a single block but instead each part between the delimiters (a batch) is run ...
Andriy M's user avatar
  • 23.1k
0 votes
1 answer
2k views

DBCC INPUTBUFFER shows Event Type as Language Event for an unused Database

In my production SQL Server 2016 server,i had few dummy databases created as part of migrating from SQL Server 2008. I was cleaning up all the unwanted databases and i dropped few databases.But when i ...
user9516827's user avatar
  • 1,315
0 votes
0 answers
383 views

Oracle: Replacing package body stuck

I have two schemas in my oracle database: XXX_MONITORING and XXX_MONITORING_CONFIGURATION. I had a script running on MONITORING_CONFIGURATION which is run with SQLPlus to update the database. I split ...
Adder's user avatar
  • 126
6 votes
2 answers
2k views

what is the penalty for NOT setting Disconnect users in the database when restoring backups?

setting up Log shipping between 2 sql server 2016 servers I want my databases read-only standby on the secondary server. there is a tick box saying Disconnect users in the database when restoring ...
Marcello Miorelli's user avatar
2 votes
1 answer
298 views

What connection do internal sessions belong to in MS SQL Server?

By querying select * from sys.dm_exec_connections I do not see corresponding connections for internal sessions, about the existance of which I know from sys.dm_exec_sessions DMV. My questions is ...
igelr's user avatar
  • 2,142
0 votes
1 answer
608 views

database connection and sessions in an example of social media

I am referring to MS SQL connection and sessions. I know that each application should make a connection in order to access the database, and each connection can have multiple sessions. In case of a ...
igelr's user avatar
  • 2,142
-1 votes
1 answer
9k views

Server Logs in SQL Developer [closed]

How to find session logs of the servers connected to SQL Developer, and also I need to see what statements that server is executing, I have used this, select sess.sid, sess.serial#, ...
Prem Acharya's user avatar
1 vote
1 answer
1k views

What is meant by Orphan Lock and Orphan Sessions?

I have came across this term Orphan locks and Orphan sessions and I really have no idea what that is. I have tried to search it on Google and I still haven't got any useful info/results regarding what ...
Mohammad Zain Abbas's user avatar
5 votes
2 answers
515 views

Can Status of NOEXEC be Checked with a DMV?

On larger DDL scripts for deployments, usage of SET NOEXEC ON as part of error handling is commonplace to prevent execution of downstream code. If coupled with SET NOCOUNT ON, there's a chance code ...
MattyZDBA's user avatar
  • 1,933
1 vote
1 answer
2k views

Cannot remove idle connections to a Postgres database

I need to delete a database. But the database cannot be deleted due to some active sessions using the database. I then run the command psql -c "select pg_terminate_backend(procpid) from ...
user2196452's user avatar
2 votes
1 answer
2k views

Azure SQL Databases: High number of SA connections with "BRKR TASK" and "TASK MANAGER" commands

Found out that all our Azure SQL Databases (pricing tiers S1-S2) have high number of connections/sessions from SA SA - BRKR TASK - around 60 sessions SA - TASK MANAGER - around 20 sessions Here are ...
Aleksey Vitsko's user avatar
0 votes
1 answer
677 views

MariaDB Grants for set session variables

On MariaDB, what grants are needed for set session variables? For set global are the SUPER grants. But can any client without SUPER grants set his own session variables?
Matias Ruiz's user avatar
2 votes
2 answers
4k views

How to solve repetitive ORA-2391 error in DBeaver 4.3.3.1

I can't seem to find the way to avoid ORA-2391 "exceeded simultaneous SESSIONS_PER_USER limit" when working with DBeaver 4.3.3.1. Everytime my session goes idle and I need to recconect I'm getting ...
Wendy's user avatar
  • 61
1 vote
0 answers
83 views

How to set processes parameter in oracle 11g Windows in accordance with RAM in the server

Could anyone explain me whether there is any limitation in setting processes parameter in Oracle 11gr2 and how to set sga_target according to this. Right now I have set the processes to 4000 and I ...
Enthusiastic learner's user avatar
8 votes
1 answer
2k views

Find which SESSION_CONTEXT key-value pairs was set

I found that the following query shows how many session context variables was set: SELECT cache_address ,name ,pages_kb ,pages_in_use_kb ,entries_count ,...
tanitelle's user avatar
  • 437
0 votes
2 answers
4k views

Current Active Session on a Oracle Table

I'm running a query which updates an Oracle table through Datastage. The query is taking a long time to execute so I want to examine the query/session on that Oracle table in the database and ...
Syed Mohammed Mehdi's user avatar
1 vote
2 answers
18k views

Cleanup of Oracle killed session

I killed a session ALTER SYSTEM KILL SESSION '123,456' IMMEDIATE; But it remains in v$session for 10 days, although an attached process is absent in v$processes. SELECT s.username, s.osuser,...
diziaq's user avatar
  • 131
0 votes
1 answer
14k views

How to capture all user's query on Oracle database

I have an Oracle Database installed over Unix system. On this single instance database I have a lot of sessions opened from an application pool (application is installed on another server). Every ...
tdaget's user avatar
  • 813
-1 votes
1 answer
351 views

SQL Server connection, session, command handling

I am trying to build an etl tool that tracks DMV data from SSAS Instance. To do that and in advance to record sql queries that users are request, i must know how the sql server handles the connection, ...
Stavros Koureas's user avatar
2 votes
3 answers
3k views

MSSQL - Uniquely identify an application connecting SQL Server

we are implementing a database firewall on Oracle based on a unique value associated to a given application. With this value, we can reliably identify the application, even if one changes the name of ...
Jefferson B. Elias's user avatar
2 votes
2 answers
4k views

Determine ANSI_DEFAULTS setting ON or OFF?

How can I determine if ANSI_DEFAULTS is enabled or not on my server. My server is using IMPLICIT transactions and one way from which it can affect it based on setting of ANSI_DEFAULTS. How can I ...
Ashish's user avatar
  • 727
2 votes
2 answers
1k views

Why can't I set oracle sessions value to 35?

I want to simulate the error "ORA-00018.Maximum number of sessions exceed", so I want to limit the number of sessions to 35, and open serverl sqlplus to simulate this error, but sessions number didn't ...
LawrenceLi's user avatar
4 votes
2 answers
3k views

Is it possible to obtain number of prepared statements a connection holds?

I have a heavy loaded application that holds connections persistently (it creates them on start and never releases). During the lifetime it creates and (re)uses prepared statements, which are stored ...
zerkms's user avatar
  • 143
1 vote
1 answer
102 views

Sessionizing Web Log Data using MySQL (perhaps by simulating window functions)

I have a large MySQL Table containing about 15 Million rows of web log data. Depending on the IP, useragent and site_id (different sections on the website) I want to create user sessions. The session ...
LarsVegas's user avatar
4 votes
1 answer
2k views

When does a MySQL session end?

I have a stored procedure as described below. DROP PROCEDURE `GetVoteID`// CREATE DEFINER=`u1037413_manager`@`%` PROCEDURE `GetVoteID`(IN minimum_votes INT(11), IN current_round INT(11), INOUT ...
Kristofer Gisslén's user avatar
0 votes
2 answers
1k views

Application == session == connection in DB2?

Can I consider as synonyms Applications, Sessions and Connections in DB2 LUW? In db2top, I see "Sessions". There is a command "db2 force applications", views and other stuff. And from the developer ...
AngocA's user avatar
  • 575
4 votes
1 answer
90 views

How to only update if nothing has changed? I need to validate several things before I insert

Say I have two tables: runners and waypoint_checkins. I want to add waypoint checkin entries but I can never add a waypoint if the runner has finished the race, (see below for schema). Finally. A ...
user69927's user avatar
1 vote
2 answers
14k views

Oracle systimestamp result differs in db server and client

I am getting some strange output while executing the below command on db server and on client machine connected to same db server. On DB server SQL> select systimestamp from dual; systimestamp ...
Nitesh Kumar's user avatar
0 votes
1 answer
2k views

Create a default value for session valid_until MySQL

Server version: 5.6.22 Homebrew The table: CREATE TABLE `sessions` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) unsigned NOT NULL, `date_created` datetime ...
Rowan Kaag's user avatar
5 votes
1 answer
414 views

Can an active session in oracle be dead?

I have a time consuming query which populates a materialized view. It has been running for 18 hours - which was not expected. SELECT STATUS FROM V$SESSION WHERE SID=194; The above query shows the ...
Stelios's user avatar
  • 379
1 vote
2 answers
7k views

MySQL: SELECT GET_LOCK slow/timeout

I am using "Zebra Session" as a replacement for PHP's built-in session management. Zebra Session stores sessions in a MySQL database, and uses "session locking" in order to ensure that data is ...
Mike Furlender's user avatar
1 vote
5 answers
11k views

how to check whether Oracle database is accessed or not?

I am an Oracle DBA. Application owner is asking me when was the last time Oracle database was accessed? How do I find information about the DB usage timeline? I mean, I want to check whether it is ...
Pratik Mehta's user avatar
3 votes
2 answers
16k views

How to check if current SQL session has uncommited changes?

Say you are in SQL Developer and want to check if the current user session (i.e. your connection) has uncommitted changes. If you quit SQL Developer, it does such a check and displays a dialog box ...
maxschlepzig's user avatar
6 votes
3 answers
9k views

Can you see other users' session variables in MySQL?

In MySQL, Using SHOW GLOBAL VARIABLES gives the ability to see global variables. SHOW SESSION VARIABLES are the variable settings for that session. Is there a way to see the SESSION variables of ...
edinor's user avatar
  • 143