Forum Replies Created

Viewing 15 posts - 121 through 135 (of 306 total)

  • RE: Automatically Restores All database ".BAK" Files

    Yes it can be but part of the script will need to be reconstructed

  • RE: Consolidate data files.

    Thank You very much 🙂

  • RE: msdb issue

    Learning from our mistakes.. i've also experience the same situation where i backup only those existing databases in the server so when there are new databases restored in the server...

  • RE: Returning Variable Number of Columns

    ywb (3/11/2008)


    Thanks, Lester!

    It's great that I get the counts in the brackets now, but is there any way to have each fruit in it's own column? I'm not very good...

  • RE: Returning Variable Number of Columns

    The pain of CURSOR and the glory of JOINS hehehe thanks for the correction.

  • RE: Consolidate data files.

    ALZDBA (3/11/2008)


    For the non catalog files you can use:

    DBCC SHRINKFILE ( file_name , EMPTYFILE )

    and later on

    alter database xyz REMOVE FILE logical_file_name

    Read BOL for...

  • RE: Consolidate data files.

    donpolix (3/11/2008)


    I assume you have it on another filegroup other than the primary.

    This is quite a pain, but you can create a new filegroup, add one data file to...

  • RE: Consolidate data files.

    $sanjayattray (3/11/2008)


    Both Lester and ALZDBA methods works good. I had tried and tested both methods sometime back but I found ALZDBA method less painful if you have only two or...

  • RE: Consolidate data files.

    In my Experience i created a database with 1 data file then used DTS to transfer the data from thos multiple data files to the database that i created with...

  • RE: Returning Variable Number of Columns

    This is a bit long.... you can analyze the flow of the script so that you can develope your own script and maybe enhance this one (i know this is...

  • RE: Returning Variable Number of Columns

    I created the table by using a dummy table not a temp table that is why the tables dont have #

    select datename(yyyy,c.consumptiontime) as 'Year',

    CASE WHEN month(c.consumptiontime) = 1 THEN 'January'

    ...

  • RE: Default a user to the dbo schema in MS-SQL 2000

    If you want to change table owner other than dbo you can use the command sp_changeobjectowner

    Example:

    sp_changeobjectowner 'lester.table','dbo'

  • RE: Display Computer Name

    Thanks for the quick response this is what i did

    --= Use Northwind Database for testing

    Use Northwind

    GO

    --= Condition if the table doesn't exists

    IF NOT EXISTS (select name from sysobjects where xtype...

  • RE: CHanging Hard Disk location

    Thanks to all we successfully transfer the databases in 1 hard disk to another not by using dettach/attach but by using backp and restore to another hard disk location. I...

  • RE: CHanging Hard Disk location

    is it available in sql version 7?

Viewing 15 posts - 121 through 135 (of 306 total)