Groups | Blog | Home
all groups > sql server full text search > february 2005 >

sql server full text search : Insert Into Without Log



John Kane
2/22/2005 8:07:45 AM
Dario,
Effectively, you want to turn of logging of logged (inserts) transaction in
the database log. Correct?
If so, then the answer for INSERTs is no. There will always be a certain
level of logging of logged (insert, delete, update) in the database
transaction log, however, you can minimize this via setting the database
recovery model to "bulk insert" and then use BULK INSERT to insert data into
your (large?) table to minimize the growth of the transaction log...

Hope that helps,
John
--
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/




[quoted text, click to view]

Hilary Cotter
2/22/2005 10:16:57 AM
I take it you are talking about
insert into tableName
Select * from TableName2

if so, not
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

[quoted text, click to view]

Hilary Cotter
2/22/2005 11:04:32 AM
I think you are talking about logging, i.e. these events are logged in the
transaction log. For instance a truncate can be rolled back if it is within
the confines of a transaction, even with bulk logged recovery model.

If you are asking about this command not showing up while using profiler you
can't stop it from showing up there, unless your trace is pretty specific.


--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

[quoted text, click to view]

Dario Concilio [MCP]
2/22/2005 3:11:31 PM
Hi,
Can I create an Insert Into Query without sql server registration log?

Thx.

Dario Concilio [MCP]
2/22/2005 4:28:45 PM
ok,
for example when I delete all records in a table without trace in sql server
log
I type:

TRUNCATE TABLE MyTable

My question is:
In this case? When I type INSERT INTO etc.. and I don't want to trace this
task in sql server log. What can I do this?

thx.

"Hilary Cotter" <hilary.cotter@gmail.com> ha scritto nel messaggio
news:%23rWuSGPGFHA.2976@TK2MSFTNGP09.phx.gbl...
[quoted text, click to view]

Dario Concilio [MCP]
2/22/2005 5:31:33 PM
I see.

Then..... Can I type this?
BULK INSERT INTO DestinationTable [...]
FROM OriginTable
WHERE [..]



"John Kane" <jt-kane@comcast.net> ha scritto nel messaggio
news:ui2kkiPGFHA.428@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view]

John Kane
2/22/2005 5:55:37 PM
Dario,
No, the BULK INSERT syntax only allows "BULK INSERT [ [ 'database_name'.]
[ 'owner' ].] { 'table_name' FROM 'data_file' } [ WITH ... various
options" - see SQL Server 2000 BOL title "Bulk Insert" for more details...

However, what you can do is use "SELECT INTO" and select into a new table as
SELECT INTO will only work with new and not existing tables, specifically,

SELECT * INTO DestinationTable
FROM OriginTable
WHERE [..]

You can also use BCP.exe and you may want to read "Using SQL Server 2000
Recovery Models" at
http://www.devx.com/getHelpOn/10MinuteSolution/16532/1954?pf=true

Hope that helps!
John
--
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/


[quoted text, click to view]

John Kane
2/23/2005 8:22:57 AM
Dario,
Basically, you cannot turn off transaction logging in SQL Server 2000, you
can only use the below methods (Bulk insert, SELECT INTO, BCP.exe) to
minimally log transactions to the database transaction log. FYI, this
question is often asked in other newsgroups, but the answers are the same
there...

Regards,
John
--
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/



[quoted text, click to view]

Dario Concilio [MCP]
2/23/2005 9:06:08 AM
Is not there other way?


"John Kane" <jt-kane@comcast.net> ha scritto nel messaggio
news:%23plWErUGFHA.2932@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view]

Dario Concilio [MCP]
2/23/2005 5:43:55 PM
Thank you.
:-)

"John Kane" <jt-kane@comcast.net> ha scritto nel messaggio
news:ufNSxPcGFHA.2280@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button