How can U decrease the Log Size in MS-SQL server?

Hello friends,
                I am in Big Trouble. I have a Problem.we are Using MS-SQL server 8.00.924. The Database Log size is almost Full.But BackUps are not Done successfully ,,How to Shink the Log file,, Any body pls help me I will give more Points.
Regards,
Balaram

Hi Balaram,
Please see the link and scripts which is given hereunder.
http://support.microsoft.com/kb/873235
You can check this method also.
Method 1 – Delete the Log (LDF) File
Although this method is simple, it is not supported by Microsoft®.  Additionally, it may not work for all systems.  Follow these steps to try the simple method on your system.
Ensure that no users are logged into the database.
Open Query Analyzer or another program to execute SQL scripts.  Ensure that “dsdbase” is not selected in the drop-down “DB” list.
Open and run the script DETACH.sql.  This script detaches the DataLyzer® database from the SQL server database.
Make a backup copy of the DSdbase_Data.MDF and DSdbase_Log files.
Rename the DSdbase_log file to another name, for instance backup_DSdbase_log.
Open and run the script ATTACHMDF.sql.  This script re-attaches the DataLyzer® database to the SQL database without attaching the log file.  NOTE: If your database is not stored in the location c:mssql7data change the SQL script to reflect the location of your DSdbase file.
If the script runs successfully, a new DSdbase_Log file will automatically be created to the original size specified when creating the database.  It is suggested that users keep the backup copies made of their database and log files for several days to ensure an available backup if anything happens to the new log file.
If the script does not run successfully, method 1 will not work for your current DataLyzer® Spectrum database.  This is because your database’s structure is dependent on the logfile.  In this case, re-name the original log file back to DSdbase_log.  Run the script ATTACH.sql and again change the file location to the location of your DataLyzer® database, if necessary.  When the database is successfully re-attached, try using method 2 to shrink the log file.
Method 2 – Truncate and Shrink the Log (LDF) File
Although this method of shrinking the log file is more complicated, it is supported by Microsoft®, and it will work for almost all systems.  Follow these steps:
Ensure no users are logged into the database.
Open Query Analyzer or another program to execute SQL scripts.  Ensure that “dsdbase” is not selected in the drop-down “DB” list.
If you have already tried method 1, or if you have a current backup of you database and log file, skip to step 7
Open and run the script DETACH.sql.  This script detaches the DataLyzer® database from the SQL server database.
Make a backup copy of the DSdbase_Data.MDF and DSdbase_Log files.
Open and run the script ATTACHMDF.sql.  This script re-attaches the DataLyzer® database to the SQL database.  NOTE: If your database is not stored in the location c:mssql7data, change the SQL script to reflect the location of your DSdbase file.
Select “dsdbase” from the drop down “DB” list in the program you are using to execute the SQL scripts.
8.      Run VIEW2LDF.sql.  Below is an excerpt similar to what will be displayed on your screen: FileId   FileSize    StartOffset    FSeqNo      Status   Parity  CreateTime
2          1245184   819              1292   0          64         1999-12-15 10:25:13.597
2          1245184   1253376       1225    0          128        1999-11-19 09:12:57.743
2           1245184   2498560       1224    0          128     1999-11-19 09:12:23.82
2          1499136   3743744       1318    2          64         1999-12-15 10:25:36.880
Locate the “2” in the status column.  The location of the “2” determines where the active portion of the log is.
If the 2 is in the bottom half of the log, open and run the SQL script MOVE2LOOP.sql.  This script is an infinite loop used to move the active portion of the log.
Re-Run the VIEW2LDF.sql script to make sure that the 2 is now located in the first half of the script. 
Run the script SHRINKLOG.sql to reduce the size of the database.
Run the script VIEW2LDF.sql to view the new status of the log file.  You should notice that the number of lines is significantly smaller than it originally was.
If you wish to further reduce the size of the database, repeat steps 8 through 13.
Text Context of SQL Scripts
ATTACHMDF.sql
sp_attach_db @dbname=N'dsdbase', @filename1=N'c:mssql7datadsdbase_data.mdf'
ATTACH.sql
sp_attach_db @dbname=N'dsdbase', @filename1=N'c:mssql7datadsdbase_data.mdf',
@filename2=N'c:mssql7datadsdbase_log.ldf'
Detach.sql
sp_detach_db dsdbase
MOVE2LOOP.sql
USE DSDBASE
GO
CREATE TABLE VIRTUAL_LOG_FILE_WRAPPER (CHAR1 CHAR(4000))
GO
DECLARE @I INT
SELECT @I = 0
WHILE (1=1)
BEGIN
WHILE (@I < 100)
BEGIN
INSERT VIRTUAL_LOG_FILE_WRAPPER VALUES ('A')
SELECT @I = @I + 1
END
TRUNCATE TABLE VIRTUAL_LOG_FILE_WRAPPER
BACKUP LOG DSDBASE WITH TRUNCATE_ONLY
END
SHRINKLOG.sql
DBCC SHRINKFILE (DSDBASE_LOG, TRUNCATEONLY)
BACKUP LOG DSDBASE WITH TRUNCATE_ONLY
VIEW2LDF.sql
DBCC LOGINFO(DSDBASE)
Regards,
Anil

