With the introduction of SQL Server 2005, Microsoft has created a new .NET management API for SQL Server called SQL Management Objects (SMO). As I started working with SQL Server in earnest following its release I discovered a few limitations that I hoped to correct using SMO. This article describes those problems and how to use SMO to script database objects.

As part of optimising the perf of SMO it no longer brings back all properties by default as DMO used to, an attempt has been made to guess the most common properties and to fetch those by default. System is not one of those so when you retrieve it, its not efficient. You can force SMO to pull back the System property.

Yep, it is _very_ slooooow indeed !I have this appl wich scripts all my servers userdatabases according to settings in a "mysqlservers"-database.With sqldmo it works at an acceptable speed, with smo it takes more than double that time!

Here 'tefen' is the domain name, and 'pespi01' is my sql server's computer name(this is present in tefen domain). When i run the application i got the following error message 'Failed to connect to server tefen\pespi01'.

I tried using the IP address of computer 'pespi01'. But the same error message is coming.

Can any one please explain is there any thing wrong in the above code or do i need to anything more for this.

here 'strSQLServerName' is the server name (like 'pespi01' as i mentioned in my previous mail). this SQL Server authentication is successful.

I have a small doubt regarding windows authentication. when i pass server name directly to 'Server sqlServer = new Server(sqlServerName)' it is failing.

I observed that if the sql server is present in the same domain, there is no problem. Is it the expected behavior of SMO. Can any one explain me is there any way to connect & get information from a different domain SQLServer with windows authentication?