How to check blocking id's in sybase query execution , [closed] - sybase

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am running some update scripts in a server. Normally that will run in 20 - 30 mins. But today its taking very long time , more than 2 hrs. Will there be any block , can anyone help me how to identify the process running in tat server, and why it is running slow.

sp_who will show you the processes running on your system, the status of each process, and the spid for any blocking processes (along with other information).
You can also use sp_who USERNAME to show the processes from a specific user.
If you wan't more detailed information about what is going on in your server while you are running your query, you can use sp_sysmon to give you detailed statistics about the various actions (reads, writes, cache hits, network reads, disk access, etc.)
sp_sysmon syntax
Performance and Tuning using sp_sysmon

Related

Can differential backups interfere with the SSIS job process? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
I want to ask about the differential backup that happens in SQL Server 2012.
What I want to ask are when the job is started, will the backup plan will stop all SSIS job?
What I want to ask are when the job is started, will the backup plan will stop all SSIS job?
There is no actual need to stop SSIS jobs during the backup.
However, it still can be planned to run in own maintenance time window, which not interferes with user jobs due to reason stated below.
Backup task is fully online operation. It will not cause any locks or downtimes.
However, it can impact performance of your SSIS package because it can hit IO and network subsystems of the server.

Why the Execution time for Same SQL Query varies? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I am executing a stored procedure on my machine in SSMS and database is located on Server.
The stored procedure works properly, but every time it takes different time to execute even if all parameters are the same. Execution time varies from 1 minutes to 8 minute. I am not able to find reason for this and I am not using any DBCC command in between.
Please share your thoughts on this
Multiple possible reasons.
Slow disk, too little RAM - other operations load different data to cache
Corrupted disk - sometimes read operations delay
Heavy CPU usage in your procedure - other processes eat CPU away
Locking problems - other operations lock required tables sometimes

Transaction in middle of SQL Server Full bckup [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
If the full backup is started at 11 and completed at 4. at 2.30 there are some transaction happened. Will it be reflected on this full back up file?
Check out these links from Paul Randal.
http://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-3030-backup-myths/
http://www.sqlskills.com/blogs/paul/debunking-a-couple-of-myths-around-full-database-backups/
http://www.sqlskills.com/blogs/paul/more-on-how-much-transaction-log-a-full-backup-includes/
Like many things in the database area, it all depends.
The last article is the best since it has the picture. If the database read operation completed after the transaction, then part of the log will be in the backup.
The best way to recover to 2:30 is to do a point in time restore.
Restore the backup, any log files, and use the STOP AT command to get to the exact time you want.
http://technet.microsoft.com/en-us/library/ms179451.aspx
Transactions are related to transaction log.
So after full backup , get a transaction log backup in order to be able restore database at a certain time.

Monitoring SQLServer [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm seeking for a solution to monitor (with graphs) the status of my MSSQL instances during a periode of time (day or night) and get or make reports for that monitoring.
Does any one have or know any known simple solutions to do so please ?
Thank you for your help.
Depends on what you want to monitor. There are vendor products that will do it. Idera has Diagnostic Manager and RedGate has SQL Monitor to name just a few. Or if you don't want to spend any money SQL Server has several monitoring options including alerts, policy based management and data collection. These won't be as pretty and may not cover as much not to mention you will be writing some code on your own, but they are free (with SQL Server of course, depending on edition).
Related, though you'll want to edit the scripts for getting information is Ola Hallengren's maintenance solutions http://ola.hallengren.com/. There are useful scripts for maintenance, but depending on what information you're trying to obtain, you can build on these scripts to get information. From there, you can use the results of these queries in SSRS to populate graphs, or even use a tool like Excel.
Again, Ola Hallengren provides maintenance solutions, so these will need to be adjusted for monitoring (depending on what you're monitoring), but they are totally free and you can edit the scripts, as well as see where the information comes from so that you can determine what you need to monitor.

Sql Server performance [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I know that I can't get a specific answer to my question, but I would like to know if I can find the tools to get to my answer.
Ok we have a Sql Server 2008 database that for the last 4 days has had moments where for 5-20 minutes becomes unresponsive for specific queries.
e.g. The following queries run in different query windows simultaneously have the following results
SELECT * FROM Assignment --hangs indefinitely
SELECT * FROM Invoice -- works fine
Many of the tables have non-clustered indexes to help speed up SELECTs
Here's what I know:
1) The same query will either hang indefinitely or run normally.
2) In Activity Monitor in the processes tab there are normally around 80-100 processes running
I think that what's happening is
1) A user updates a table
2) This causes one or more indexes to get updated
3) Another user issues a select while the index is updating
Is there a way I can figure out why at a specific moment in time SQL Server is being unresponsive for a specific query?
The sp_who system stored procedure will tell you if a connection is blocked because of another query.
When a query (such as your examples) hangs, the most common cause (in my experience) is that another query is blocking it. This might be apparent.
To diagnose this, I simply uses Activity Monitor in Sql server Management Studio.
Find the node that is being blocked and through that, you can find what is causing the block. Then at least you isolate the problem. The next step is to prevent the blocking... That will certainly depend.
For me, it's been a long running BEGIN TRAN contents.

Resources