Re: How do I shrink my logfile?
From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 07/23/04
- Next message: Makor: "Exchange and SQL Server data sharing"
- Previous message: Lou Arnold: "Q: Local Admin account and SA account"
- In reply to: Sydney Lotterby: "Re: How do I shrink my logfile?"
- Next in thread: Sydney Lotterby: "Re: How do I shrink my logfile?"
- Reply: Sydney Lotterby: "Re: How do I shrink my logfile?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Jul 2004 17:32:15 -0700
I assumed that because you were posting a question on the newsgroup that you
did not know EVERYTHING about SQL Server. I had to guess how much you knew
and how much you didn't know.
The Duh! is really uncalled for. It seems to assume that I should have known
exactly how much you already knew, and there was no way I could know that.
If you peruse the newsgroups for a while, instead of just posting your own
question and waiting for an answer, you will see there is an extremely wide
range of experience in the people who ask questions here.
Without more details, I would also assume that your db was restored from a
backup of one with a different name. The sysfiles table is populated when
the db is created, and that can happen during a restore if you are not
restoring on top of an existing db.
You can use ALTER DATABASE to change the logical filenames, but only if you
are running SQL Server 2000. You never once said what version you are
running, and there is no way I could know that either.
You can only change the physical file names of tempdb. If you need to change
the physical file names, you can detach the db, move the files, reattach
with the MOVE option.
Please see ALTER DATABASE, sp_detach_db and sp_attach_db in the Books Online
for full details.
-- HTH ---------------- Kalen Delaney SQL Server MVP www.SolidQualityLearning.com "Sydney Lotterby" <sydney@infosearch.com> wrote in message news:#mlWxpDcEHA.808@tk2msftngp13.phx.gbl... > Duh! I know that! I was making a generic statement. > > My comment still stands ... mydb_log (alias cpmain_log) is not in SysFiles > and I would like to know why. > The entry in cpmain.sysfiles is cphooks_log and cphooks_data > I suspect this db was restored from one named cphooks. > So ... > 1) When is the entry made to sysfiles? > 2) Can I change the entries in sysfiles manually with impunity? > > "Kalen Delaney" <replies@public_newsgroups.com> wrote in message > news:uzmxUeBcEHA.2468@TK2MSFTNGP09.phx.gbl... > > Usually when you see MY in an object name, it means you should replace it > > with whatever YOUR name really is. > > > > What is the name of the log file for YOUR db? That is the name you should > > use instead of mydb_log. Sysfiles, or sp_helpfile, should show you the > name > > used for your database. > > > > -- > > HTH > > ---------------- > > Kalen Delaney > > SQL Server MVP > > www.SolidQualityLearning.com > > > > > > "Sydney Lotterby" <sydney@infosearch.com> wrote in message > > news:#qNPqBBcEHA.3460@TK2MSFTNGP10.phx.gbl... > > > I followed the instructions in the link but when I run DBCC > > > SHRINKFILE(mydb_log,2) it says "could not locate mydb_log in sysfiles. > I > > > checked sysfiles and, true, it is not there. > > > What can I do? > > > > > > "Narayana Vyas Kondreddi" <answer_me@hotmail.com> wrote in message > > > news:%23pOUoKAcEHA.3988@tk2msftngp13.phx.gbl... > > > > See DBCC SHRINKFILE in SQL Server Books Online. Also see: > > > > > > > > INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC > > SHRINKFILE > > > > http://support.microsoft.com/default.aspx?scid=kb;EN-US;272318 > > > > -- > > > > HTH, > > > > Vyas, MVP (SQL Server) > > > > http://vyaskn.tripod.com/ > > > > Is .NET important for a database professional? > > > > http://vyaskn.tripod.com/poll.htm > > > > > > > > > > > > "Joseph Geretz" <jgeretz@nospam.com> wrote in message > > > > news:ewNWyDAcEHA.1656@TK2MSFTNGP09.phx.gbl... > > > > I set my recovery model to simple. I set my database option to > > AutoShrink. > > > I > > > > backed up my database. But the logfile is still 2.3 GB(!). How do I > > shrink > > > > this? > > > > > > > > Thanks! > > > > > > > > - Joe Geretz - > > > > > > > > > > > > > > > > > > > > > > > >
- Next message: Makor: "Exchange and SQL Server data sharing"
- Previous message: Lou Arnold: "Q: Local Admin account and SA account"
- In reply to: Sydney Lotterby: "Re: How do I shrink my logfile?"
- Next in thread: Sydney Lotterby: "Re: How do I shrink my logfile?"
- Reply: Sydney Lotterby: "Re: How do I shrink my logfile?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|