Thanks for replying. I have tried to do that but it gives me a error "unable to cast object of type 'Microsoft.sqlserver.management.smo.simpleobjectkey' to type microsoft.sqlserver.management.smo.agent.'jobobjectkey'."
I ma not sure where i am doing wrong.
I clicked on job. then slect new. In steps I select new. In step screen there are parameter I set
type:t-sql
database: name of my datbase
then copied the procedure in command window.
I am not sure what is wrong.