Forum Replies Created

Viewing 15 posts - 31 through 45 (of 58 total)

  • RE: OUTPUT OF A QUERY/STORED PROCEDURE INTO A EXCEL FILE

    Just recently there was an article posted titled "Using DTS to Generate and Email Excel Reports" that might be useful in solving your problem.  This solution used DTS and could...

  • RE: querying systables to retrieve PK &FK information...

    Have you tried sp_pkeys and sp_fkeys?  You could easily insert the output into a temp table and do anything you wish from there.  The output is very useful as it...

  • RE: Object naming

    This appears to be a purely academic debate. Standards are established within an organization to maintain some type of order.  There is no reason that standards can...

  • RE: stored procedure to total dates

    select datepart(mm,date) as Mon,count(datepart(mm,date)) as Nbr

    into ##Dates

    from TableName

    where datepart(yy,date) = 2005

    group by date

    having count(datepart(mm,date)) > 0

    select [Month] = case

      when mon = 1 then 'January'

      when mon = 2 then 'Feburary'

      when mon = 3 then 'March'

      when mon =...

  • RE: Can anyone recommend a good beginners book for learning the fundementals of DTS ?

    Microsoft SQL Server 2000 DTS by Timothy Peterson.   Also look in Books On Line.

  • RE: Connect to mutiple databases?!

    I may be missing something but I did not see anything about different servers just different databases.  These are two distinct conditions.

    Yes, different servers would require using the linked server...

  • RE: Copying Databases

    First.  I must agree with the question from AJ Ahrens, "Why does a DEVELOPER have this authorization?"  but feel that it should go a step futher and ask "Why does...

  • RE: master.dbo.spt_values means?????????

    These values are your server run time configuration.  See sp_configure in books on line.  Secondly this information is pretty well documented in most sql admin books.  One hand book you...

  • RE: I installed sql server put did not install the sample pubs and northwind

    The sql install usually puts the scripts in: \Program Files\Microsoft SQL Server\MSSQL\Install

    instnwnd.sql

    instpubs.sql

     

     

  • RE: Free tool to Explore LOG!!

    Lumigent Log Explorer is the only way to go.  Low footprint and most importantly it works.  I have used it for a few years and have never been let down. ...

  • RE: method for testing whether server exists?

    This little proc will return a 1/0 = there/not there.  Using the output you can then insert a record in a table based on the status of the flag.  This...

  • RE: How to find out the biggest table by size in a database?

    Here is a little different twist on your request.

     

     

    -- Create the temp table for further querying

    CREATE TABLE #temp(

     ServerName varchar(30),

     DBName  varchar(40),

     rec_id  int IDENTITY (1, 1),

     table_name varchar(128),

     nbr_of_rows int,

     data_space decimal(15,2),

     index_space decimal(15,2),

     total_size decimal(15,2),

     percent_of_db decimal(15,12),

     db_size  decimal(15,2))

    -- Get all tables, names, and sizes

    EXEC sp_msforeachtable @command1="insert into...

  • RE: Report for amount of data replicated

    At best here is a starting point.  Run this on the distribution db associated with your replication. 

    use distribution

    go

    select start_time,

     duration as [Seconds],

     rtrim(comments) as comments,

     current_delivery_rate as Avg#CmdsSec,

     current_delivery_latency,

     delivered_transactions,

     delivered_commands,

     average_commands,

     delivery_rate as CmdsSec,

     delivery_latency,

     total_delivered_commands

    From MSdistribution_history

    where current_delivery_rate >...

  • RE: Convert minutes to Hours:Minutes

    declare @hr varchar(2),

     @min varchar(2),

     @in int,

     @HrMin int

    set @in = 187

    set @hr = @in/60

    set @HrMin = @hr*60

    set @min = @in - @HrMin

    if len(@min) = 1

    set @min = '0'+convert(varchar(2),@min)

    print 'Time = '+@hr+':'+@min

    As for the aggregate error look at the data type...

  • RE: Restore the database

    Run this script in QA.  Be sure to change the db name for the variable @DBName.  There are better ways to do this but this works just fine.  You can...

Viewing 15 posts - 31 through 45 (of 58 total)