User Profile

Collapse

Profile Sidebar

Collapse
baghul
baghul
Last Activity: Dec 20 '09, 03:06 AM
Joined: Sep 27 '07
Location: Dallas
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I have run into this issue before as well, Like debasisdas mentioned, you can check for existence of data before you insert. Here is sample code you could use

    --for insert

    IF NOT EXISTS (SELECT * FROM dbo.table1 WHERE ID=123)

    INSERT dbo.table1 (ID, ..........)
    VALUES (123, .........)

    --for update

    IF NOT EXISTS (SELECT * FROM dbo.table1 WHERE ID=123)

    ...
    See more | Go to post

    Leave a comment:


  • baghul
    replied to transaction log file is full
    When I run into this common issue, I try the following 3 methods in order and they seem to work fine.

    1. BACKUP LOG {Enter your DATABASE} WITH NO_LOG

    2. Using Enterprise Manager,
    select your database, all tasks, shrink database
    you will get a new dialog box, click on Files
    under database file, select the Log file
    click Ok

    3. use this TSQL command
    DBCC SHRINKFILE (' {Enter...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...