Forum Replies Created

Viewing 15 posts - 466 through 480 (of 1,539 total)

  • RE: Excluding Job Execution On Holidays

    -- Create the Holiday Table

    create table tblHolidays

    (

    id int identity(1,1),

    Holiday datetime

    )

    -- Insert test Holiday dates

    Insert Into tblHolidays(holiday)

    select (getdate()-1)

    Union all

    select (getdate()+2)

    Union all

    select (getdate()+1)

    Union all

    select (getdate()+10)

    -- Insert this as a part of...



    Pradeep Singh

  • RE: locking table

    Very Neat and Tidy script Paul 🙂



    Pradeep Singh

  • RE: locking table

    The other way is to create a insert/update/delete trigger that roll backs any modification to the base table, however i still prefer the previous method of putting the table in...



    Pradeep Singh

  • RE: locking table

    sekannak (9/5/2009)


    Hi,

    I have a table - how to lock my table not to INSERT/UPDATE/DELETE plz answer me...

    regards,

    kannak.....

    One way that i can think of doing this is put this table...



    Pradeep Singh

  • RE: alter query problem

    You were much faster Lowell with detailed explanation.:w00t:



    Pradeep Singh

  • RE: alter query problem

    I dont think it's possible to modify a column to take identity property.

    Please have a look at the following article from SSC, which describes two ways of achieving what...



    Pradeep Singh

  • RE: dbcc updateusage

    for the logspace part, the following code will write the results in a table which you can query later.

    create table tblLogSize(dbname varchar(100),

    logsize float,

    used float,

    status int

    )

    go

    ----------------------

    create procedure LogSpace

    as

    dbcc sqlperf(logspace)

    go

    -----------------------

    Create Procedure InsertIntoTable

    as

    truncate...



    Pradeep Singh

  • RE: dbcc updateusage

    whats the problem in creating it?

    for dbcc sqlperf(logspace) you may want to capture the results to a table... use dynamic query for this..



    Pradeep Singh

  • RE: Find filegroup for table

    Glad I could help 🙂



    Pradeep Singh

  • RE: Excluding Job Execution On Holidays

    I dont think this feature is available while scheduling your job. You'll have to manually disable it/enable it OR you can create a Holidays table containing holiday dates and query...



    Pradeep Singh

  • RE: alter query problem

    you can modify the table's property from management studio.

    Right click on your table, Modify, from the column properties tab, you can modify the column to be identity.



    Pradeep Singh

  • RE: Find filegroup for table

    use this code.

    SELECT o.[name], o.[type], i.[name], i.[index_id], f.[name]

    FROM sys.indexes i

    INNER JOIN sys.filegroups f

    ON i.data_space_id = f.data_space_id

    INNER JOIN sys.all_objects o

    ON i.[object_id] = o.[object_id]

    WHERE i.data_space_id = 2

    refer: http://www.mssqltips.com/tip.asp?tip=1112



    Pradeep Singh

  • RE: server error

    What version of sql server are you running. Microsoft suggests installing SP2 and then CU build 3161.

    Refer : http://support.microsoft.com/kb/933766



    Pradeep Singh

  • RE: sql server agent failed in sql server express edition

    As far as i know, sql agent services are not a part of express edition.



    Pradeep Singh

  • RE: SQL JOB History is getting disappeared !!!!!!

    There is a setting where you define maximum no of rows of history of a particular job.

    Pls go through this link:

    http://www.mssqltips.com/tip.asp?tip=1269



    Pradeep Singh

Viewing 15 posts - 466 through 480 (of 1,539 total)