March 20, 2012 at 10:23 am
I was handed off DDL to create a Database.
The DDL was generated in ERwin.
The Primary Keys were auto generated which I do not care for.
It has been a while since I used ERwin and I do not currently have a copy but can't you set up a rule to name the Primary Key?
The naming convention is PK_SchemaName_TableName.
So if you can't do this but the Primary Keys have been dropped and recreated explicitly with the Naming Convention that I specified and you need to apply schema changes. If you load the Database into ERwin it will bring in the Names of the Primary Keys and you can subsequently make your changes in ERwin and generate the script and preserver the new Primary Key names?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 23, 2012 at 7:05 am
Welsh Corgi (3/20/2012)
can't you set up a rule to name the Primary Key?
Yes you can... check here http://erwin.com/uploads/tips_techniques/Using_Naming_Standards.pdf
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.March 23, 2012 at 7:48 am
PaulB-TheOneAndOnly (3/23/2012)
Welsh Corgi (3/20/2012)
can't you set up a rule to name the Primary Key?Yes you can... check here http://erwin.com/uploads/tips_techniques/Using_Naming_Standards.pdf
Thanks Paul!
So if the naming conventions for a Primary key is PK_SchemaName_TableName, for example:
PK_ctl_Accounts_Payable what would you specify in the example that you provided?
Thanks again.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 23, 2012 at 8:10 am
Glad to help.
It can be done, full process is described here http://www.sandhill.co.uk/erwin/ERwinIndexNameRule.asp?dm_i=6J9,CSSW,RPMQO,10I86,1
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.March 23, 2012 at 8:40 am
Thanks again. You saved me a lot of time.
I wrote a lot of code to drop & recreate the PK's that someone created and the vendor told me that if they had to republish the schema from ERwin that it would revert to the System Generated PK's.:w00t:
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy