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)
...
User Profile
Collapse
-
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...Leave a comment:
No activity results to display
Show More
Leave a comment: