Forum Replies Created

Viewing 15 posts - 3,346 through 3,360 (of 49,552 total)

  • RE: Error while mirroring database

    Open a T-SQL query window, make sure that the database context is NOT the database Mirror, and then use T-SQL to do the config.

    The connection that you're using for 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: help needed with query

    Ok, so you want to count() the student names and group by the scholarship

    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: Error while mirroring database

    GilaMonster (4/4/2016)


    Either change the sa login's default database to master, or don't explicitly specify a database name in the login/connection string.

    If the default DB is master, then to get that...

    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: help needed with query

    That's not what you asked for. The original question was to count the StudentName (the column in the count) per category (the group by), not count the unique scholarships 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: TDE Question

    I'm asking if server 1 can contain 2 separate certificates.

    Well. sure. There's a limit of just over 2 billion (certificate ID in the system table is an int). Not...

    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: help needed with query

    Look up COUNT(DISTINCT...) and GROUP BY in SQL's documentation (called Books Online)

    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: TDE Question

    To restore a DB that's been encrypted, the server must have the certificate that was used to encrypt that database. You can't decrypt with any old certificate, if you could,...

    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: ALTER INDEX REBUILD use of Tx Logs

    Index rebuilds can be minimally logged in simple and bulk-logged recovery model. It's fully logged in full recovery, which means it's a size-of-data operation in terms of log space used.

    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 Server 2016 RC1 to RC2

    For any pre-release version, I recommend reinstalling from scratch. I usually just delete the VM and rebuild it.

    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: Error while mirroring database

    That's why you got the error logging in then. You can't open a DB that's in RESTORING, it's not accessible.

    Either change the sa login's default database to master, or don'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: Need help in following query

    Honestly, you should first be looking at normalising the table design. The first is not normalised and hence you have these kinds of problems.

    To solve it in the mean time,...

    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: Get distinct records for paging when joining tables

    John Jensen-439690 (4/4/2016)


    I'll try your solution - hopefully it dosn't affect performance too much.

    If you mean improve it, not much. It won't be a noticeable improvement in most cases. Couple...

    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: Get distinct records for paging when joining tables

    Looks like you're just using the CaseOrderline for filtering. If so, try this

    SELECT C.CaseId,

    CONVERT(INT,ROW_NUMBER() OVER(ORDER BY C.createDate ASC)) AS sequenceId

    FROM tblCase C

    WHERE EXISTS (SELECT 1 FROM tblCaseOrderline CO WHERE C.caseId...

    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: Error while mirroring database

    What state is the database in? (Online, recovering, restoring, ...)

    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: DDL Trigger for Preventing Sysadmin roles.

    What, specifically, do you want? A trigger to prevent any logins being given the sysadmin role? To prevent any roles being created with the CONTROL SERVER permission (equivalent to sysadmin)?...

    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 - 3,346 through 3,360 (of 49,552 total)