Results 1 to 7 of 7
  1. #1
    Join Date
    May 2004
    Location
    Dubai
    Posts
    40

    Unanswered: We don`t need SQL server log file

    Hi

    I want to know is there any way that we tell to the SQL server that don`t make SQL LOG FILE ?

    or any code that i enter in the SQL setup file ( using ASP ) and tell to the SQL server that don`t make LOG File?



    Thanks

  2. #2
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    Are you talking about the log files for the databases or the error log files? Either way you need them. If you are talking about the database log files and don't want them to keep growing, you need to set the recovery mode to simple for the databases so they don't grow.

    ALTER DATABASE database_name SET RECOVERY SIMPLE
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  3. #3
    Join Date
    May 2004
    Location
    Dubai
    Posts
    40
    ok

    but where i should put this code

    i don`t know anything about sql
    i have a ASP forum that use sql db

    where i should put this code

    thanks

  4. #4
    Join Date
    May 2004
    Location
    Dubai
    Posts
    40
    Hi

    I add that code in my one of the files that make the DB Tables

    this is a section of this file that i add my code in that

    ==================


    strSQL = "ALTER DATABASE forum04 SET RECOVERY SIMPLE"


    '******************************************
    '*** Create the tables *****
    '******************************************

    'Create the Category Table
    strSQL = "CREATE TABLE [dbo].[" & strDbTable & "Category] ("
    strSQL = strSQL & "[Cat_ID] [smallint] IDENTITY (1, 1) PRIMARY KEY CLUSTERED NOT NULL ,"
    strSQL = strSQL & "[Cat_name] [nvarchar] (60) NOT NULL ,"
    strSQL = strSQL & "[Cat_order] [smallint] NOT NULL DEFAULT (1) "
    strSQL = strSQL & ") ON [PRIMARY]"



    ==================

    is this correct?

    i ran the file and made the tables and it worked fine without any error

    my log file size is 1 MB right now , is this normal?

    Thanks
    Last edited by farshad; 06-06-04 at 19:29.

  5. #5
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    gee, that's one way to do it.

    You only need to run that one time, and yes the size is normal
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  6. #6
    Join Date
    May 2004
    Location
    Dubai
    Posts
    40
    Thanks a lot buddy

  7. #7
    Join Date
    May 2004
    Location
    Dubai
    Posts
    40
    oh No
    wait

    Nothing happened to Database

    I installed The SQL server 2000 on my system

    and run my forum on a new database and ran this codes on that
    but when i open the Database Options window i saw that nothing changed and
    the recovery mode is set to " FULL"

    I changed it manualy and ran the forum but i Still have that problem

    what happened?

    oh my god

    Help me please

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •