I am looking at the activity monitor in MS SQL Management Studio 2005, and I see an entry from a login that I created, and it's using the tempdb, and the last command is always "SELECT INTO". And everytime I hit "Refresh" in activity monitor, that entry's "CPU" column goes up by like 60. The "program" of that activity is "MS SQL Management Studio."
I tried to kill that process, but it won't allow me, saying "cannot be killed". I disconnect from the database and reconnect, and that process is still there.
Is it gonna eventually crash my SQL Server because of continous activity? And is anyone familiar with this situation?
Thanks!
This is absolutely normal. The Select Into is selecting data into a temp table to show you what you see in the Activity Monitor. No need to panic. It will not crash your SQL Server.
Raj
That is you. More specifically SSMS. Typically it will SELECT INTO some temp table (something it calls, will do it actually) in order to get data from the server to display to you. Open another SSMS and you should see two of them.
Related
I was wondering if there is there a tool or a way to view which statements cause a block/lock and which objects would be affected? I know about sp_who and sp_who2, but those only work while the system is running.
For example, I know running this:
UPDATE myTable SET col1 = 'something'
Will put a lock on "myTable", but there are more complex scenarios (like nested procs and triggers) that would be more difficult to identify.
I was hoping for tool like the "Actual Execution Plan" built-into SSMS, but other tools, queries will suffice
Thanks all
You can refer this blog and follow the different ways to identify the blocks:
sp_who2 System Stored Procedure
sys.dm_exec_requests DMV
Sys.dm_os_waiting_tasks
SQL Server Management Studio Activity Monitor
SQL Server Management Studio Reports
SQL Server Profiler
Also check: Different techniques to identify blocking in SQL Server
You can use SQL Activity Monitor (right click on the SQL instance in SSMS) to get a list the number of current locks etc and you can use the 'Task State' column of the 'Processes' panel in there to see currently running statements which will tell you if things are blocking.
These all focus on activities which are currently executing though, so I'm not sure this will be what you want.
SQL Server 2012. Using SQL Server Profiler. How can I set the trace to only display to the results table audit type details? Such as whoever logged in, when a user makes a CRUD query, date and time etc. Just to be able to log and see who made changes in case anything happens at the database level.
Basically I do not want to include all of the stored procedures from displaying.
Thank you.
When you click on new trace in the profiler, go to Events Selection tab in the trace properties window and select whichever event you want to log.
Regards,
Sumit
My users are receiving the query timeout error when they try to insert data to SQL server 2008 through an Access 2010 form. The error msg specifically occurs when users move off the record having keyed in all data fields.
When I look into Activity Monitor in SQL Server I can see many blocked SPIDs throughout the day but they do soon clear up. I don't know why this happens and the only solution seems to be restarting the SSMS Services. I don't think its a memory issue as the server has got 8GB which is plenty. The SQL DB is only 400 MB, but there are many transactions taking place across 2 sites.
I do notice that the SSMS memory consumption is around 3.5GB at the time of this error. After the restart this goes down of course.
Where do I start looking? is it network related or is it a blocked process due to local VBA code which could be moved to SQL Server? or is it cache related?
I'm no DBA so not sure of how to go about the search.
Thanks
I'm using Oracle SQL Developer 3.0.04. Trying to connect to a remote DB. Don't have any issues with database connection, it connects.
But when trying to view a selected tables rows a small progress bar within a small dialog box titled "Display Results" appears saying "Waiting for Checking if Object is Editable" and the progress is stuck. Cannot see any data of the selected table.
I tried to export the schema and data, but it freezed at once. So I closed SQL Developer.
Tried to attempt that again but now cannot even view the tables details.
Used TOAD in another machine and connected using that, no issue then the table listed all the data. Checked on the remote machine using putty and "sqlplus" to connect and the data showed as expected.
So that tells me that something in my local machine is wrong. Cannot connect using SQL Developer. Has anyone out there faced similar issue? please any idea on this matter?
Thanks
Did you try connecting to any other database, remote and local ? Does this happen with every database or only one connection? Perhaps something is wrong with that installation folder of SQL Developer, perhaps something got corrupt while it was stuck. Perhaps try to download the latest version of SQL Developer from this link and try again.
I have a SQL Server 2000 box that houses several databases, some of which are probably no longer in use. I'd like to clean things up by first taking them offline, and then later removing them all together. The problem is that I don't know how to tell which of these are still being actively used (outside sources may or may not be connecting to them, using them, etc.)
Is there a way to tell the time of the last activity on each database? I know that SQL Server keeps records of some things in sys tables, but I'm not sure what exactly is stored there. If what I need cannot be found there, is there something I can set up to track usage from this point forward? Ideally, I'd like to be able to see usage "up to this point in time", but "from this point forward" would be better than nothing. Thanks.
Try turning on auditing for logging into SqlServer. Based on user accounts used, you can see if that database is used or not.
The auditing can be found here:
EnterpriseManager -> Right click database server -> Properties
-> Security -> Audit Level -> set to All
This will fill up the logs that you can see under /Management/SqlServerLogs and that log is typically also saved in here C:\Program Files\Microsoft SQL Server\MSSQL\log\, so you could parse & search through it.
As far as I know, there's nothing built in to SQL Server to give you a "last used" date/time. Going forward, you could track usage by running a query like this on a regular basis.
select db_name(dbid), count(*)
from master..sysprocesses
group by db_name(dbid)
order by db_name(dbid)