반응형
-- Create products table.
CREATE TABLE products (id int IDENTITY PRIMARY KEY, product varchar(40))
GO
-- Inserting values into products table.
INSERT INTO products (product) VALUES ('screwdriver')
INSERT INTO products (product) VALUES ('hammer')
INSERT INTO products (product) VALUES ('saw')
INSERT INTO products (product) VALUES ('shovel')
GO

-- Create a gap in the identity values.
DELETE products
WHERE product = 'saw'
GO

SELECT *
FROM products
GO

-- Attempt to insert an explicit ID value of 3;
-- should return a warning.
INSERT INTO products (id, product) VALUES(3, 'garden shovel')
GO
-- SET IDENTITY_INSERT to ON.                    <--  이녀석이 on 이 되어야지만 실행이된다. 안그러면 에러가뜸
SET IDENTITY_INSERT products ON
GO

-- Attempt to insert an explicit ID value of 3
INSERT INTO products (id, product) VALUES(3, 'garden shovel')
GO

SELECT *
FROM products
GO
-- Drop products table.
DROP TABLE products
GO


반응형
반응형
[MS-SQL]
select * from fn_dump_dblog(default,default,default,default,'d:\test.trn',

            default,default,default,default,default,default,default,default,default,default,
            default,default,default,default,default,default,default,default,default,default,
            default,default,default,default,default,default,default,default,default,default,
            default,default,default,default,default,default,default,default,default,default,
            default,default,default,default,default,default,default,default,default,default,
            default,default,default,default,default,default,default,default,default,default,
            default,default,default)


이렇게 하면 트랜젝션 로그 관련 내용이 나오는데............

제길, 당췌 뭐가 뭔지는 하나도 모르겠다-_-;
반응형

+ Recent posts