Forum Replies Created

Viewing 15 posts - 31 through 45 (of 48 total)

  • RE: very weird SELECT error (MSDE)

    Why am I developing an aversion to bit fields?

    They seem to be responsible for unexpected wierdness - see for example thread "Why does this scan an entire NC index?"...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Using the ROWGUIDCOL attribute on primary key

    According to Books Online "The ROWGUIDCOL property is primarily used by SQL Server replication."

    The same page (Using uniqueidentifier Data) goes on to give some reasons not to use UniqueIdentifiers.

     



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: very weird SELECT error (MSDE)

    Dumb question:

    What happens if you change the two bit fields to [tiny]int?

    I think I'm working up an aversion to bit fields.

    Regards

    Otto



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Where and How to find the Computer_Name for Data Source of SQL Server Database?

    Just tried your original code on my machine. Works fine connecting to the default server and the named instance.

    Just a thought: you won't see the output unless you open the...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Where and How to find the Computer_Name for Data Source of SQL Server Database?

    Did you really use 'Initial Caltlog' (sic) in your code or was that an typo when posting? Same for 'Ingetrated Security' (sic).

    I tried the following code on my machine:

    Option Explicit

    Sub...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Thousand separator and decimal symbol problem

    I had the same problem in an application I wrote. At the time I was working for a U.S. company (guess what server settings they used) but with salesmen throughout Europe...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Where and How to find the Computer_Name for Data Source of SQL Server Database?

    Another thought: You shouldn't be using the sa account for normal use of SQL/Server. Ideally, only use windows authentication and not mixed mode. - but that's probably a subject for another...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Where and How to find the Computer_Name for Data Source of SQL Server Database?

    Is the machine your computer or a remote server?

    If it's your local machine try "Data Source=(local);"

    You wrote that the default instance uses windows authentication. If this is the case,...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Running Multiple Packages On One SQL Server

    Standard answer: it depends.

    In theory the answer is Yes. SQL/Server can handle several databases on the same instance.

    In practice, it depends on the load each application generates. If they are only generating a...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Why does this scan an entire NC index?

    I did a bit more digging on the 'restricted set of values' theme

    I tried the following variants of the StatusUpdated column:

    bit

    Integer

    Integer with a check constraint (StatusUpdated in (0, 1))

    Char(1)

    Char(1) with...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Why does this scan an entire NC index?

    Perhaps another piece of the puzzle:

    When I was testing, i tried to do a DBCC Show_Statistics on the index. With StatusUpdated defined as in int, it returned the three grids...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Why does this scan an entire NC index?

    I think the culprit is the Bit specification on StatusUpdated.

    I changed it to int, and the query plan uses the IX_StatusUpdated.

    My guess is that the query optimiser looks at the...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Generate SQL script problem

    Sorry to dissapoint.

    I think the scripting engine simply processes objects alphabetically. So if object 'a' depends on object 'z' and you want to reload using the generated script... tough luck!...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Problem with Index speed when moving records

    Updating the statistics should have helped. If you run the select in query Analyzer with the Execution plan turned on it should now use a table scan and take around...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

  • RE: Problem with Index speed when moving records

    Did you run the select statement in Query Analyzer with the 'Show Execution Plan' option turned on?

    I suspect your query is doing an index scan then a bookmark lookup.

    With...



    Best Regards,

    Otto Schreibke

    The future is a foreign country, they do things differently there.
    (Stolen from Arthur C Clarke)

Viewing 15 posts - 31 through 45 (of 48 total)