Results 1 to 15 of 15
  1. #1
    Join Date
    Sep 2003
    Posts
    212

    Unanswered: sp_MShelpcolumns

    How does sp_MShelpcolumns work?

    I need to CREATE TABLE using sp_MShelpcolumns. I have to create a table depending on the structure of antoher table.

    thx

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    SELECT * INTO newTable99 FROM myTable99 WHERE 1=0

    Should do the trick
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Sep 2003
    Posts
    212
    I have to transfer tables from one place to another regardless of the structure, on a regular basis.

    So, I have to re-create the tables on the destination server every transfer

  4. #4
    Join Date
    Sep 2003
    Posts
    212

    Unhappy

    PLEASE! any kinda help

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    You need to give us more info...like what's the process?

    Why don't you use DTS?

    Why don't you know the structure of the table, yet it's dependant on that table?

    That doesn't make much sense to me....

    In your shoes, I think I'd use DTS, but then I forgot you don't know the table...

    Do you plan on using the catalog?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    Sep 2003
    Posts
    212

    Unhappy

    I know the tables, i know the ctalog where the table is coming from.
    I'm planning on using DTS.

    Basically, I want to transfer a few tables from server to another regardless of the source table structure. So if say tomorrow, the tables on the source were structurally altered - a new field added (with the same name tho). the transfer should take care of this. Meaning the tables at the destination must be re-created with the new structure, before the transfer of data.

    Does this make sense?

  7. #7
    Join Date
    Sep 2003
    Posts
    212

    Angry

    thx for nothin
    Last edited by vmlal; 06-23-04 at 17:28.

  8. #8
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    oooo, you got a 'tude...

    Listen I still don't understand

    I could probably write ANYTHING you could possibly ever want...

    I just need to understand first....

    I already gave you solution...just wasn't what you want...

    You say that if the source table changes, that you want then destination to change...it must be recreated

    Well ok...what just happened to all the data that was in the destination table?

    And listen, even replication doesn't do this.

    How did the source get changed in the first place?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  9. #9
    Join Date
    Sep 2003
    Posts
    212
    Quote Originally Posted by Brett Kaiser
    oooo, you got a 'tude...

    Listen I still don't understand

    I could probably write ANYTHING you could possibly ever want...

    I just need to understand first....

    I already gave you solution...just wasn't what you want...

    You say that if the source table changes, that you want then destination to change...it must be recreated

    Well ok...what just happened to all the data that was in the destination table?

    And listen, even replication doesn't do this.

    How did the source get changed in the first place?

    every transfer the tables are re-created, the data is lost if there are ne structural changes. All i really need is a way to re-create the tables from the source server dynamically, ie, with no humna interference (except while developing it)

    holy

  10. #10
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    How well do you know DTS?

    Is this to support a devlopers environment with approved changes?

    How big is the database

    I think I would just simply set up a nightly job and do a RESTORE or ATTACH from the Sources nightly dump

    How often do you need to apply the changes? Like as soon as the happen?

    Or can it be done once, over night?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  11. #11
    Join Date
    Sep 2003
    Posts
    212

    Unhappy

    Quote Originally Posted by Brett Kaiser
    How well do you know DTS?
    Is this to support a devlopers environment with approved changes?
    How big is the database
    How often do you need to apply the changes? Like as soon as the happen?
    Or can it be done once, over night?
    I know DTS pretty well i think.
    no it's not to support a developers environment with approved changes.
    the database is huge (both on source and dest.) but there are only 6 tables being transferred.
    the transfer will be done on a weekly basis (for now), this can be scheduled. No changes need to be applied rite away. but the transfer will be done over nite....

    I think I would just simply set up a nightly job and do a RESTORE or ATTACH from the Sources nightly dump
    rnt these database functions?,... this process is simply a table import/export wizard with sum added functionality...

    This is kinda urgent...

  12. #12
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Is there a reason that you can't just build a DTS package that drops and recreates the tables when you run it? This would ensure that the destination tables matched the source exactly whenever that package was run.

    -PatP

  13. #13
    Join Date
    Sep 2003
    Posts
    212
    Quote Originally Posted by Pat Phelan
    Is there a reason that you can't just build a DTS package that drops and recreates the tables when you run it? This would ensure that the destination tables matched the source exactly whenever that package was run.

    -PatP
    yeah but how do u get the new structure of the table?

    source and dest servers are different...
    i'm not sure i get ur q

  14. #14
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    For the six tables that you are transferring, you need to use a DTS package. When you set up the transfer in DTS, you need to click the little box to drop and recreate. This will drop all six tables each time and transfer the data. Understand???
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  15. #15
    Join Date
    Sep 2003
    Posts
    212

    Talking

    Sorry for all the trouble.

    THX!

    the keyword was: DTS > Copy SQL Server Objects Task

Posting Permissions

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