Forum Replies Created

Viewing 15 posts - 91 through 105 (of 185 total)

  • RE: How to get math result from varchar formula?

    declare @Cost Money

    declare @formula varchar(100)

    select @Cost = 12.50

    select @formula = '$ + 12 * 3'

    select @formula = replace(@Formula, '$', 'cast(' + convert(varchar(12), @Cost) + ' as int)')

    select @formula = 'select...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: Moving DTS Packages saved on SQL Server

    There are several ways to do this.

    1.  You can just backup/restore the msdb database.  This will migrate all jobs and DTS packages to the other server. 

    2.  You can click on...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: Stored procedures using different databases

    Actually, there is a HUGE market for a tool that does this for you.  WahLah....CodeSmith.  You should check it out since it's free.

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: BackUp With TSQL

    I would take a look at the backup scripts already written here:

    http://weblogs.sqlteam.com/tarad

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: Log file

    I don't know why it has to be this complicated.  Change the database to Simple recovery mode.  Run DBCC Shrinkdb a couple times.  Switch to full recovery mode, do a full...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: identifying Identification fields using system tables (sqlserver2000)

    SELECT

     so.name + '.' + sc.name AS column_name

    FROM

     sysobjects so

     INNER JOIN syscolumns sc ON so.id = sc.id

      AND COLUMNPROPERTY(OBJECT_ID(so.name),sc.name,'IsIdentity') = 1

     

     

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: Should every table have an numeric (identity on) id field?

    Rockmoose,

    I prefer to have number-centric data structures.  In other words, I like having an integer key for any entity that's not a "dead end" entity such as a type table...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: Database Setting to single user

    To find out what is causing this, set up Profiler to trace the events.  You will need this event:

    SucurityAudit..Audit Object Permissions Event

    You'll want to include Database Name, DBUserName, HostName, TextData,...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: Attach Database

    Use the sp_attach_db stored procedure instead of trying to do it through Enterprise Manager.  You can fin information about it in Books Online.

    sp_attach_db @dbname = 'whatever',@filename1 = 'what.mdf', @filename2 =...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: single vs multiple files

    It can be worth the effort.  Are you on a SAN though?  One big thing is to get the transaction logs off of RAID 5.  Move them to RAID 10. ...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: How can I export a DB data into a delimited format?

    http://www.nigelrivett.net/

    Take a look at the scripts here.  He's got several related to your post.

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: Restoring Log Files

    You've been asked this in an interview for a DBA position I would assume?  If that assumption is not true, please ignore the rest of this message.  If it's true:

    1. ...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: SQL service wont stop; cant KILL spids

    You're going to think I'm crazy.  I would make a backup of all your databases (making sure you include the system databases), script out your users, detach the databases, uninstall...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: SQL service pack 3 Rollup how to find?

    Why are you even worrying about this?  You really need to upgrade to Service Pack 3a on ALL of your SQL Server yesterday.  It's a HUGE risk to your company to...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

  • RE: How can I delete data from a field every 24 hours to the second based on a bit field?

    You need to define what you mean.  If you mean for example that you want to delete every single record at midnight that was marked complete until 11:59:59, then you...

    Derrick Leggett
    Mean Old DBA
    When life gives you a lemon, fire the DBA.

Viewing 15 posts - 91 through 105 (of 185 total)