in my classic ASP 3.0 application I would like to back up and restore SQL Express database. Should I use SQLDMO or SMO? Whats the difference?In classic ASP you'll have to stay with DMO, but remember that using DMO you won't be able to manage any of the new SQL Server 2005 features. If you expect to do that you'll have to upgrade your code to ASP.Net 2.0 and use SMO. I'd recommend the latter as DMO will not be supported in future releases of SQL Server.|||Thanks for your answer.I am using SQLDMO for backing up and restoring Sql Express database. While Restoring if i have any users connected to db ,restore fails.. Whats the solution for the problem? Do i need to Stop SQL Server ,restore and start again?|||You don't need to stop the server, just kill any connection to the database you're attempting to restore.|||
Allen,
I am using SQLDMO in my C# application for backing up and restoring MSDE
2000 database. Backup operations run fine, but Restoring fails. I've tried to KILL all the connections from the application but get the "cannot use KILL to kill your own process" error. Any ideas to solve this problem?
Thank you in advance for your help.
JC
|||Why I cannot use SMO in VBScript? Is there any limitation? I tried to use SMO in VBScript to connect to SQLExpress and got error :Object not found/object required. Is that the reason?|||VBScript uses COM for its object support and SMO uses the .Net Framework. The only server you can use VBScript to communicate with SMO is the default local instance of SQL Server, and SQL Express usually installs itself in a named instance called SQLExpress.|||Hello Everyone
i have one question please answer if you know, what is my requirement is if i supply the SQL server name i want all the available instances in that sql server for that i m writing code in C#
way no:
1).
ManagedComputer mc = new ManagedComputer(SystemName);
foreach (ServerInstance si in mc.ServerInstances)
{
lstInstanceNames.Items.Add(si.Name);
}
2).
DataTable dtSQLServers = SmoApplication.EnumAvailableSqlServers(servername);
foreach (DataRow drServer in dtSQLServers.Rows)
{
InstanceName = drServer["Instance"].ToString();
}
none of these are working please help me solve this problem
No comments:
Post a Comment