Forum Replies Created

Viewing 15 posts - 5,581 through 5,595 (of 7,614 total)

  • RE: Database connection permissions

    ramana3327 (12/11/2014)


    I am re-framing my requirement.

    We have a team working as DBA (Offshore). We have 5 user databases. One database has the secure data and doesn't to reveal the data...

  • RE: Removing a cursor

    You could build a concatenated string containing all the executions, then EXEC() that string. The issue would be if errors occurred during processing.

  • RE: Run DBCC CHECKDB using Snapshot of the database.

    can I created a snapshot of the prod database on the same server and run DBCC CHECKDB on the Snapshot DB?

    Yes. It's easy, just like it sounds: create the...

  • RE: CTE query - Long Load Time

    Please list all indexes on [BuildTable].

    Also, shouldn't the SecondApply query have a condition based on FirstApply value, something like:

    WHERE [BuildTable].[rownum] > [FirstApply].[rownum]

    ?

    Edit: Added "WHERE" for clarity.

  • RE: How to format unformated phone numbers Please...,

    My approach below. I added a phone_id to the phone#s in the tables so I could join and show the expected output in the same query as the original...

  • RE: TLog backup file is big

    chulheekim (12/4/2014)[/b

    I don't understand why TLog backup file is so big and keeps growing. I thought it will gets smaller every time TLog backup is done.

    Not necessarily. It depends...

  • RE: Select All matches that clubs played with an interval less than three days between games

    SELECT DISTINCT m1.*

    FROM Matches m1

    WHERE

    EXISTS(

    SELECT 1

    FROM Matches m2

    ...

  • RE: Convert Integer to Time

    SELECT time_int, CAST(DATEADD(MINUTE, time_int / 100 * 60 + time_int % 100, 0) AS time) AS time

    FROM (

    SELECT 0 AS time_int UNION ALL

    ...

  • RE: Index Seek not happening

    If you (almost) always do lookups on the table based on "businessid", then cluster the table on businessid. If you need to keep the PK, make the PK nonclustered...

  • RE: SQL Date Parameters not working

    BWFC (12/4/2014)


    ScottPletcher (12/3/2014)


    BWFC (11/27/2014)


    You're welcome.

    One other thing, be careful using BETWEEN for date range queries. You're usually better using

    where

    [Date] >= @startdate

    and

    [Date] <= @enddate

    Have a look at...

  • RE: database growth

    If you're not using service broker any more, then it's 100% safe to run this:

    ALTER DATABASE msdb SET NEW_BROKER

    which should clear that table and allow you to release the space.

  • RE: SQL Date Parameters not working

    BWFC (11/27/2014)


    You're welcome.

    One other thing, be careful using BETWEEN for date range queries. You're usually better using

    where

    [Date] >= @startdate

    and

    [Date] <= @enddate

    Have a look at this...

  • RE: Prevent a SELECT Query from returning results using LOCKS

    To avoid rows already being modified, you can use the READPAST hint. That's often used for work-queue-type processing. If you can use that, there's no good reason to...

  • RE: database growth

    Ok, let's see what this shows:

    IF OBJECT_ID('tempdb.dbo.#showfilestats') IS NOT NULL

    DROP TABLE #showfilestats

    CREATE TABLE #showfilestats (

    Fileid smallint NOT NULL,

    FileGroup...

  • RE: database growth

    417 pages is a trivial size, you can ignore it if that's the total.

    Does "DB size shows 215 GB" include log file? If so, what size is the log...

Viewing 15 posts - 5,581 through 5,595 (of 7,614 total)