Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / February 2005

Tip: Looking for answers? Try searching our database.

Insert Into Without Log

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dario Concilio [MCP] - 22 Feb 2005 14:11 GMT
Hi,
Can I create an Insert Into Query without sql server registration log?

Thx.
Hilary Cotter - 22 Feb 2005 15:16 GMT
I take it you are talking about
insert into tableName
Select * from TableName2

if so, not
Signature

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

> Hi,
> Can I create an Insert Into Query without sql server registration log?
>
> Thx.
Dario Concilio [MCP] - 22 Feb 2005 15:28 GMT
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.

>I take it you are talking about
> insert into tableName
[quoted text clipped - 5 lines]
>>
>> Thx.
Hilary Cotter - 22 Feb 2005 16:04 GMT
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.

Signature

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

> ok,
> for example when I delete all records in a table without trace in sql server
[quoted text clipped - 18 lines]
> >>
> >> Thx.
John Kane - 22 Feb 2005 16:07 GMT
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
Signature

SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/

> ok,
> for example when I delete all records in a table without trace in sql server
[quoted text clipped - 18 lines]
> >>
> >> Thx.
Dario Concilio [MCP] - 22 Feb 2005 16:31 GMT
I see.

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

> Dario,
> Effectively, you want to turn of logging of logged (inserts) transaction
[quoted text clipped - 33 lines]
>> >>
>> >> Thx.
John Kane - 23 Feb 2005 01:55 GMT
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
Signature

SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/

> I see.
>
[quoted text clipped - 40 lines]
> >> >>
> >> >> Thx.
Dario Concilio [MCP] - 23 Feb 2005 08:06 GMT
Is not there other way?

> Dario,
> No, the BULK INSERT syntax only allows "BULK INSERT [ [ 'database_name'.]
[quoted text clipped - 63 lines]
>> >> >>
>> >> >> Thx.
John Kane - 23 Feb 2005 16:22 GMT
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
Signature

SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/

> Is not there other way?
>
[quoted text clipped - 65 lines]
> >> >> >>
> >> >> >> Thx.
Dario Concilio [MCP] - 23 Feb 2005 16:43 GMT
Thank you.
:-)

> Dario,
> Basically, you cannot turn off transaction logging in SQL Server 2000, you
[quoted text clipped - 83 lines]
>> >> >> >>
>> >> >> >> Thx.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.