|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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 ? |
|
#5
|
||||
|
||||
|
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.
|
|
#6
|
|||
|
|||
|
Thank you. I'll do that
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > automate database creation against SQL Server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|