Results 1 to 15 of 15
  1. #1
    Join Date
    Jan 2004
    Location
    Bermuda
    Posts
    40

    Unanswered: CREATE PROC Question

    Gurus help me:

    Here's the scenario...

    Have a SP in the Master DB that creates a NEW, empty DB using a name I give it on the fly.

    I need to Create a SP in that NEW DB.

    Everything will be called from a DTS Package.

    How to do this?

    RobbieD
    Sunny Times...

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Can you tell us why you are doing this...

    Just seems like a very bad idea....

    Are you talking about MSDE?
    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
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'll second the notion that this sounds like a bad idea. It can certainly be done, but there are lots of things that you can do, but shouldn't!

    -PatP

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    "Location: In front of the computer"

    LOL


    Moe, Larry look, it's a DBA with a sense of humor...

    Why I oughtta....
    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.

  5. #5
    Join Date
    Jan 2004
    Location
    Bermuda
    Posts
    40
    Hey Brett:

    It's to automate Replication (see my other posts).

    We have a subjective DB name @ the Publisher that has to be acquired, then replicated EXACTLY.

    This procedure will create the Subscription DB & then create the SP to complete the the subscription itself.

    Clear as Mud?!?!

    (BTW - GREAT reply to the recruiter. He suddenly became less verbose!)
    Sunny Times...

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Sounds ambitious...how many subscribers do you expect to have...
    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.

  7. #7
    Join Date
    Jan 2004
    Location
    Bermuda
    Posts
    40
    Just a single other instance...But we'll do this MONTHLY.

    HOWEVER, we have to duplicate the process in reverse later on.

    Ambitious pretty much hits the nail on the head!!!
    Sunny Times...

  8. #8
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    I wouldn't support that kind of design, but here's your answer:

    use model
    go
    create procedure <your_procedure>...
    go

  9. #9
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Just 1?

    That's a lot of effort to think outside the box....why complicate things?
    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.

  10. #10
    Join Date
    Jan 2004
    Location
    Bermuda
    Posts
    40
    Got any suggestions?
    Sunny Times...

  11. #11
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Did you get it or I have to explain it?

  12. #12
    Join Date
    Jan 2004
    Location
    Bermuda
    Posts
    40
    Sorry rdjabarov:

    I see where you're going, but if I want this code in a SP OR for that matter in an ActiveX module of a DTS, I can't get away with "USE".
    Sunny Times...

  13. #13
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    But your only replicating monthly?

    Why not dump and restore?


    MAYBE 10 lines of code

    Done!
    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.

  14. #14
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    robbied111,

    [walking_into_traffic_definitely_sounds_appealing]

    You don't call this code from anywhere, you write it in QA. Since you already have the code to create a database, you won't have to worry about creating a procedure every time your ASP code creates a database, the procedure will already be there...Can you try it at least?

    [/walking_into_traffic_definitely_sounds_appealing]

  15. #15
    Join Date
    Jan 2004
    Location
    Bermuda
    Posts
    40

    Smile

    THANKS All.

    I'll do some more work & let you know how I fare.

    RobbieD

    (It's past 5pm here - time to blaze!!!)
    Sunny Times...

Posting Permissions

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