text to ntext
-
Can anyone help me ? I have to change a text fileld to ntext field with very large volume of data. I am using MS-SQL 2000. updating and droping takes too much time and converting syscolumns is leading unwanted results.
Unfortunately, updating and dropping is the only convenient way to do it. You COULD take the database offline, export all the data from the table to flat file, drop and recreate the table with the new layout, and then re-import the data previously exported. But This will most likely take just as long or longer than just letting Enterprise Manager do things its own way.
Grim
(aka Toby)
MCDBA, MCSD, MCP+SB
-
Unfortunately, updating and dropping is the only convenient way to do it. You COULD take the database offline, export all the data from the table to flat file, drop and recreate the table with the new layout, and then re-import the data previously exported. But This will most likely take just as long or longer than just letting Enterprise Manager do things its own way.
Grim
(aka Toby)
MCDBA, MCSD, MCP+SB
Thanks for your answer Grimolfr, I badly need that and if I don't, it is as simple as I cannot do this. I don't need to detatch the database, what I am currently doing is adding a col, updating the new col from prev col, deleting the actual col and updating the syscolumns to rearrange it's order. Everything works fine but, the updation time. I wanted to know if it is possible to get EM using COM, so that I can open table in design mode and change the property from within there (possibly using sp_oacreate or sqldmo objects) and may be I Look a bit dummy suggesting all these stuffs but who knows if gurus has some hidden secreats.
-
Thanks for your answer Grimolfr, I badly need that and if I don't, it is as simple as I cannot do this. I don't need to detatch the database, what I am currently doing is adding a col, updating the new col from prev col, deleting the actual col and updating the syscolumns to rearrange it's order. Everything works fine but, the updation time. I wanted to know if it is possible to get EM using COM, so that I can open table in design mode and change the property from within there (possibly using sp_oacreate or sqldmo objects) and may be I Look a bit dummy suggesting all these stuffs but who knows if gurus has some hidden secreats.
Well, certainly you can use SQLDMO to do this. The problem is that there's really no method faster than what you're already doing. The best you can hope for, I think, is to put the database in single-user mode where you're the only user, and not perform the changes in a transaction. BTW, be careful modifying the system tables directly. This can often have unexpected results, and cause the table to become pretty much useless.
Grim
(aka Toby)
MCDBA, MCSD, MCP+SB