Forum Replies Created

Viewing 15 posts - 1 through 15 (of 152 total)

  • RE: REstart of SQLSERVERAGENT fails while stopping and starting it works

    On the server, pull up the Services display. Find the SQLSERVERAGENT service, right-click, and select Properties.

    Select the Log On tab

    Is it logging on as a specific account? Did...

  • RE: Naming Convention of Stored Procedures

    Joe Contreras (11/29/2007)


    Hi All,

    ....

    I have this from an article written here, but I sense a rebuttal. Are there other concrete examples I can use to present why not to...

  • RE: Issue with Job Executing, but never failing/working

    Permissions, permission, permissions.

    When you can run a DTS package, and another process can not, it is, almost inevitably, that the security context of the other process does not have permissions...

  • RE: Log Shipping Failures

    No, this is not normal behavior. I would expect an error *somewhere* - SQL logs, windows logs, something.

    You have checked the windows event logs, haven't you?

  • RE: Need input on how to combine queries that return counts

    I can explain why an outer join is slower than an inner join on indexed fields.

    On an Inner Join, you make the explicit assumption that you only want the items...

  • RE: Need input on how to combine queries that return counts

    Let's do a quick test. Pasted, no params

    SELECT

    c.ProdGroup,

    c.CalcCountProdCode,

    ca.CalcCountCACode

    FROM (

    SELECT

    ProdGroup,

    COUNT(ProdCod) AS CalcCountProdCode

    FROM smcscalc..ERVProdGrp_ProdCode

    WHERE ProcessDate < '12/20/2007'

    GROUP BY ProdGroup

    )c

    INNER JOIN (

    SELECT

    ProdGroup,

    COUNT(ProdCode) AS CalcCountCACodeFROM smcscalcanalysis..ERVProdGrp_ProdCode

    GROUP BY ProdGroup

    )ca

    ON c.ProdGroup =...

  • RE: Need input on how to combine queries that return counts

    Must remember to post my code in a quoted block, so that formatting is retained.

  • RE: Log Shipping Failures

    The first place I would look is connectivity between the two servers. If Server A cannot connect to Server B, then the Log will not ship.

    The second? See...

  • RE: Add 3 columns into another column

    This is one of those cases where COALESCE makes for a fun alternative, because it can make your head hurt figuring out what it is doing. 😉 I am...

  • RE: Need input on how to combine queries that return counts

    There are a few different methods that can be used, which should all recognize that the two queries involved are separate entities

    First, try this version. It handles cases where...

  • RE: I/O error bad page id when attempting to select * into tableA from tableB

    You could probably start by reviewing your backup strategy, because you may need to restore data here.

    First, what does the disk subsystem look like? If you have RAID-N drives...

  • RE: Counting without Primary Key

    You can do what you want, but you need to use a different logical concept. If what you have is:

    SELECT R.NomineeFirstName, R.NomineeLastName, E.NomineeDept, COUNT(E.EmployeeNominationid) AS NominationsCount

    ....

    And what you need...

  • RE: NOT EXISTS vs NOT IN

    Actually, I believe you are correct in general. As I noted above, an IN/NOT IN is usually better for comparing sets of data, while an EXISTS / NOT EXISTS...

  • RE: NOT EXISTS vs NOT IN

    Yes, it does, but it does so primarily because the two statements should be used for differing reasons.

    -- WARNING -- PERSONAL OPINION BELOW --

    EXISTS / NOT EXISTS checks are best...

  • RE: NOT EXISTS vs NOT IN

    Let's think this through.

    If you need a NOT EXISTS query, you are using the index (presumably) to check for the existence of a record specified by a single value. ...

Viewing 15 posts - 1 through 15 (of 152 total)