Hi
I noticed that when I call UniConnection1.GetDatabaseNames(..) then SQL Server reaches a stae where it always starts the databases.
Just wrote an example nothing doing than calling UniConnection1.GetDatabaseNames once. After this the Windows-Event Viewer shows many events "database xy started". This stops only after restarting the sqlServer-Service.
Have I to call another method or is this a bug? Installed version: UniDAC 4.5.9 for D XE2
Peter
GetDatabaseNames: SQL-Server problem
-
AndreyZ
Re: GetDatabaseNames: SQL-Server problem
Hello,
Most probably, these events occur because the AutoClose property of your database is set to ON on the server. For more information about the AutoClose property, please read the following articles:
http://msdn.microsoft.com/en-us/library/ms135094.aspx
http://msdn.microsoft.com/en-us/library/ms190249.aspx
To avoid this problem, you should set the AutoClose property to OFF. For this, you can use the following SQL statement:
Most probably, these events occur because the AutoClose property of your database is set to ON on the server. For more information about the AutoClose property, please read the following articles:
http://msdn.microsoft.com/en-us/library/ms135094.aspx
http://msdn.microsoft.com/en-us/library/ms190249.aspx
To avoid this problem, you should set the AutoClose property to OFF. For this, you can use the following SQL statement:
Code: Select all
ALTER DATABASE YourDatabaseName SET AUTO_CLOSE OFF;Re: GetDatabaseNames: SQL-Server problem
I didn't test if that is the problem but if I want to know which databases are on the server this option doesn't seem useful because it is a command that refers to the database. So I prefer to use this command to get the databasenames:
Peter
Code: Select all
SELECT name FROM master..sysdatabases WHERE dbid > 6