Forum Replies Created

Viewing 15 posts - 196 through 210 (of 368 total)

  • RE: load factor - any meaning to it?

    Just to give you a quick start.

    You need to look at least two different areas: db and OS.

    Start with db. I recommend you to install Adam Mechanic's procedure sp_WhoIsActive[/url].

    Run it,...

  • RE: Appropriate Data Type

    Decimal and numeric are functionally the same.

    Numeric came first, and when SQL/92 standard came, they added decimal as a synonym to comply more with the standard sql type names.

    Float has...

  • RE: Multiple updates for save value

    Mahesh example is very simple update, without any join, just a subquery.

    So, "FROM" syntax is very similar as a syntax without "FROM":

    --SELECT *

    UPDATE t SET t.Column1 = <New Value>

    FROM <Table...

  • RE: Appropriate Data Type

    Look here about exact numerics and approximate numerics:

    http://msdn.microsoft.com/en-us/library/ms187752.aspx

    You definitely do not want to use approximate numerics in a financial application.

    For storage of values use the type that can store all...

  • RE: Multiple updates for save value

    Yes, "IN" internally does "distinct" of the values.

    I would recommend to use other syntax for update, one which is similar to SELECT.

    First, write the SELECT that returns the rows.

    Then, replace...

  • RE: XML Tag reading

    DECLARE @xmlAttributeRelation XML

    SET @xmlAttributeRelation='<Entity>

    <Entity>1</Entity>

    <Entity>2</Entity>

    </Entity>

    '

    SELECT Result = ent.val.value('.', 'int')

    FROM @xmlAttributeRelation.nodes('/Entity/Entity') ent(val)

    Result

    -----------

    1

    2

    (2 row(s) affected)

    It would be better to name the outer tag differently, e.g. "ArrayOfEntity" to avoid confusion.

  • RE: SQL Agent cannot start

    Virtual account NT Service\SQLSERVERAGENT is the default account installer sets for sql agent, out of the box.

    There is no reason that this account should not work.

    For example, NT Service\MSSQLSERVER is...

  • RE: SQL Agent cannot start

    Click "Browse", and type a user. Change location to local host, then "Check names":

    Click OK. Leave blank password:

    If I click "OK" or "Apply", I receive "Access denied" immediately.

    Service account is...

  • RE: SQL Agent cannot start

    After the initial setup, virtual account "NT SERVICE\SQLSERVERAGENT" was set to run sql agent service, as default.

    But, under that account sql agent would not start (access denied).

    After I changed to...

  • RE: SQL Agent cannot start

    Thanks. Computer is on a domain, but none of the required privileges is denied from AD.

    I also checked folder permission, as stated in doc here: http://msdn.microsoft.com/en-us/library/ms143504%28v=SQL.110%29.aspx

    And found that this permissions...

  • RE: Corrupted DB after transaction log full

    After investigation, I found the drive was full indeed at the time of error, but in the morning when I looked at it it was not full, so that explains...

  • RE: Corrupted DB after transaction log full

    Thanks for the link. But I'm not sure it is the same case.

    My database was not in a suspect state, it was online.

    And DBCC CHECKDB did not find any errors.

    Error...

  • RE: Calculations using the Money data type

    Beside the type, I would add two more points.

    If you want to be absolutely sure that you will retain the precision in your calculatins:

    • use decimal(25,13) in internal calculation for...

  • RE: dbcc freeproccache for only 1 stored procedure

    Much easier method (SQL 2005 and on):

    -- Clear procedure from the cache

    sp_recompile 'schema.ObjectName'

    Clears plans from the cache for specified stored procedure or trigger. If table or view is specified, all...

  • RE: Turn on CHECKSUM after an upgrade

    To Steve's list I would add a step to rebuild all heaps and clustered indexe so ensure all pages have a checksum. Without that, checksum will be applied (and checked...

Viewing 15 posts - 196 through 210 (of 368 total)