Forum Replies Created

Viewing 15 posts - 91 through 105 (of 144 total)

  • RE: Unable to kill a session

    Is it save for you to restart the sqlserver service?



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Selective Average in SR 2008 r2

    Could you please provide some sample data (Using TSQL) and the expected results.

    That way we'll be able to help you out better and quicker.



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Check this correct - my DBCC script

    select *

    from sysdatabases

    where version != 0

    AND version is not null

    AND status <> 512

    After a quick google on sysdatabases if found this helpful tidbit.

    http://msdn.microsoft.com/en-us/library/aa260406%28v=sql.80%29.aspx



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Unable to kill a session

    Hi,

    If you're 100% sure that process can be killed and that there's nothing else going on that's important.

    You can try.

    USE master

    GO

    ALTER DATABASE <DBName>

    SET OFFLINE WITH ROLLBACK IMMEDIATE

    I don't have...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Are the posted questions getting worse?

    Lol. Was looking at active threads for questions to help out with, didn't realize this one was 4 years old. Hehe.... cough cough... :blush:

    What's just as bad as a poorly...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Are the posted questions getting worse?

    Sorry skipped straight to my 2cents. (Nearly time to go home :-))

    Maybe this has already been pointed out and I'm just proving the point of many comments already raised in...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: SSRS Default date parameters

    You could also use subscriptions and skip monday in your schedule.



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Need to start off DB2

    Just google db2 tutorial.

    gl!



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Weekly data converted to months

    Give this ago.

    First the function: (You can use DATEPART instead of ufn_ISOWeek)

    CREATE FUNCTION [dbo].[ufn_GetDateFromISOWeek]

    (

    @YearNr SmallInt,

    @WeekNr TinyInt,

    @SE Char(1),

    @StartMonth TinyInt

    )

    RETURNS SmallDateTime

    AS

    BEGIN

    --DECLARE -- Parameters

    --@YearNr SmallInt,

    --@WeekNr TinyInt,

    --@SE Char(1),

    --@StartMonth TinyInt --...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Weekly data converted to months

    You'll run into trouble if a week spans 2 months.



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Database Mail Frustrations

    I successfully tried you test.

    (No column name)(No column name)

    Unsent0

    Failed0

    Sent11

    All11

    Have you tried dropping the profile / account and recreating them?

    Can you give it a go via another smtp server?



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Parameterized dynamic SQL

    Thanks for the input guys! 😀

    @Eugene

    That is not dynamic SQL...

    I know. I was just demonstrating Jeffs suggestion of checking for a valid object and stopping if it isn't valid.

    So far...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Parameterized dynamic SQL

    Ok, so we have to use dynamic queries for object names.

    Make sure to check the object against the sys views.

    DECLARE

    @DBName NVarchar(50)

    SET @DBName = 'Master1'

    IF NOT EXISTS (SELECT * FROM...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Debugging 2012

    When adding the exception for SvcHost.exe, I get the following message.

    Windows services have been restricted with rules that allow expected behavior only. Rules that specify host processes, such as svchost.exe,...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Debugging 2012

    This is also not working for SQL 2008 R2 dbs.

    Locally they do work but from my workstation they don't.

    Even though all Windows Firewalls are disabled, I configured the exceptions anyway....



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

Viewing 15 posts - 91 through 105 (of 144 total)