Forum Replies Created

Viewing 15 posts - 226 through 240 (of 285 total)

  • RE: Migrating SQL Server to larger hdd

    Maria Smith (8/11/2009)


    Hi there, we need to migrate sql server to a larger hdd because of lack of disk space and unable to do proper sql backups and log backups....

  • RE: Locks - Blocked Processes

    Hi,

    sp_who2 is useful for blocking. it will show which SPID is blocked by whom.

    Then you can use DBCC INPUTBUFFER (SPID ID) to see what the SPID is actually doing i.e...

  • RE: Changing Role Between Primary and Secondary Servers in SQL Server 2005 Log Shipping:

    rambilla4 (7/2/2009)


    Thank You.

    I got one orphand user in one database as below:

    UserName UserSID

    John 0x3922A096AD89EB49B6BA68362BFDA1B6

    Could you please...

  • RE: Replacing Schema with new schema of Database objects

    Hi,

    Try this:

    set the o/p mode to text in SSMS .. then run the following .....

    SELECT 'ALTER SCHEMA Employee TRANSFER ' + TABLE_SCHEMA + '.' + TABLE_NAME

    FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA...

  • RE: Job step edit error

    phbianchi (7/1/2009)


    I was having the same problem, and your suggestion solved it! Thanks!!!

    Glad it helped you !

  • RE: Account gets locked out

    HI All,

    I appreciate all your efforts. The problem is resolved as I granted Windows authentication to the user.

    Thanks for all your effort,

    \\K 🙂

    PS: Steve this is the best site where...

  • RE: Schema rename

    MANU (6/25/2009)


    Now what you are telling is that I should script out permissions of bob on dbo.test (does by default BOB has create table permission for dbo schema ? ...

  • RE: Problem with trigger

    Carl Federl (6/25/2009)


    Figured out the problem with the trigger not matching the expected results as this requirement was missing:

    When new rows for case_feed = '7' then:

    The next sequence should begin...

  • RE: Problem with trigger

    Paul White (6/25/2009)


    ...the AFTER trigger version of my code is simpler as expected:

    ALTER TRIGGER trg_cnsmr_accnt_ai

    ON dbo.cnsmr_accnt

    AFTER INSERT

    AS

    BEGIN

    IF@@ROWCOUNT = 0 RETURN;

    SET NOCOUNT ON;

    SET ROWCOUNT 0;

    ;WITHOrdered AS

    (

    SELECTcnsmr_id,

    cnsmr_id + '-' + CONVERT(VARCHAR(10), 100...

  • RE: Schema rename

    MANU (6/24/2009)


    Following is an example of ALTER SCHEMA command

    ALTER SCHEMA

    siteadmin —Target Schema

    TRANSFER

    dbo.testTable –Object to be transferred

    Please ensure that you have scripted all the permission of original object before transferring to...

  • RE: Problem with trigger

    Hi Carl,

    Thanks for the info. I really need to get on T-SQL to understand and effectively use it.

    So if there is a duplicate key violation, you do not get a...

  • RE: Problem with trigger

    Hi Carl,

    Thanks for your help. You are right that the code when put in trigger will not work.

    I cannot understand the use of Instead of trigger as opposed to for/after...

  • RE: Problem with trigger

    WayneS (6/24/2009)


    I tried your code out, then added this insert statement to test out the trigger.

    It inserts about 2000 rows into your table, then selects everything.

    insert into cnsmr_accnt

    select CONVERT(varchar(5), 22...

  • RE: Problem with trigger

    Carl Federl (6/24/2009)


    Can you post the create table statement please ?

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    Hi,

    below is the code to create table and some sample data.

    CREATE TABLE cnsmr_accnt (

    [cnsmr_id] VARCHAR (50) NOT NULL,

    [cnsmr_accnt_id] VARCHAR...

  • RE: Create trigger on Insert

    Robert klimes (6/22/2009)


    what it does is sets the number to append to the caseid based on the highest number that was already appended plus one.

    set @seq = (select max(substring(caseid,charindex('-',caseid)+1,len(caseid)))+1 from...

Viewing 15 posts - 226 through 240 (of 285 total)