Forfatterarkiv: seo

How to create a temporary table in SQL Server

When you are creating SQL scripts you will sometimes need to create a temporary file. This can be done in 2 different ways in SQL Server. — The scope of this temporary table is only the SPID that created the … Læs resten

Udgivet i SQL Server - scripts | Tagget , | Kommentarer lukket til How to create a temporary table in SQL Server

Track down escalation locks

— You can use sys.dm_db_index_operational_stats to — track how many attempts were made to escalate — to table locks (index_lock_promotion_attempt_count), — as well as how many times escalations actually — succeeded (index_lock_promotion_count). — The following query shows the top 5 … Læs resten

Udgivet i SQL Server - scripts | Tagget , , | Kommentarer lukket til Track down escalation locks

How to move a Logfile to another location

— If you need to move a logfile onto another harddrive, you can do it this way. USE master GO — If this command just keeps running, then it properly is because there is connection against the database ALTER DATABASE … Læs resten

Udgivet i SQL Server - scripts | Kommentarer lukket til How to move a Logfile to another location

Enabling the SharePoint 2010 Developer Dashboard

  Although this tool is mainly designed to assist developers in creating fast code, it can also be a useful tool for the administrators by providing performance and trace information when troubleshooting slow loading/rendering pages. It can be enabled using … Læs resten

Udgivet i SharePoint 2010 Tips & Tricks | Tagget , , | Kommentarer lukket til Enabling the SharePoint 2010 Developer Dashboard

Showing the number of packages read and written in the last 30 sec.

— A script showing the number of reads/write for the last 30 sek. — Made by SeoSoft ApS — E-mail: SEO@SeoSoft.dk SELECT c.session_id, c.num_reads, c.num_writes, c.net_packet_size, c.client_net_address, st.text INTO #CONNECTIONS FROM sys.dm_exec_connections AS c CROSS APPLY (SELECT * FROM sys.dm_exec_sql_text(c.most_recent_sql_handle)) … Læs resten

Udgivet i SQL Server - scripts | Kommentarer lukket til Showing the number of packages read and written in the last 30 sec.

Create XML file for showing SQL Security settings

— This script is making an XML file showing all security setting at a SQL Server — specifying which users are member of which Server/Database roles — Perhaps I am modifying the script to show which objects user defined roles … Læs resten

Udgivet i SQL Server - scripts | Kommentarer lukket til Create XML file for showing SQL Security settings

Drop Column statistics

Are you facing suddenly poor performance, try to recreate Columns statistics. SQL Server are using these statistics to decide which execution-plan would be the best. You always have to run this script when you are upgrading your SQL server from … Læs resten

Udgivet i SQL Server - scripts | Tagget , , | Kommentarer lukket til Drop Column statistics