<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Administration on My New Hugo Site</title>
    <link>https://sqltools.se/administration/index.html</link>
    <description>Recent content in Administration on My New Hugo Site</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 17 Dec 2022 19:36:11 +0100</lastBuildDate><atom:link href="https://sqltools.se/administration/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Generate Script for Autogrowth Settings</title>
      <link>https://sqltools.se/administration/generate-script-for-autogrowth-settings/index.html</link>
      <pubDate>Sat, 17 Dec 2022 19:43:48 +0100</pubDate>
      <guid>https://sqltools.se/administration/generate-script-for-autogrowth-settings/index.html</guid>
      <description>The below code generates tsql sripts that can be used to change file growth settings in a sql server instance.
Info Databases &amp;lt; 10GB Growth rate between 10MB and 128MB Data Databases &amp;lt; 10GB Growth rate between 10 MB and 128MB Log Databases &amp;lt; 30GB Growth rate between 128 MB and 512MB Data Databases &amp;lt; 30GB Growth rate between 128MB and 512MB Log Databases &amp;gt; 30GB Growth rate 512 MB Log if ver &amp;gt;= 2014 Databases &amp;gt; 30GB Growth rate 8192 MB Log if ver &amp;lt; 2014 Databases &amp;gt; 30GB Growth in MB but number individual for data All files should have unlimited growth rate Show current file settings -- View current file growth settings.</description>
    </item>
    <item>
      <title>Generate Code to Fix Foreignkey Constraints</title>
      <link>https://sqltools.se/administration/generate-code-to-fix-foreignkey-constraints/index.html</link>
      <pubDate>Sat, 17 Dec 2022 19:43:25 +0100</pubDate>
      <guid>https://sqltools.se/administration/generate-code-to-fix-foreignkey-constraints/index.html</guid>
      <description>List databases that have untrusted foreignkey constraints -------------------------------------------------------- -- Which databases have untrusted foreign keys DECLARE @sql nvarchar(max); SET @sql = N&amp;#39;&amp;#39;; SELECT @sql = @sql + N&amp;#39;UNION ALL SELECT DBName = N&amp;#39;&amp;#39;&amp;#39; + name + &amp;#39;&amp;#39;&amp;#39; COLLATE Latin1_General_BIN, FKsNotTrusted = ( SELECT COUNT(*) AS FKsNotTrusted FROM &amp;#39; + QUOTENAME(name) + &amp;#39;.sys.foreign_keys AS f&amp;#39; + N&amp;#39; WHERE f.is_not_trusted = 1 AND f.is_not_for_replication = 0 AND f.is_disabled = 0 ) &amp;#39; FROM sys.</description>
    </item>
    <item>
      <title>Generate Code to Fix Check Constraints</title>
      <link>https://sqltools.se/administration/generate-code-to-fix-check-constraints/index.html</link>
      <pubDate>Sat, 17 Dec 2022 19:43:01 +0100</pubDate>
      <guid>https://sqltools.se/administration/generate-code-to-fix-check-constraints/index.html</guid>
      <description>List databases with untrusted checkconstraints Just run the code below to get a list of databases that have untrusted constraints.
-------------------------------------------------------- -- Which databases have untrusted check constraints DECLARE @sql nvarchar(max); SET @sql = N&amp;#39;&amp;#39;; SELECT @sql = @sql + N&amp;#39;UNION ALL SELECT DBName = N&amp;#39;&amp;#39;&amp;#39; + name + &amp;#39;&amp;#39;&amp;#39; COLLATE Latin1_General_BIN, CCsNotTrusted = ( SELECT COUNT(*) AS CCsNotTrusted FROM &amp;#39; + QUOTENAME(name) + &amp;#39;.sys.check_constraints AS c&amp;#39; + N&amp;#39; WHERE c.</description>
    </item>
    <item>
      <title>Fix High Number of Vlfs With Dbatools</title>
      <link>https://sqltools.se/administration/fix-high-number-of-vlfs-with-dbatools/index.html</link>
      <pubDate>Sat, 17 Dec 2022 19:41:13 +0100</pubDate>
      <guid>https://sqltools.se/administration/fix-high-number-of-vlfs-with-dbatools/index.html</guid>
      <description>This scrips make use of DBATools to fix a high number of VLF:s in the transaction log. A huge amount of virtual log files VLF is ususally refeard to as a fragmented transaction log. That is often an outcome of using percent growth for the transaction log. Doing that can generate a very fragmented file even for rather small log file.
Steps to defragment a transaction log. Info List which databases on the server that have a high number of VLF:s Verify the current autogrowth settings.</description>
    </item>
  </channel>
</rss>