March 8, 2006 at 10:58 am
I have a problem with SQL Manager,
My C# application (which is deployed) runs on MSDE without problem and access to the Database without any problem.
BUT !
the SQL Manager lists still remain empty (No Server, and no services !!!)
and my customers are answering me all day long about that poblem, which is not mine...
the problem give to my application a bad image !!!
1 - In the process list I have :
sqlservr.exe, / Processor 1,
sqlservr.exe / Processor 0,
sqlmangr.exe,
monappli.exe,
services.exe,
sqlagent.exe.
2 - On the running Services :
2 times MSSQL$MyInstance State=running Type=automatic
MSSQLADHelper State=stopped Type=Manual
3 - In the registry :
in HKLM\SYSTEM\Current Control Set\Services\SQL Agent$myInstance, I have:
DependOnGroup = empty
DependOnService = MSSQL$MyInstance
DisplayName = SQLAgent$MyInstance
ErrorControl=1
ObjectName = localSystem
Start = 2
Type=10
I don't understand why SQL manager is empty ?
It doesn't reflect the state of SQL Server which is running ? Why ?
I Wrote MyPC\MyInstance by hand on the list of the SQL Manager. It works !
But when stopping the PC and Restarting it, the SQL Manager doesn't care ! the lists are empty again.
My Question is :
How could I be sure that the SQL manager reflect the Server and Instances running whith my application, after having deploy it ?
Thanks for Help !
March 8, 2006 at 9:09 pm
i think the issue is permissions. the user running the app does not have write permissions to HKey LocalMachine;
When you type in an instance in the SQL manager, it tries to write to both HKLM and HKCC, failure to get to the HKLM errors are supressed, and only the current config data is written, which are lost when the user logs off or the PC gets restarted.
if the machine is Win2K, have the end user's network admin grant permission to KHLM by running use REGEDT32 >> select the right branch>>security>> Add Domain users or Authenticated Users group with full permission.
test it, see if that was the issue.
it works fine on your developer machine because you are running as a local admin;
try creating a new user "FAKEUSER" on your machine, that is only in the USER group, log in as that FAKEUSER and see that you can duplicate the issue, because the ?USER group does not have permission to write to the registry.
this is a typical issue where a developer runs all apps as Administrator and sa, but that doesn't emulate what a real agency might have out there for security.
if an end user had all sorts of rights to the registry, they could install AOL instant messanger or something equally horrible. (is tehre anything that is actually just as evil as AOL IM?)
Lowell
March 9, 2006 at 12:39 am
My application is installed in all target PC by the customers, the all have a user with administrator permission.
So I think, it is not the problem.
Thanks and don't hesitate to give me more informations.
March 9, 2006 at 1:53 pm
You say these instances are MSDE? Were they installed with "DisableNetworkingProtocol=0" (false)?
By default, MSDE installs without any networking protocols. SQL Manager will only browse and pick up SQL Server instances that are accepting TCP protocol (and I think only default port 1433 so that non-default instances don't show, but I am pulling that from my (fragmented) memory, so I may be wrong there).
When you enter the server/instance name in SQL Manager, it attempts connection by any protocol. If MSDE is on the same machine and has no network protocols in use, it will connect use Shared Memory protocol.
To enable TCP protocol, use the Server Network utility (svrnetcn.exe) to enable. It may not be installed with MSDE, but you should be able to copy it from a SQL Server installation and use it there. I am not sure there is another way to setup network protocols.
Hope this helps
Mark
March 9, 2006 at 8:41 pm
wow thanks that was it !!!! to include network protocols on install just add DISABLENETWORKPROTOCOLS=0 in the msde setup.ini file
thanks again
March 10, 2006 at 4:41 am
WAIT! I wouldn't necessary recommend that. If the database is NOT going to be accessed from remote systems, it is better to disable the networking protocols to prevent access to stuff like Slammer. That is why it is the default setting.
I think it is better to forget about trying to use SQL Manager. I suspect you are using that tool for the user to make sure MSDE is running when needed. MSDE, by default, does not start automatically. You can modify the service class to make it start automatically.
I have written several apps that use local MSDE databases. What I do is use SQL-DMO to check the status of the service and database before creating the connection in the application. In this way, MSDE is only started when the application needs, so it doesn't hog system resources on the users system when it is not needed.
Mark
March 13, 2006 at 5:10 am
Thanks again. Thanks a lot...
I will try later. I'he too much to do now.
You're right when writting :
I suspect you are using that tool for the user to make sure MSDE is running when needed. MSDE, by default, does not start automatically.
You're right again when writting :
it doesn't hog system resources on the users system when it is not needed
but,
Are you sure it's more safe to start the server each time it is needed ?
What will appens if the server, doesn't start as I hope ? I've seen times when MSDE doesn't start...
In an another way, my customers think my application starts slowly...
March 13, 2006 at 6:51 am
It's not that it's more safer to start MSDE when needed (although I suppose it is safer, in the way that if it is not running, it cannot be hacked).
The idea is that MSDE would not be consuming resources (memory, processor time) on the user's workstation if it was not needed. Remember that MSDE is SQL Server, and will take up as much memory as SQL Server.
Waiting for MSDE to start in the application startup will add more time to startup. But there are many ways to make your application appear to start quickly: show splash screens while loading, asynchronous processes and preloading components while waiting for user logon entry, etc.
Mark
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply