Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy can't I connect to a SQL Server 2012 LocalDB shared instance?
    primarykey
    data
    text
    <p>I'm trying to set up a SQL Server 2012 LocalDB (RTM, x64) shared instance on my Windows 7 x64 machine and I can't seem to connect to the shared instance. I'm using an Administrator command prompt for all of the setup. Here's how I'm creating the instance:</p> <pre><code>sqllocaldb create MyInstance </code></pre> <p>Which yields the response:</p> <pre><code>LocalDB instance "MyInstance" created with version 11.0. </code></pre> <p>So far so good. Now I share the instance:</p> <pre><code>sqllocaldb share "MyInstance" "MySharedInstance" </code></pre> <p>Which results in:</p> <pre><code>Private LocalDB instance "MyInstance" shared with the shared name: "MySharedInstance". </code></pre> <p>Still looking good. At this point, I the info command yields:</p> <pre><code>.\MySharedInstance MyInstance v11.0 </code></pre> <p>Connecting to the instance from the owner account (which is an admin) using both an admin or non-admin command prompt seems to work fine. Things come off the tracks, though, when I log in as a regular user (not a windows admin) and try to connect:</p> <pre><code>sqlcmd -S (localdb)\.\MySharedInstance </code></pre> <p>results in:</p> <pre><code>Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Named Pipes Provider: Could not open a connection to SQL Server [2]. . Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired. Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. </code></pre> <p>Increasing the login timeout using the "-l" switch does not help. I can connect to the default v11.0 instance, which is not shared. The info command for the non-admin user yields the same as above except withouth "MyInstance" since it's a named instance owned by the admin user. The following command (which works for the admin user/instance owner):</p> <pre><code>sqllocaldb info ".\MySharedInstance" </code></pre> <p>also results in an error:</p> <pre><code>Windows API call "FileTimeToSystemTime" returned error code: -2147024809. </code></pre> <p>So the question is why can't my non-admin user connect to my shared instance? This seems to defeat the whole purpose of shared instances. And what's with the "sqllocaldb info" command throwing an error when I try to query about the shared instance?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload