Questions tagged [session]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
180 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 ...
0
votes
0answers
208 views

Can't cancel query in Redshift

I have run a SQL in redshift and it hangs over 1 hour(Even doing explain on the SQL). I tried to use cancel/pg_cancel_backend/pg_terminate_backend to cancel/terminate the session. It seemed the ...
0
votes
0answers
59 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 ...
0
votes
0answers
23 views

oracle ASH session objects

I wonder how does ASH or Oracle Enterprise Monitor (OEM) resolves object names, to report objects used most heavily. In DBA_HIST_ACTIVE_SESS_HISTORY we read: SESSION_SERIAL# Session serial number (...
1
vote
2answers
665 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 ...
2
votes
1answer
80 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 ...
0
votes
1answer
36 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 ...
-1
votes
1answer
2k 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#, ...
1
vote
0answers
111 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 ...
5
votes
2answers
328 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 ...
1
vote
1answer
813 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 ...
1
vote
1answer
787 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 ...
0
votes
1answer
265 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?
1
vote
2answers
408 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 ...
1
vote
0answers
67 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 ...
6
votes
1answer
905 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 ,...
0
votes
2answers
1k 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 ...
1
vote
2answers
6k 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,...
0
votes
1answer
2k 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 ...
-1
votes
1answer
209 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, ...
2
votes
3answers
1k 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 ...
1
vote
2answers
1k 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 ...
2
votes
2answers
649 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 ...
0
votes
1answer
953 views

Sessionizing Log Data Using SQL window functions: tweaking a query (incrementing session ID and event length)

I'm referencing to a very good blog entry, that describes how to sessionize log data with SQL window functions. I'm no database pro and I don't really understand the logic behind this query (you can ...
1
vote
1answer
78 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 ...
4
votes
1answer
1k 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 ...
0
votes
2answers
978 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 ...
4
votes
1answer
85 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 ...
1
vote
2answers
12k 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 ...
0
votes
1answer
1k 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 ...
5
votes
1answer
275 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 ...
1
vote
2answers
4k 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 ...
1
vote
5answers
8k 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 ...
0
votes
0answers
795 views

Proper usage of last_insert_id() in PHP procedure

I have a problem with performing sql query from php script. The query in sql looks like this: INSERT INTO `table1` VALUES (NULL, 'Blah', 'blah', 'blah', 'blah'); SET @lastID = LAST_INSERT_ID(); ...
2
votes
2answers
8k 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 ...
3
votes
3answers
5k 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 ...
0
votes
1answer
743 views

too many entries for one single session and serila# in V$Session_longops

I have a concern with the entries in v$session_longops. I used a query to identify query running from past 25 minutes for sid=62 which is given below: SELECT s.sid, s.serial#, s.machine,...
0
votes
1answer
64 views

How to find a session with a specific command

I have an Oracle instance with some active sessions from different users. How can I find the SID/SERIAL of a specific session given that this session is surely running a specific SELECT I know?
2
votes
1answer
25k views

How to change SESSION_CACHED_CURSORS for all sessions

how Can I do to change SESSION_CACHED_CURSORS for all sessions? I found on google and oracle website: Alter Session... but I need to changed it for all the session and not only for one of them. How ...
0
votes
0answers
834 views

Oracle prevent CPU usage per process/session

I have an Oracle instance to which several applications from different machines connect (http servers). Normally Oracle CPU usage is ~5-10% even on high server loads. But from time to time, one of ...
2
votes
1answer
5k views

Diagnosing Blocking issues using Blocked Process report

I have an application that is going down as a result of timeouts. During these times we see a massive spike in response times from the database that holds ASP session state. In an effort to to ...
3
votes
2answers
5k views

How are DB locks tied to connections and sessions?

I've heard of page- and row-level locks, but never heard them used with regards to sessions and connections. Today, our (MySQL) DBA was talking about row locks and implied that their scope can be set ...
0
votes
2answers
249 views

Is there a combination of columns in sys.dm_exec_sessions that is unique per the server?

In SQL Server, each session has its own spid. Spids are unique at any given notice, but spids, like process and thread identifiers in the OS are recycled. However sys.dm_exec_sessions has other ...
7
votes
1answer
10k views

ASPState database locking and growth problems

We use an ASPState database to persist .NET Session state on a SQL Server 2005 cluster. We are seeing some strange behavior during peak periods The DeleteExpiredSessions proc is run every minute via ...
2
votes
0answers
664 views

Oracle locked sessions with ASP.Net

I am connecting to an Oracle database in ASP.Net using SQLDataSource. My connection string is: <add name="ConnectionString3" connectionString="Data Source=sml; User ID=sml; Password=sml; Unicode=...
2
votes
2answers
2k views

Oracle - How can I find the session id of a shell script (Linux)?

I have a Linux script run periodically from crontab which executes some sql scripts. How can I get/identify the session of that running job? thanks
5
votes
2answers
12k views

Session in “Sql*net message from client”, but is active

I've Googled around, and my impression is that Sql*net message from client suggests the Oracle DBMS is waiting for the client to send new commands to the DBMS, and therefore any time spent in ...
2
votes
1answer
160 views

Associate a piece of data with a session

I think I want to associate a piece of data with each session. The association must have the following properties: The data being associated is provided either as a part of connection string (if ...
43
votes
4answers
111k views

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 ...