Forum Replies Created

Viewing 15 posts - 16 through 30 (of 47 total)

  • Reply To: TRIM() in T-SQL

    "I don't know why they made this decision instead of structuring things like this..."

    Because now you don't have to overload TRIM() with 2 definitions (one with 1 parameter, one with...

  • Reply To: Limiting Access on Startup

    It also limits the number of connections to 1.

    And technically, you don't limit the access to sqlcmd, you limit the access to any application that says it's sqlcmd.

  • Reply To: The Basics of PowerShell Day By Day

    Filter vs where-object:

    Filter = SELECT only columns you need WHERE only rows you need

    Where-Object: SELECT * without WHERE, and then filter in the application

  • Reply To: The Basics of PowerShell Day By Day

    The decision which properties are shown by default for get-service is done by an XML file called 'types.ps1xml' in C:\Windows\System32\WindowsPowerShell\v1.0

    In this file you will find the following XML block:



    <Type>
    <Name>System.ServiceProcess.ServiceController</Name>
    <Members>
    <MemberSet>
    <Name>PSStandardMembers</Name>
    <Members>
    <PropertySet>
    <Name>DefaultDisplayPropertySet</Name>
    <ReferencedProperties>
    <Name>Status</Name>
    <Name>Name</Name>
    <Name>DisplayName</Name>
    </ReferencedProperties>
    </PropertySet>
    </Members>
    </MemberSet>
    <AliasProperty>
    <Name>Name</Name>
    <ReferencedMemberName>ServiceName</ReferencedMemberName>
    </AliasProperty>
    <AliasProperty>
    <Name>RequiredServices</Name>
    <ReferencedMemberName>ServicesDependedOn</ReferencedMemberName>
    </AliasProperty>
    <ScriptMethod>
    <Name>ToString</Name>
    <Script>
    $this.ServiceName
    </Script>
    </ScriptMethod>
    </Members>
    </Type>

    The columns...

  • Reply To: The Basics of PowerShell Day By Day

    Get-Module only lists the currently loaded modules, if you want a list of all installed modules you need to use 'Get-Module -ListAvailable'.

  • Reply To: Assignment of a value to a variable

    Since answer 2 and 5 are the same, they can't be the correct answer. So that leads almost automatically to the right answer.

  • Reply To: Read Only Files

    The documentation doesn't mention 'rt' at all, only 'r' and 'rb': https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files

  • Reply To: Oops, I deleted that data

    What about temporal tables for your tables that need to be recovered very fast?

  • Reply To: Securing the password

    Technically, the answer is wrong because you can decode a securestring, e.g. by using it to create a credential object:

    $securestring = Read-Host "Password" -AsSecureString

    $cred = New-Object -TypeName PSCredential "test",$securestring

    $cred.GetNetworkCredential().Password

  • Reply To: Indexing Computed Column

    The answer is correct, the explanation isn't 100% correct. You can create an index on a non-persisted computed column but only if the column is deterministic.

  • Reply To: Default Error Logs

    The default is 6, which is the number of previous backup logs SQL Server retains before recycling them.

    This says there are 6 previous logs retained, so there are 7 logs...

  • Reply To: Storing JSON data

    Am I blind? I only see references to NVARCHAR in the linked article, no VARCHAR.

  • Reply To: SQL and T-SQL for Beginners in 229 minutes

    A little bit longer than 229 minutes, but I really enjoyed Graeme Malcolm and Geoff Allix's 'Querying data with Transact-SQL' on MVA.

    https://www.youtube.com/playlist?list=PLar0ZIPrNX9ftDSmaD2tO32wjjSEAYU-P

  • Reply To: The Client Key

    The article references says:

    Next, the driver contacts the key store, containing the column master key, in order to decrypt the encrypted column encryption key value and then, it uses the...

  • Reply To: The Datatimeoffset Value

    I always thought the format was 'UTC time +-Offset'.

    London 17:00:00 in May is '2019-05-15 16:00:00 +01:00'. Colorado at the same time is '2019-05-15 16:00:00 -06:00'.

    The whole purpose of datetimeoffset is...

Viewing 15 posts - 16 through 30 (of 47 total)