Connection failed (Cannot connect) on new install

friismfriism Posts: 4
edited May 16, 2011 7:55AM in SQL Monitor Previous Versions
I'm trying to monitor a SQL Server Express instance. The Windows-level monitoring (filesystem usage etc.) works fine, but the database-level monitoring does not. The interface shows "Connection failed - Cannot connect". The log shows this error:
12 May 2011 12:40 PM	File	List Files: driveletter:\pathtologfiledir 	Cannot connect	IOException	The network name cannot be found.

I've tried using both Windows account credentials and SQL Server authentication using an account with sa rights, with no luck.

What gives?

Comments

  • Hi

    My gut instinct is that this isn't permissions but a configuration issue with this particular instance.

    If you right-click this instance in SSMS and select properties and then go to the Database Settings page, there should be some 'Database default locations' paths. It might be worth checking that these paths exist - I believe we use the 'Log' value to locate various files (logs and trace files etc) and if this path doesn't actually exist we have issues.

    Hope this helps
    Chris
    Chris Spencer
    Test Engineer
    Red Gate
  • The location exists, and creating new databases with default settings works. The path in the error log is the same as in the settings for default log file location. There's no reason List Files should not work there... The database instance is configured to use separate log and data file folders, so the only files in the folder are database log files.
  • Ah it seems that my gut instinct was wrong. Maybe it is a permissions thing then.

    Does the windows account have access to the \\SERVER\C$\ share?

    Regards
    Chris
    Chris Spencer
    Test Engineer
    Red Gate
  • The account does have acces to "\\ComputerName\C$\". The data and log files are stored on local disks (D: and E:). The account cannot access "\\ComputerName\E$\" nor "\\ComputerName\D$\" (the acocunt can access the drive with the traditional naming scheme). Is it required that the drives are accessible via the naming scheme you mention, and if so, what's the best way to expose them like that?
  • Hi

    Yes, a side-effect of the method we use collect error log data is that we need access to the machine/server's administrative share on the drive that stores the log files. This is currently fixed at \\ComputerName\DriveLetter$ but we have an existing enhancement request (SRP-4160) to allow users to specify a more precise share for us to use.

    I've always set up adminstrative share permissions using the Computer Management MMC console (right-click MyComputer/Computer and select Manage). This console differs between operating systems but it seems to be "Computer Management" on Windows 7 and "Server Manager" on Server 2008. In the Computer Management console administrative shares can be maintained in System Tools > Shared Folders > Shares whereas in Server Manager the same functionality seems to be under Roles > File Services > Share and Storage Management. This might be different for older operating systems but would definitely be located somewhere in this particular console.

    Note that the default administrative shares (C$, D$ etc) are often set up by system administrators using domain-level policies. It's uncommon for non-admin users to be able to configure the permissions. The easiest solution is probably to add the windows account you're using to the Administrators group on the machine hosting the SQL Express instance.

    Regards
    Chris
    Chris Spencer
    Test Engineer
    Red Gate
Sign In or Register to comment.