April 15th, 2003, 03:48 PM
automate database creation against SQL Server
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
April 15th, 2003, 03:54 PM
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.
April 15th, 2003, 07:02 PM
Could you give me a clue about sql statements to create indexes. I dont know how to go about that.
Thank you once again.
April 28th, 2003, 08:31 AM
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 ?
April 28th, 2003, 08:39 AM
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.
April 28th, 2003, 08:47 AM