Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Prevent Selection of the nvarchar Data Type When Creating Table 1

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
hello again,

This post is sort of related to another thread javascript:eek:penindex(450,350,' but not directly.

I would love to be able to remove the nvarchar data type from the drop-down list of available data types to choose from when creating/changing a table. There must be a way to edit the system tables to accomplish this.

Someone please help me before I go postal/machine-gun! :)

Thanks John, frustrated DBA
 
well... obviiously I dont know how to copy and paste a Thread number
 
hmmm..
The spt_provider_types table in .master looks promising. The data types are there. I wonder what column 'Best_Match' is for?

(This is 2000 SP3)

John
 
And then what happens when you run across a situation where you need nvarchar? If your developers can't be trusted to follow your rules, then take away their priviledges.

Questions about posting. See faq183-874
 
agreed.i would be very carful about trying to remove them. what happens if a microsoft patch has need of the datatype?

fixing it on the user side is the best course of action. if the users wont follow the rules, you take away their privilages. but make sure you have a written policy on it and sign that they have read it. that way they cannot say they did not know.
 
Corran007, you make an excellent point. As it stands Microsoft does use nvarchar for many of its system procedures. It could be quite dangerous to try to remove nvarchar as a datatype.

Questions about posting. See faq183-874
 
OK... OK I won't disable nvarchar :)

now, where did I put that gun?

John

(Thanks for prodding me to reconsider my rather exterme solution.)
 
Ok how about another solution. I presume your developers are not developing on production and therefore the only people who will be hurt with this solution will be developers. Tell them that anytime from now on that you see a table with an nvarchar field defined on a development database you are going to drop the table. Probably only take one or two dropped tables before they come around to your way of thinking. It's cheaaper than bullets and less likely to lead to prison time. But don't do this on production. And make a backup first, so you can recreate the table after they whine a bit.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top