Similar Messages

  • After Firefox was updated, the font size on my screen was decreased for all applications. How can I increase the font size on my screen ??

    After the update, the next screen showed all the letters in smaller font, with fewer pixels. All the screens are like that now and I found nothing in the Firefox help contents. This is a problem because I have vision difficulty. So, how can I increase the font size to what it was before? My screen is about 20 inches wide.
    Also, any chance I can change all the font to Arial instead of Times New Roman?

    Thanks -- that does help!

  • How can I change the INTERFACE SIZE in PHOTOSHOP CS6?

    Hi! I was just wondering how can I decrease the sizes of the interface in Photoshop? (e.g. the tool bar). My screen resolution is 1366 x 768, and most of the tools in Photoshop is occupying a bigger space in my screen. I feel that I can paint better if they are smaller. Do you have any idea how can I decrease the size of this interface?

    I would collapse and expand the toolbar windows by using the double arrow icon?
    Doing this will almost give you your full screen?
    Or you can hit 'Tab' and it hides your tools when you don't need them?

  • How can I decrease my font size in mail?  I have it set to small and yet it is enormous, letters running into one another.  I have rebooted and more.  Something is over riding my setting.  Any suggestions?

    How can I decrease my font size in mail?  I have it set to small and yet it is enormous, letters running into one another.  I have rebooted and more.  Something is over riding my setting.  Any suggestions?

    You haven't mentioned which mail it is,
    If it is G-mail go to settings --> general tab--> default text style , you can change your font size & then save at the bottom of the page

  • How can I change the window size of iTunes?  Used to be easy before installing Mavericks.

    How can I change the window size of iTunes on my iMac?  Used to be easy before installing Mavericks.

    If you want to make the itunes tab so you can see the dock
    you press the
    esc
    button if your in full screen mode
    if you want to get into full screen mode you press the arrows facing away from eachother in the top right corner
    there is another way to get to the normal tab if your in full screen
    make the curser go right up to the top of the screen and it will show the apple tab
    it will have two arrows facing together highlited in blue
    if u tap that it will take you to the normal tab

  • How can I change the page size of a pdf so i can view it on my iphone more clearly?

    How can I change the page size of a pdf so i can view it on my iphone more clearly?

    I think there may be more to this question than you say.
    If your PDF page is say, 8 x 12 inches, and you found a way to scale it to 25%, changing it to 2 x 3 inch, shrinking everything on the page to quarter size - wouldn't it look exactly the same on the iPhone? It's just going to be the same as zooming.
    Or were you hoping for something more like in Word, where changing the page size keeps everything the same size and spreads it over more pages? That isn't something you can do.

  • How can I adjust the font size of my printouts?

    I have an HP Officejet 4500 all-in-one printer and a new HP pavilion Slimline computer.  Since I changed to this computer, my printouts have very small font size making them hard to read.  How can I adjust the font size of the printout?  Is it a computer or printer function? I appreciate the help.

    I, too, am frustrated.  This seems like something that would easily be handled within the application software.  However, none of the fixes I've been offered have been very helpful.  My cousin sugested using Control C and Control V to move the text to WORD.  Once in WORD, you can manipulate the text on a WORD page...sometimes.  I've had good and bad luck with this method.  It still requires working in two different programs to get it legible.  Does anyone else have a 4500  All-in -one with this problem, or is it only me?  Thanks,  [Edited for Personal Information]

  • How can I increase the font size of my email when I print it out, it is printing tiny

    How can I increase the font size when I print out emails, it is printing tiny size?

    In the Print dialog window, click the small reveal-button to the right of the printer's name -
    The window will expand to show additional settings (similar to 'old' Page Setup) -
    Be sure "Scale:" is set to 100% and the 'Keep apparent font size' item is checked.

  • How can I adjust the font size in iTunes 11?

    How can I adjust the font size in iTunes 11?  Specifically, when in Artist view both the text in the sidebar and the track listing are huge.

    How to change fontsize in iTunes
    Take an XML-Editor and open:
    "C:\Program Files (x86)\iTunes\iTunes.Resources\de.lproj\TextStyles.plist"
    For other languages change your country code (de, en, fr, pl ...).
    Example for english:  "\en.lproj\TextStyles.plist".
    Backup this File !!!
    To change the Text-Size, change the integer value of the following item:
    "<key>size</key>"
    "<integer>8</integer>"
    This means Text-Size 8
    "<key>size</key>"
    "<integer>12</integer>"
    This means Text-Size 12
    To change the font, change the integer value of the following item:
    <key>font</key>
    <string>Arial</string>
    This means the font changes to Arial
    This also works:
    <key>italic</key>
    <true/>
    <key>bold</key>
    <true/>
    <key>underline</key>
    <true/>
    Example of common Text Properties:
    <!-- Artist View, Text Size In Artist List , Unselected -->
      <key>1033</key>
      <dict>
            <key>- loc hint -</key>
            <string>item table cell 3</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Artist View, Text Size In Artist List, Selected -->
      <key>1034</key>
      <dict>
            <key>- loc hint -</key>
            <string>item table cell 3 (bold)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Album View Text Size, Titles Of Track List, After Click On Album -->
        <key>1021</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 1</string>
            <key>font</key>
            <string>Segoe UI Semibold</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Artist View Text Size, Titels Of Track List -->
        <key>1022</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 2</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>justification</key>
            <string>right</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Track Number Size, In Album And Artist View -->
        <key>1023</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 3</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>justification</key>
            <string>right</string>
            <key>size</key>
            <integer>9</integer>
        </dict>
      <!-- Artist Text Size, In Album And Artist View -->
        <key>1024</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 4</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>9</integer>
        </dict>
    <!-- Album View Text Size, Title Of Album Under The Cover -->
        <key>1001</key>
        <dict>
            <key>- loc hint -</key>
            <string>item grid 1</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Album View Text Size, Artist Under The Cover -->
        <key>1002</key>
        <dict>
            <key>- loc hint -</key>
            <string>item grid 2</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Titleview Textsize In Table -->
        <key>9002</key>
        <dict>
            <key>- loc hint -</key>
            <string>List Contents (Small)</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Title View Text Size, Title Of Album Next To Cover -->
        <key>9029</key>
        <dict>
            <key>- loc hint -</key>
            <string>List Contents (Small Bold)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>5</integer>
        </dict>
    <!-- Textsize Playlist Sidebar Left Selected -->
        <key>1307</key>
        <dict>
            <key>- loc hint -</key>
            <string>playlists outline small font (selected)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>3</integer>
        </dict>
    <!-- Textsize Playlist Sidebar Left Unselected -->
        <key>1304</key>
        <dict>
            <key>- loc hint -</key>
            <string>playlists outline small font</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>7</integer>
        </dict>
    Hope this helps.

  • How can I change the page size of a scanned PDF document?

    How can I change the page size of a scanned PDF document?
    I scanned a 50-page document with an HP 5610xi All-In-One using the software that comes with it: HP Scan Pro. Though the physical document has standard 8.5" x 11" pages, the PDF resulting from scanning has page size set to 35.42 × 48.67 inches (according to Preview's "Tools > Inspector". I want to resize the pages to 8.5" x 11". Shouldn't Preview be able to do that with "Tools > Adjust Size..."? When I try, the menu option is grey so I can't select it.
    I'm using Preview Version 4.2.

    Thanks for the insight; that explains why it's the wrong size. I selected 300dpi scanning (which is the default, actually), but HP Scan Pro evidently created a PDF with 72dpi indicated. I want it fixed because I want to distribute the file to other people and have them able to print or display it without problems.
    I still don't know why Preview won't let me change it, but your question about whether I wanted to print it did lead me to find a workaround: "File > Print" and "Save as PDF..." saved it with the correct page size.

  • HT4863 How can I increase the file size limit for outgoing mail. I need to send a file that is 50MB?

    How can I increase the file size limit for outgoing mail. I need to send a file that is 50MB?

    You can't change it, and I suspect few email providers would allow a file that big.  Consider uploading it to a service like Dropbox, then email the link allowing the recipient to download it.

  • How can we increase the font size in Adobe Bridge CC 2014?

    How can we increase the font size in Adobe Bridge CC 2014?
    We use Windows 7 64bit computers and Dell High Density UltraSharp UP2414Q monitors with a resolution of 3840 x 2160.
    Other applications in Adobe CC 2014 work fine with this high resolution (Indesign, Photoshop) but I can't find where to adjust font size in Bridge.
    Right now menu items are hardly ledgible.

    Same problem.  Bridge is unusable with this micro font and no way to change it.
    I would call tech support but I don't feel like being on hold for two hours to talk to someone Adobe pays pennies a day in a loud call center who won't be able to help anyway. Fail.

  • How can you change the font size in the application and system headers?

    How can you change the font size in the application and system headers?  I searched the system and finder prefs to no avail.  Changing the screen density is not a good option.
    Thanks

    I downloaded Tinkertool.  Found the font section and increased the size of most selections.  The only thing that changed that I can see is the window label.  The apple line, bookmarks line, the tool bar in safari are all the same---font size of about 4.  Found the finder "show view options" but that didn't seem to change anything either.  I'll keep working.  Restarted all apps after changes as well.

  • How can I change the font size on the Mail program?

    How can I change the font size on the Mail program?  The text is quite small right now.

    Go to fonts and colors in Mail preferences and there you can change the font or size for the different parts of Mail.

  • How can i change the font size of internet explorer pg or smart web printing pg photosmartd7560

    how can i change the font size of internet explorer pg or smart web printing pg photosmart d7560

    Go to tools
    then internet options
    fonts

Maybe you are looking for

  • Error Message - Won't Let Me Use My Memory Chip

    I need help.  I turned off my phone today and when I turned it back on this message came up, "A Media Card has been inserted that contains errors.  To correct the errors please use a disk error-checking utility on a computer."  I previously had songs

  • Real application testing

    Hi, Os:Windows 2003 and Red hat 5 ( two Environments) Db:Oracle 11.1.6 How to check the Load Balancing in Oracle Real Application Testing. For Ex: Lets assume that we have 5 users 10 tranactions/SQl statement executions. How will be the system perfor

  • M-N mappings with attributes or batch fetch

    There is one very common design case of M-N relationship with attributes. Difference is that M-N is implemented by another persistent class with bunch of attributes rather then by internal O/R mapper means. For example we have a Member who can be ass

  • Business Content & Infopackages

    We are using the BC Infocube 0CCA_C11. I'm looking at the Infosource Overview for this cube and I can see there are several elements of Text / Attributes / Master Data that need data uploading to it. But when I look at the datasources for some of the

  • Error in ear deployment weblogic9.2

    Hi.. When i try to deploy an ear in weblogic9.2 im repeatedly getting these 2 error messages - 1)Unable to access the selected application 2)No name parameter specified the steps i followed are i selected the install option in deployments menu and i