How to reduce transaction log in SQL Server 2000

Dear All gurus/experts,
I need your help. The problem is that the time to take to reduce transaction log in SQL server 2000 when I use shrink method. Are there another way to do that beside shrink database (right click : all tasks --> shrink database) ?
I appreciate your answers. TIA
Rgds,

Hi Steve,
Is this for a test system or a production system?
For a test system, as per Ad's post, setting the recovery model to simple should do the trick.
For a production system, I'd recommend you leave the recovery model at full and set up transaction log backups. This will keep the log file at a reasonable size and you will gain point in time recovery (eg if you back up the logs on an hourly basis, you can recover the database to the last log backup, meaning you would never lose more than an hour's work).
Kind Regards,
Owen

Similar Messages

  • How to load oracle data into SQL SERVER 2000?

    how to load oracle data into SQL SERVER 2000.
    IS THERE ANY UTILITY AVAILABLE?

    Not a concern for an Oracle forum.
    Als no need for SHOUTING.
    Conventional solutions are
    - dump the data to a csv file and load it in Mickeysoft SQL server
    - use Oracle Heterogeneous services
    - use Mickeysoft DTS
    Whatever you prefer.
    Sybrand Bakker
    Senior Oracle DBA

  • How to use OEM to moniter sql server 2000

    Hi,
    I need to learn How to use OEM to moniter sql server 2000.
    Can anyone help me and give me some website or documents
    to read?
    So I can learn to do this job.
    Thanks.

    See Note 115302.1 in Metalink.oracle.com
    in how to use OEM Diagnostic pack addon for SQL Server
    Or search for
    oem "user events"
    to build your own monitor script.

  • Transaction Logs in SQL Server

    Hi, the BW system has the following properties:
    BW 3.1C Patch 14
    BASIS/ABA 6.20 Patch 38
    BI_CONT 310 Patch 2
    PI_BASIS Patch 2004_1_620
    Windows 2000 Service Pack 4
    SQL Server 2000 SP3 version 8.00.760
    Database used space: 52 GB
    Database free space: 8.9 GB
    Transaction log space: 8 GB
    I am having the following problem.  The SQL transaction logs on the SQL Server fill up very rapidly while aggregates are rolling up.  Sometimes taking up to 16-20 GB of transaction log space in the SQL Server.  We only have 8 GB of space available for the transaction logs.  When the aggregates are not rolling up, the logs do not fill up at all.  I have tried changing the logs to Simple logging, but all that does is delay the fill, and at that point you cannot backup simple logs to free up DB space.
    What is it about aggregates that fills up the transaction log?  Anybody know a solution to this without adding disk space to the transaction log disk?
    Thanks,

    Hello,
    the log backup on simple mode is not necessary. The full database after switching back to full is a must.
    Please keep in mind, that even running on simple mode the log can be filled up, as all transactions are still written to the log. Commited transaction then can truncated from the log. But when you run a hugh transaction like a client copy, the log might grow as well. The log will be freed once the transaction commits or rolls back. And no, you can't split a client copy in several transactions.
    Best regards
      Clas

  • How can i connect to a SQL Server 2000 database usgin JSP?

    I need (URGENT) to connect to SQL Server 2000 databse using JSP. I do not know how to program using JSP, so if anyone has any code snippet please let me see it. What i need is to give my site some login/password security.
    Anyone?
    Thx.

    just create an ODBC of your database from control pannel -> administrative tools -> data sources (ODBC) ,double click it .....
    go to the tab SYstem DSN , click on ADD button. select the driver for your connection. it will be the last one in the list "SQL Server".
    click Next then give ur DSN name there, description and Server Name , on next give your username and password of SQL server. when it will be connected to the server celect your database from there and hence there will be an ODBC bridge same as in case of MS Access.
    code for connecting to ODBC is
    // DSN-NAME same as in System DSN.
    // username and password are of your databse
    try
              url = "jdbc:odbc:DSN-NAME";
              Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
              connect = DriverManager.getConnection( url,"username","password" );
              catch ( ClassNotFoundException cnfex ) {
                        setErrorMsg( cnfex.getMessage() );
              catch ( SQLException sqlex ) {
                        setErrorMsg( sqlex.getMessage() );
              catch ( Exception ex ) {
                        setErrorMsg( ex.getMessage() );
    Now you are connected to the SQL Server ..... use connect object for further processing .........

  • How to compare 2 dates in SQL Server 2000 DB using Java?

    How do you compare 2 dates in SQL Server 2000 DB using Java?
    Let's say we have two fields: Date Reported and Target Finish Date.
    Date Reported is 09-10-2004 09:55:55: PM
    Target Finish Date is 09-12-2004 11:59:59: PM
    What i want to happen is i want to convert both dates to days and get the difference of the two.
    can SQL Server 2000 DB do this?

    it doesnt wrk.
    ok here's what i did:
    iv tested a simple code for this case.
    I created a table name tblDate which has 3 columns namely date_ID, date_From (datatype datetime), date_To (datatype datetime).
    I inserted 1 row: date_ID has the value 1, date_From has the value 10/22/2004, and date_To has the value 10/24/2004.
    i run the java code below:
    int days = 0;
              String query = "SELECT date_From, date_To cast(date_From-date_To AS int) AS Diff FROM tblZoo WHERE date_ID = '1'";
              try
                   DBConnect db = new DBConnect();
                   db.openCon();
                   ResultSet rs = db.execute(query);
                   while(rs.next())
                        days = rs.getInt("Diff");
                   db.closeCon();                         
              catch (Exception ex)
                   System.out.println("Error on Execution: " + ex);
              return days;___________
    an error occurred: Error on Execution: java.lang.nullpointerexception

  • How to transfer database tables from sql server 2000 to oracle 10g

    Hi,
    I have a database and tables in sql server 2000. I have to transfer those data to Oracle 10g. I have installed Oracle warehouse Builder ETL Tool. Using this how can i transfer data. Any help is vary helpful for me.
    Thanks in advance.

    you have to do it using ODBC HS.
    1. Configure ODBC connection through gateway.
    2. Create a initxxx.ora file with HS config.
    restart gateway listener services
    3. on target o/s add entries to your tnsnames.ora
    4. On your target o/s create a db link
    restart listener on target
    cheeck this out.Non-Oracle connection through HS issue
    Edited by: Darthvader-647181 on Jan 29, 2009 2:02 AM

  • Transactions in MS SQL server 2000

    I'm writing an application whish will real data from MS SQL server 2000. At the same time one table and/or database would be used with couple of users. What should I use for handling transactions?
    I'm using jtds-0.8-rc1 as JDBC driver.
    Thanks in advance.

    I'm writing an application whish will real data from
    MS SQL server 2000. At the same time one table and/or
    database would be used with couple of users. What
    should I use for handling transactions?
    I'm using jtds-0.8-rc1 as JDBC driver.
    Thanks in advance.Are you saying you will only have one database? Are your sql statements atomic? If they are just use sql server and JDBC with autocommit on. If not, you can still just use sql server and jdbc and turn autocommit off, and explicitly control the transactions yourself. If your app is a web application, you can probably use the web container to control the transactions.
    If you are going to have more than one database, or a database and another datasource, then you'll have to look at a transaction manager or application server. If you do, you'll have to have the Microsoft Distributed Transaction Coordinator running as well.

  • How to Migrate my database from SQL Server 2000 to Oracle

    I want to transfer my database from SQL Server 2000 to Oracle, Can I do this without using Oracle Migration Workbench ??
    Please help me.
    Thanks in advance
    Vicky... :-)

    Do you have a good technical reason for not wanting to use the Migration Workbench?
    Given that it's free and does a hell of a lot of the work for you, why wouldn't you use it?
    Other than that, I would say you would be on your own...
    cheers,
    Anthony

  • How To Use Reporting Services On SQL Server 2000 ?

    Hi all .
    Today , I has a issue .
    Normal , if the customer use SQl Server 2005 , it is no proplem , so if use SQL Server 2000 ,  Now , I want to use Reporting services on SQL Server 2000 , but , I am searching  on Internet , so I know , if I want to use SQL 2000 reporting server , I must have license of SQL server 2000 .
    is Every body  idea for this issue  ? .
    Please help me .
    Thanks alot .

    Ok ,anyway thanks alot ,.

  • How to load data to a SQL Server 2000 from a text file ( fixed / delimited)

    I am a navie user to ODI, just installed some time back. And I wanted to load text data ina file ( fixed length/ delimited ) to SQL server 2000 database.
    Iam intrested to know the steps I need to take to achieve this. I mean for example first creating topology,next designer..
    Could you please provide some books/articles or any documents that talt about these steps clearly one-by-one.

    Hi,
    Oracle Data Integrator - Getting Started with an ETL Project
    follow this manuel step by step and you will be able to load data from file to any database...

  • How do I view the transaction log in SQL Server 2008?

    Hello,
    I want to know how to view all the transactions taken during a particular period of time. I know there is a log file, ending with .ldf, created for each database. But how do I view this file?
    Is there any tool in the SQL Server studio that can enable me to view the transactions for a given time period?
    The reason for me wanting to view the log file is that, last week during a power outage, certain amount of data was not written. And one my friend had also messed up some of the data (unfortunately, she doesn't remember what she did).
    Thanks in advance.

    Hi,
     It enables you to read from you transaction log which contains very valuable information about stuff that is happening in your database.
    select
    * from fn_dblog (null,null) ..
    EXAMPLE:
    SELECT
    FROM
    ::fn_dblog(NULL, NULL)
    WHERE
    operation = 'LOP_DELETE_SPLIT'
    Thanks,
    Leks

  • How to delete Transaction Logs in SQL database

    Hi,
    Can any one explain me the process how to delete the transcation logs in SQL database.
    Thanks
    Sunil

    Sunil,
    Yes you can take online backup in MS SQL server.
    The transaction log files contain information about all changes made to the database. The log files are necessary components of the database and may never be deleted. Why you want to delete it?
    I am taking any backup, do i need to turn off the SAP server that is running at the moment or can i take it online
    There are three main types of SQL Server Backup: Full Database Backup, Differential Database Backup and Transaction Log Backup. All these backups can be made when the database is online and do not require you to stop the SAP system.
    Check below link for details
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/89/68807c8c984855a08b60f14b742ced/frameset.htm
    Thanks
    Sushil

  • How to store/display images with SQL Server 2000

    Hi everybody, I'm totally new to ColdFusion, and creating a
    sample project, where a user would enter in a person's info and
    upload a picture of that person. I trying to get my app to save
    that image to SQL Server database and then to display that pic.
    Currently, it "seems" that I'm able to save to SQL server (my table
    saves user info but all values in my photo column says
    <binary>-I don't know if that is correct), but I can't seem
    to get image and display it on my cf page. I have pasted portions
    of my code below.
    I've been hammering away at this but no luck, so Any comments
    are very well appreciated, example code would be great!
    Thank you so much,
    noijet
    # 1.) I have a 'User Info Entry' page that submits to page
    #2:
    <cfform...>
    <input name="fileToUpload" id="fileToUpload" type="file"
    size="64"/>
    </cfform>
    # 2.) This page does the actual saving, this doesn't output
    any errors but am I saving the image to SQL server correctly? I
    have no idea really how to save images to database, so please
    advise or possibly provide example code. Afterwards, it goes to
    page #3 to display confirmation page that data has been saved.
    <cfif isDefined("Form.fileToUpload") and Form.fileToUpload
    neq "">
    <cfset uploadPath =
    GetDirectoryFromPath(GetBaseTemplatePath()) & "uploads\">
    <cfif not DirectoryExists(uploadPath)>
    <cfdirectory action="create" directory="#uploadPath#">
    </cfif>
    <cffile action="upload" fileField="fileToUpload"
    destination="#uploadPath#" nameConflict="overwrite">
    <cfset imagefile= "uploads\\" & cffile.serverFile
    & "'">
    </cfif>
    <cfquery name="qInsertPerson" dataSource="HRP">
    Execute insertPerson
    N'#Trim(FORM.sLastname)#',N'#Trim(FORM.sFirstname)#',N'#Trim(FORM.sMiddle)#',N'#Trim(FORM .sAlias)#',
    '#imagefile#'
    </cfquery>
    <cflocation url = "savePersonResult.cfm" addToken =
    "No">
    #3.) This confirmation page displays last user entered and a
    picture of the user. The user info retrieved from SQL server is
    displaying correctly but the picture is not displaying(just a small
    red 'x' box). The image calls another getPersonPhoto.cfm file to
    display image.
    <cfquery name="lastPerson" datasource="HRP">
    Exec getLastRow
    </cfquery>
    <cfoutput query="lastPerson">
    #firstName# #middle# #lastName# was added to our Persons
    list. That Person has been given id: #id# <br>
    Thank you for your assistance and cooperation.
    <img src="getPersonPhoto.cfm?id=71" border="0" width="128"
    height="180">
    </cfoutput>
    #4.) This is .cfm file that only displays image of person
    <cfsetting enablecfoutputonly="Yes">
    <cfsetting showdebugoutput="No">
    <cfquery name="getBlob" datasource="HRP">
    SELECT TOP 1 photo FROM Persons WHERE id = 71
    </cfquery>
    <cfheader name="content-disposition"
    value="Inline;filename=ExamplePerson.jpg">
    <cfcontent type="image/jpeg; charset=iso-8859-1">
    <cfoutput>#tostring(tobinary(getBlob.photo))#</cfoutput>
    Note: In my ColdFusion admin, I checked "Enable ... BLOB's"
    and set Blob Buffer to 20000

    Regarding doing the actual saving, here are some other things
    to consider:
    * a max on the image's file size
    * check if it really is an image
    * don't use nameconflict="overwrite". consider
    nameconflict="MAKEUNIQUE"
    * delete uploaded image on file system after insert into db
    Also, on the cfm page that returns an image, try putting the
    cfcontent tag and the cfoutput tag on one line.
    <cfheader name="Content-Type" value="image/jpeg">
    <cfcontent
    type="image/jpeg"><cfoutput>#getBlob.photo#</cfoutput>
    Good luck!

  • How to recover from mdf file (SQL Server 2000)

    Hi,
    My database corrupted because when I was running an update query, there is a power failure. After the computer booted, I cannot open the database anymore, it just not responding. Then I stop the sql server service, and tried to rename the .mdf and .ldf. After that it worked normally, but I need the data from the corrupted mdf file, I tried to attach the database but it just hanged. I even tried to attach without the .ldf file but it didn't work either, so I concluded that the problem is with the mdf file.
    Is there any way to recover my data ??
    Thanks in advance
    Regards,
    Edwin

    Try this undocumented stuff provided by Kevin [MS].
    ==========
    1. Back up the .mdf/.ndf files at first!!!
    2. Change the database context to Master and allow updates to system tables:
    Use Master
    Go
    sp_configure 'allow updates', 1
    reconfigure with override
    Go
    3. Set the database in Emergency (bypass recovery) mode:
    select * from sysdatabases where name = '<db_name>'
    -- note the value of the status column for later use in # 6
    begin tran
    update sysdatabases set status = 32768 where name = '<db_name>'
    -- Verify one row is updated before committing
    commit tran
    4. Stop and restart SQL server.
    5. Call DBCC REBUILD_LOG command to rebuild a "blank" log file based on the
    suspected db.
    The syntax for DBCC REBUILD_LOG is as follows:
    DBCC rebuild_log('<db_name>','<log_filename>')
    where <db_name> is the name of the database and <log_filename> is
    the physical path to the new log file, not a logical file name. If you
    do not
    specify the full path, the new log is created in the Windows NT system
    root
    directory (by default, this is the Winnt\System32 directory).
    6. Set the database in single-user mode and run DBCC CHECKDB to validate
    physical consistency:
    sp_dboption '<db_name>', 'single user', 'true'
    DBCC checkdb('<db_name>')
    Go
    begin tran
    update sysdatabases set status = <prior value> where name = '<db_name>'
    -- verify one row is updated before committing
    commit tran
    Go
    7. Turn off the updates to system tables by using:
    sp_configure 'allow updates', 0
    reconfigure with override
    Go
    ============

Maybe you are looking for