c# - Scripting through SMO -


क्या Microsoft.SqlServer.Management.Smo का उपयोग कर एक स्क्रिप्ट चलाने के लिए संभव है?

मैं सक्षम हूँ Microsoft.SqlServer.Management.Smo.Scripter वर्ग का उपयोग करके स्क्रिप्ट उत्पन्न करने के लिए। मैं इसे संपादित करना और डेटाबेस ऑब्जेक्ट की प्रतिलिपि बनाने के लिए इसे चलाऊंगा।

धन्यवाद।

आप यह कोशिश कर सकते हैं। दूसरा विकल्प एसक्यूएल कॉमांड ऑब्जेक्ट का उपयोग करना है।

  स्ट्रिंग स्क्रिप्ट = "प्रोजेक्ट बी के रूप में चयन करें getdate ()"; डेटाबेस डीबी = नया डाटाबेस (नया सर्वर ("सर्वर नाम"), "डीएनएनएम्मे"); db.ExecuteNonQuery (स्क्रिप्ट);  

Comments

Popular posts from this blog

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

iphone - How do I make a UIPickerView in a UIActionSheet -

excel - Populate list via a bi-Condition -