[dba-SQLServer] Is it my imagination?

John W. Colby jwcolby at colbyconsulting.com
Sun Sep 5 12:23:24 CDT 2004


>also a TIP, yes a TIP since you stuck w/ the thread till the bottom of the
email ;-) When using QA (Query Analyzer) and require help on a keyword
simply highlight or put your cursor over the keyword and hit CTRL+F1 and BOL
(Books online) will automatically open up w/ a pre-search to that keyword.

COOL.  

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco
Tapia
Sent: Sunday, September 05, 2004 12:49 PM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer] Is it my imagination?


See Inline:
On Sun, 05 Sep 2004 12:20:26 -0400, John W. Colby
<jwcolby at colbyconsulting.com> wrote:
> Francisco,
> 
> I appreciate all you assistance in this stuff.  Your patience and 
> knowledge are a godsend, and on SUNDAY at that!!!  8-)

thanks, and to think I'm just avoiding yardwork, by staying in a little
later (my excuse is that I don't want to wake the neighbors, but now it's
930 and i'm gonna have to soon break out w/ my yard boots :(.

in your program group for Sql Server there is an Icon labeld Query Analyzer.
It is a very very robust tool.  I like the Sql 2000 version wich also came
out w/ color coding for all the TSQL code, I hear rumors that the yukon one
will also feature intellisense, but I hope they are not just rumors :D.


 
> So how do I run this backup?  Don't worry, I am heading out to buy a 
> SQL Server 2K admin book which will hopefully assist me in all this 
> stuff.  In the meantime I need to get this log truncated so that I can 
> start the imports back up before I go.
> 
> >BACKUP LOG DBName WITH TRUNCATE ONLY
> 
> Is this run in the SQL query window (as a query)?  Do I need to 
> somewhere tell SQL Server where the backup files are going to go?
> 

When you open up Query Analyzer you can hit the F8 key if you don't already
get the object browser poping up in the Left side. If you are NOT trying to
keep your log file shrunk, but just want to keep it from growing anymore, or
for that matter like to maintain it at a smaller size.  Then I suggest you
go via "EM" (Enterprise Manager) right click the database properties and
click on the transaction log tab and restrict the growth of your transaction
log, then you'd want to set up an alert that would auto-backup/truncate the
log to prevent more growth.  I can repost the instructions on this again if
you want to do this


> >DBCC SHRINKFILE (DBName_Log, 10)
> 
> Do I need to do the shrink?  I am going to continue the import which 
> will grow the container again.  Is the space reused if I don't shrink 
> it or is it like Access where the file just adds NEW space and ignores 
> old empty space. The help seems to indicate that the freed up empty 
> space will be reused.

Since you're going to keep re-using the space and feel comfortable w/ a
transaction log that big you can leave it as is, or convert the size to
something more managable.  I can re-post that sample on how to setup an
Alert in Sql Server to auto-backup your transaction log for this type of
task.  also, If you set up a typical BACKUP process for your database, then
the Transaction log and all it's checkpoints are automatically cleared.  The
fact that it has not been happening on it's own right now suggests that you
have not gotten to the point where you've backed the database up.

> While I have your attention...
> 
> The following is what I see in the BOL for truncate.
> 
> Truncate Method
> The Truncate method archive-marks transaction log records.
> 
> Applies ToTransactionLog Object
> 
> Syntax
> object.Truncate( )
> 
> Parts
> object
> 
> Expression that evaluates to an object in the Applies To list
> 
> How do I "call" this code.  It appears that object is an object to be 
> called from code.  Can I do this from Access (since that is my comfort 
> zone)?  Do I have to reference this thing somehow.  IOW What the h&^% 
> is this and how do I use it?  I am an accomplished programmer (or like 
> to think so) but I haven't a clue how to get started with this stuff.
> 

It's what's known as SQL-DMO code.  You add the sql-dmo refrence to your
Access Project (MDB or ADP) and proceed to use it in code as such.  If you
have not downloaded the Books OnLine SP3, you ought to there is some revised
samples and such that will help you tremendously...

also a TIP, yes a TIP since you stuck w/ the thread till the bottom of the
email ;-) When using QA (Query Analyzer) and require help on a keyword
simply highlight or put your cursor over the keyword and hit
CTRL+F1 and BOL (Books online) will automatically open up w/ a
pre-search to that keyword.


-- 
-Francisco
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com







More information about the dba-SQLServer mailing list