Langsung ke konten utama

Postingan

Monitoring performance Azure SQL Database using dynamic management views

Microsoft Azure SQL Database enables a subset of dynamic management views to diagnose performance problems, which might be caused by blocked or long-running queries, resource bottlenecks, poor query plans, and so on. This topic provides information on how to detect common performance problems by using dynamic management views. SQL Database partially supports three categories of dynamic management views: Database-related dynamic management views. Execution-related dynamic management views. Transaction-related dynamic management views. Identify CPU performance issues If CPU consumption is above 80% for extended periods of time, consider the following troubleshooting steps: The CPU issue is occurring now If issue is occurring right now, there are two possible scenarios: Many individual queries that cumulatively consume high CPU Use the following query to identify top query hashes: Long running queries that consume CPU are still running Use the following query t...

Unused Index Script - SQL Server

Anyway, the scripts is a good starting point. You should pay attention to User Scan, User Lookup and User Update when you are going to drop the index. The generic understanding is if this value is all high and User Seek is low, the index needs tuning. The index drop script is also provided in the last column. Query Listing All the Indexes Key Column with Included Column That’s a great script (as yours always are), however I think you are missing another class of “missing indexes”, and that is indexes that don’t have stats at all. Rows are only written to dm_db_index_usage_stats when an index is used. If that index is totally un-used (even for writing to), it won’t appear in dm_db_index_usage_stats and therefore won’t be included in your script. Try this on a production system, you might be surprised by how many rows it returns:

DemoHelper tool buat Coret-coret Layar Komputer

Salah satu tool untuk membatu presentasi.  Sample : Zooming Mode up zooms in down zooms out enter or left mouse click activates drawing of the zoomed area escape cancels zooming mode Zooming is also possible using the mouse wheel. Drawing Mode up/down or Ctrl+Mousewheel increases/decreases the size of the drawing brush right or Mousewheel cycles through the available brush colors 0-9 select the brush colors Shift while drawing forces horizontal/vertical drawing Control while drawing drawing straight lines right mouse-drag draws arrow lines right mouse-drag with control key pressed draws straight lines escape quits drawing mode backspace removes the last line drawn delete removes the first line drawn E removes all drawn lines M toggles the marker on/off T toggles between solid and merged drawing Z select a rectangle to zoom in C clears the screen with the background color

Last executed queries on SQL Azure Database (Basic tier)

SELECT TOP 100     execquery.last_execution_time AS [Date Time], execsql.text AS [Script] FROM sys.dm_exec_query_stats AS execquery     CROSS APPLY sys.dm_exec_sql_text(execquery.sql_handle) AS execsql     ORDER BY execquery.last_execution_time DESC source :  https://stackoverflow.com/questions/39322918/last-executed-queries-on-sql-azure-database-basic-tier

special characters in XML

Just five: &lt; (<), &amp; (&), &gt; (>), &quot; ("), and &apos; ('). For normal text (not markup), there are no special characters except < and &: just make sure your XML Declaration refers to the correct encoding scheme for the language and/or writing system you want to use, and that your computer correctly stores the file using that encoding scheme. See the question on non-Latin characters for a longer explanation. Apart from the invisible ASCII control characters (the ones you can't type), all other characters are just normal text. Currency signs (€, £, $, ƒ, ₨, Ƀ, and others), all the punctuation (except < and &), and all other letters, signs, and symbols in any language or writing system are just text (assuming you have the correct character encoding). If your keyboard will not allow you to type the characters you want, or if you want to use characters outside the limits of the encoding scheme you have chosen, you can...

How to add the user to Windows Azure Sql Server

This will open the new query wit connection to master database.  Note that you have to open the SQL editor with master database ! Then type following in the query in the editor:  CREATE LOGIN  yourusername  WITH password=’ YourPwd123 ‘; This will create the new LOGIN in the master database. Now execute following statement in the same editor: CREATE USER  yourusername  FROM LOGIN  yourusername  ; This statement will create the user from specified login in the  master  database. After that we need the to select wanted database (as in previous step, but this time you will not select  master  database) and open the query window. In that window enter same script as in previous step: CREATE USER  yourusername  FROM LOGIN  yourusername  ; This statement will create the user from specified login in your database. For example if you want to add it in the role of owners do following:  EXEC sp_addrole...