Scriptی برای Shrink کردن Log File

این script از Eli Leiba است که جهت shrink کردن log file به یک سایز مشخصی بکار می رود:

لینک اسکریپت.

 

linked server ها(۴)

قسمت اول ،قسمت دوم ،قسمت سوم  

Linked Serverهای  Loopback شده

شما می توانید یک linked server را به گونه ای تنظیم نمایید که به خودش اشاره کند، اما چرا شما به چنین چیزی نیاز دارید؟

یک دلیل که مایکروسافت آن را متذکر شده آن است که ممکن است شما تنها یک سرور در اختیار دارید اما نیاز دارید linked server ها را جهت پیاده سازی بر روی محیط واقعی از قبل تست کنید.(یعنی می توانید این امکان را در خانه تست کنید!)

linked serverهای چرخشی همراه با یکسری اشکالاتی هم هستند--نمی توانید از آنها در view های چند قسمتی توزیع شده و یا در nested transaction ها استفاده کنید.

 یک دلیل خول دیگر جهت استفاده از Lined Serverهای چرخشی، Application Role ها هستند. یک بار که Application Role شروع به کار کرد، شما حتی با داشتن مجوزهای لازم روی شناسه ورود خود، دیگر قادر نیستید به Database دیگری روی همان سرور دسترسی مستقیم داشته باشید. این اتفاق به دلیل این است که Application Role تمام مجوزهای شناسه شما را بحالت تعلیق در می آورد و در اختیار خودش قرار می دهد. در حالیکه اکنون شما قادرید در اینگونه موارد توسط linked server ها به Database مورد نظر خودتان در سرور دیگر متصل شوید و همان مجوزها را دارا باشید و با آنها کار کنید.

توجه داشته باشید که در اینجا ترافیک شبکه مدنظر نبوده است.

Common Exception Types in c#.net

 

Exception Type

Description

System.Exception

A generic exception from which other exceptions derive

System.ArgumentException

A means of indicating that one of the parameters passed into the method is invalid

System.ArgumentNullException

Indicates that a particular parameter is null and that this is not valid for that parameter

System.ApplicationException

A custom application exception that developers can use to indicate special application errors that are not fatal

System.FormatException

Indicates that the string format is not valid for conversion

System.IndexOutOfRangeException

Indicates that an attempt was made to access an array element that does not exist

System.InvalidCastException

Indicates that an attempt to convert from one data type to another was not a valid conversion

System.NotImplementedException

Indicates that although the method signature exists, it has not been fully implemented

System.NullReferenceException

Thrown when code tries to access a variable that does not yet contain any data

System.ArithmeticException

Indicates an invalid math operation, not including divide by zero

System.ArrayTypeMismatchException

Occurs when attempting to store an element of the wrong type into an array

System.StackOverflowException

Generally indicates that there is an infinite loop in which a method is calling back into itself (known as recursion)