Forum Replies Created

Viewing 15 posts - 736 through 750 (of 1,132 total)

  • RE: Cluster troubleshooting

    Here are the system functions that may be usefull. As some SQL instances may be defined with a case sensitive collations, the column names are exact, such as NodeName,...

  • RE: How do you make a sql task fail in a DTS package?

    RAISERROR with a severity of 16

  • RE: Calling procedure over and over.... can''''t work it.

    "And I would like to call this function 6 times in the end."

    Why ?

    There is a very simple set based solution using CASE.

    Using the Northwind demo database:

    --...

  • RE: How to set a query timeout in sql2k ?

    See Books onLine topic "query governor cost limit" which will not allow SQL statements that exceed the ESTIMATED run time to start.

    Since there may be a time window when long...

  • RE: sp_grantdbaccess from other database

    I missed "NOT" in my statement.

    Should be:

    System stored procedures do NOT follow the same execution convention as user stored procedures so that the SQL batch "EXEC importeddb.dbo.sp_grantdbaccess 'user'" will actualy...

  • RE: Transaction Log Question

    How very curious. I got the same results and also used the undocumented command "dbcc log (logtest, 1 )" to view the transaction log entries for a database named...

  • RE: sp_grantdbaccess from other database

    System stored procedures do follow the same execution convention as user stored procedures so that the SQL batch "EXEC importeddb.dbo.sp_grantdbaccess 'user'" will actualy run versus the importeddb not versus the...

  • RE: SysAdmins Locked Out of SQL Server

    Do not if this will work:

    1. Shut down the SQL Server instance.

    2. Rename the master data and log files.

    3. Copy the master data and log files from...

  • RE: T-SQL Script to render Server DB Sizes (Alloc & Used)

    There is no way to report space used by datafile as this information is not in the system tables, only in the space management pages.

    One may get object space usage...

  • RE: T-SQL Script to render Server DB Sizes (Alloc & Used)

    Why does it not work for multi-datafiles ?

    Please note that it reports by FileGroup, not by File.

    Also, everything is rounded to MBs not Kbs.

    Here is a test case:

    create database SizeTest...

  • RE: T-SQL Script to render Server DB Sizes (Alloc & Used)

    Here is what I run every Sunday evening versus over 100 servers that is at the Database and File group level:

    set nocount on

    create table #DBSpace

    (DbNamesysname

    ,FileGroupNamesysname

    ,AllocatedMbinteger

    ,UsedMbinteger

    ,FreeMbinteger

    ,FreePercentinteger

    ,AutoGrowMbdecimal(12,2)

    ,AutoGrowMaxSizeinteger

    )

    exec master.dbo.sp_MSForEachDb @command1 =

    'dbcc updateusage([?])...

  • RE: Create CHECK over FK field

    Check constraints cannot include a computed column, See below for the first set of DDL that does not have a computed column and then with a computed column.

    This makes sense...

  • RE: problem to get the last row of a group by

    In the future, please provide DDL and sample data

    See reasons and instruction at http://www.aspfaq.com/etiquette.asp?id=5006

    create table MyTable

    (a integer not null

    , b integer not null

    , c integer not null

    )

    insert into MyTable

    (A,B,C)

    select...

  • RE: Updating rows for my shopping cart

    As brendthess has indicated in detail, the business rules that you have posted are incomplete and the most critical missing rules are the primary keys and foreign keys constraints for...

  • RE: Updating rows for my shopping cart

    The logic is

    For each Order and Discount combination, the count of ordered products qualifying for the discount is equal to the count of products for the same discount.

    This assumes...

Viewing 15 posts - 736 through 750 (of 1,132 total)