Forum Replies Created

Viewing 15 posts - 4,741 through 4,755 (of 49,552 total)

  • RE: Lockdown All Databases Except One

    stanlyn (9/15/2015)


    the developer can see the other databases, but cannot explore, drill down and/or execute them? Without the gui, productivity will suffer, at least for us.

    He can see...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Execution plan ignoring index, insisting on Key Lookup

    It's going to be down to estimations. Key lookups are OK on smaller row counts.

    Can you post the plan?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: TempDb on Drive Root

    Windows protects the roots of drives more than folders, so you're more likely to have permissions problem (which with TempDB will result in the instance not starting). Put them in...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Whats the approximate time to restore 570 GB Backup?

    Jeff Moden (9/15/2015)


    Remember that won't necessarily help you with restores that have unnecessarily large log files because they need to be "formatted" as VLFs.

    Not so much formatted. Log files must...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Stored procedure returning different data sets based on input variable

    https://www.simple-talk.com/content/article.aspx?article=2280

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: sql error

    That's completely invalid syntax, bears no resemblance to an update statement, looks like an insert statement with the INSERT INTO replaced by an UPDATE SET and nothing else changed.

    UPDATE ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Recovery Model for Cluster

    There's no recovery model requirements for a clustered database.

    Just check and ensure that the data loss potential due to Simple Recovery is acceptable to the owners/users of the system.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: String to Date without time-Sql server 2012

    That code shouldn't fail with a NULL value, or are you saying you have the string value 'NULL' present in your data?

    DECLARE @DateAsString varchar(20) = NULL;

    SELECT CAST(@DateAsString AS DATE)

    Returns NULL,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Stored Procedure Always Implicitly Casting Return Value as INT

    https://msdn.microsoft.com/en-us/library/ms187926.aspx

    Stored procedures are similar to procedures in other programming languages in that they can:

    Accept input parameters and return multiple values in the form of output parameters...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Grant User Read Access to Secondary Replica

    Correct. The availability group is at the database level. Server-level permissions are kept in master and that's not going to be part of your AG.

    Just don't change any of the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Move database log files massively

    The 'create a new log file' and 'drop the old one once empty' are fine and will work. It's the ShrinkFile portion that won't, because EmptyFile only applies to data...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Grant User Read Access to Secondary Replica

    Create the login and user on the Primary replica. Grant the user the rights you want them to have on the secondary replica. Deny the login CONNECT rights on the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Query Optimization/Cleanup

    Test and see?

    CREATE TABLE #Test (

    SomeValue INT

    )

    INSERT INTO #Test (SomeValue)

    VALUES (1), (1),(1),(NULL),(NULL),(1)

    PRINT 'Count'

    SELECT COUNT(SomeValue) FROM #Test AS t

    PRINT 'Sum'

    SELECT SUM(SomeValue) FROM #Test AS t

    -----------

    Count

    -----------

    4

    Warning: Null value is eliminated by...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Changing Collation

    The only thing which that process does is change the default collation for the instance (collation new databases will get by default), the collations of master and TempDB. It doesn't...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Log file management in simple recovery model

    Then you need to identify the large transactions that are causing the log to grow (about the only thing that will in simple recovery) and fix that. If you can't...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 4,741 through 4,755 (of 49,552 total)