#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Lagos,NIGERIA.
    Posts
    21
    Rep Power
    0

    automate database creation against SQL Server


    Hello ,
    I have to create a complex database repeatedly on different servers running SQL Server.

    I have succeeded in doing this (partly) with SQLDMO object library - i have created the Database , Tables , Stored proceedures . But i cant figure how to create Indexes on the tables using SQLDMO .

    Can any body help me out in this regard ?, is it possible to create the full database on my test server any recreate it on the other servers through SQL scripts ( and the osql utility) ?, Do you have an alternative solution apart from SQLDMO . Please help
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    Well, I can't comment on the object that you listed, but you can just as easily use standard sql statements once you are ready to create the index.

    Just create a connection to the database and execute the queries to create the indexes you need.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Lagos,NIGERIA.
    Posts
    21
    Rep Power
    0

    Thumbs up


    Thank you.

    Could you give me a clue about sql statements to create indexes. I dont know how to go about that.

    Thank you once again.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Lagos,NIGERIA.
    Posts
    21
    Rep Power
    0

    Okay : Tsql statements have created the indexes ,but results are . . .


    i have succesfully created the indexes with Tsql . I created a unique non clustered index on a column on which i expect unique entry's and plan to issue select statements to retrive only one entry at a time . I had expected to see the entrys in this coumn arranged in ascendinding or descending order according to the index but this doesnt happen. Enterprise manager shows that an index exits but i am not sure if the index is having any effect on query speed.

    Is there nothing to worry about ?
  8. #5
  9. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    The index really isn't going to have much effect in this case. But I could be wrong, for better help on this issue I would recommend posting a question in the General Database forum.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Lagos,NIGERIA.
    Posts
    21
    Rep Power
    0
    Thank you. I'll do that

IMN logo majestic logo threadwatch logo seochat tools logo