SQL server express 2005 Creating a "user instance"

How do you create a user instance so that you dont have to be logged on as administrator?

Hi
* A User Instance is a feature of SQL EXPRESS and will be created for you dynamically if and only if you are using a database which is
not attach to any other instance, and you do have SQL Express installed.
* It will not help you to change only the connection string if the database already attach to the other server instance, This will rise an error that the database is in use.
* A user instance need that the user will have proper security permeation on the folder where the database files are.  
* As Olaf mentioned, and once you are meet the above requirements AND the requirements mentioned in the link Olaf post (I dont know why they did not mentioned the above requirements or maybe i did not notice it there...), Then you can use a connection
string which open a user instance.
* This problem is most common in my experience (trying to open a user instance using a database which is already attach to other instance)! for example a database which is attach to constant instance or a database which is attach to some other user
instance.
[Personal Site] [Blog] [Facebook]

Similar Messages

  • VS 2013 Community and SQL Server Express 2005

    Not sure if I'm in the right forum, but I'll give it a shot.   I have a laptop with Vista and SQL Server Express 2005.  I created a db on it and put a lot of time into it. But now the laptop is dieing.  I am wanting to use the db with VS 2013
    Community.  
    I plan to upload the db files to OneDrive from the Vista laptop and then download them to my new laptop that has VS on it.  Will it work?  Is it practical?  Should I go with SQL Express 2008 or higher?
    I'm just learning VS and not sure what to do.  Any help will be appreciated.  Thanks.
    Bill

    Thanks for pvdg42’s help.
    Hi Bill,
    It seems that you have resolved certain issues, you know that one thread for one issue, so for the new issue, it would be better if you could post them in new threads.
    >>The ProgramFiles folder has a folder Microsoft Visual Studio 12.0.  The ProgramFiles(x86) has a VS 11.0 ands VS 12.0 folder.  I did not know this when I downloaded 2013CE.
    It would be related to your windows version 32 bit or 64 bit, for example, the 64 bit version windwos 8.1 in my side, it would setup in this path default:
    C:\Program Files (x86)\Microsoft Visual Studio 12.0
    In addition, my understanding the latest issue “The tables not show in object explorer window” would be related to the database upgraded from the old SQL Server version to the high version. So it would be not the VS IDE issue.
    Of course, if you add a new table in this database, how about the result?
    If you connect to the previous database in this high version, how about the result if you add a table?
    I think if it would works well when  you add a new table in other database of high version in VS2013, it means that it is not the VS IDE issue, the real issue would be related to your previous database.
    My suggestion is that you could post this issue to the SQL Server forum since it is related to the database migration.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
    Sincerely,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do I connect Dreamweaver CS3 to SQL Server Express 2005?

    I have an ecommerce software solution that was built in ASP
    C# that is entirely database driven. I'm running SQL Server Express
    2005 and when I create the connection, it pops up an "HTTP Error
    Code 405 Method Not Allowed" window, and it won't let me view
    anything inside the database. I have checked the credentials and
    permissions, and I'm connecting to the database as sa and I know
    the password is correct. Any idea how to fix this?

    I take it this is using ASP.NET 2.0(C#2005 and Visual Studio
    2005). if so Dreamweaver sucks at this big time. My advice is for
    you to download Visual Web Developer FREE, yes free from Microsoft
    or buy a copy of Expression Web. Adobe missed this big time.
    Dreameaver does ASP.NET 1.1 but not 2.0 or above and now with .NET
    3.5 they might have to do some scrambling for this.
    Either product from Microsoft is quite easy to set up
    database and do this.
    Even though I have used Dreamweaver from version 2.0, as soon
    as you go C#, I would go to MS and use their tools.
    Good luck

  • SQL Server Express 2005 dilemma

    I have a instance of SQL
    server express 2005 that we have connected to some quoting software. The “server” is a installation XP Pro that we are going to update. So, I want to be able to copy the Databases and use them in the same computer after a OS update and a new install of SQL
    Server Express 2005. I have not found specific instructions on how to do that. Any help would be greatly appreciated.

    Backup all databases to 3 different storage places with verification:
    http://technet.microsoft.com/en-us/library/ms189587(v=sql.105).aspx
    Install SQL Server 2012 on the new os.
    Restore the databases.
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • SQL Server Express 2005 to 2014 upgrade and Uninstallation issues

    We have client application running SQL Server Express that connects to a SQL Server 2012 server.  We are attempting to upgrade from Microsoft SQL 2005 express to Microsoft SQL Server 2014
    express – but are having difficulties – especially with uninstall.
    Our understanding is that we needed to follow the following steps:
        First we install Microsoft SQL 2005 express SP4 as required silently
    Start /wait SQLEXPR.exe /qn ACTION=UPGRADE INSTANCENAME="SQLEXPRESS" UPGRADE=SQL_Engine SAPWD=<password>
    SQLACCOUNT="NT AUTHORITY\SYSTEM" SQLPASSWORD= SECURITYMODE="SQL"
        Then try upgrading with Microsoft SQL Server 2014 express, we use following command to do it silently
    SQLEXPR.exe /q /ACTION=upgrade /INSTANCENAME=SQLEXPRESS /ISSVCAccount="NT AUTHORITY\SYSTEM" /IACCEPTSQLSERVERLICENSETERMS
    We see following
        In Control Panel -> Uninstall or change program, we have all the instances listed 2005, 2008, 2012 and 2014.
        How do we uninstall the instance?  , We try uninstalling 2014
    But it is not cleanly uninstalled.
    Questions:
        Is there any way for clean upgrade from Microsoft SQL 2005 express SP3 to Microsoft SQL 2014 express?
        Is there any specific steps suggested to uninstall upgraded SQL 2014 express from system?
        Are we doing anything wrong in commands for silent upgrade?
    Thanks in advance.

    Hello,
    After you perform an in-place upgrade it’s normal to find the binaries and references of the old version of SQL Server on the Start Menu and Control Panel -> Programs and Features. That’s by design. After you have successfully upgraded an instance, you can
    remove the old binaries.
    IfIf you find some remnants after uninstalling SQL Server 2014, please perform the following steps to manually uninstall it:
    1. Uninstall all SQL Server 2014 components you can using Control Panel -> Programs and
    Features
    2. Backup the registry.
    3. Delete the following keys in regedit:
        --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
        --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
    4. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and delete
    all the sub-keys referencing SQL Server.
    5. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete all the keys referencing
    SQL Server.
    6. Rename all the SQL Server folders in the computer like
    C:\Program Files\Microsoft SQL Server and subfolders.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • CF8 and SQL Server Express 2005 connection problem

    Hi. I'm new to SQL Server (I'm running Express 2005 SP2 on
    Vista - local machine) and I can't seem to connect to my datasource
    with CF Admin. I submit the following information to CF Admin:
    CF Data Source Name: MySampleDB
    Database: MySampleDB
    Server: MyMachine\MSSMLBIZ Port: 1433
    User name: Me
    Password: **********
    I get the following error:
    Connection verification failed for data source: MySampleDB
    java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]No
    more data available to read.
    The root cause was that: java.sql.SQLException:
    [Macromedia][SQLServer JDBC Driver]No more data available to read.
    Log On is using built-in account: Local System
    Here's what else i have done so far:
    I have tried using 127.0.0.1 as the server
    I made sure Windows firewall had an exception to allow port
    1433
    I tried ports 1434 and 8500
    I made sure TCP/IP is enabled in SSCM protocols
    I even tried leaving the username and pwd blank and I get the
    following message:
    Connection verification failed for data source: MySampleDB
    java.sql.SQLException: [Macromedia][SQLServer JDBC
    Driver]Error establishing socket to host and port: 127.0.0.1:1433.
    Reason: Connection refused: connect
    The root cause was that: java.sql.SQLException:
    [Macromedia][SQLServer JDBC Driver]Error establishing socket to
    host and port: 127.0.0.1:1433. Reason: Connection refused: connect
    I'm not sure where I'm going wrong. Thanks in advance for
    your help!
    -Kris

    Hi,
    The port might have been blocked. Try setting a new port for
    your sqlserver. That may work for you.
    (Because SP2 always blocks port 1433)

  • Connecting Visual Studio 2003 to SQL Server Express 2005 Edition

    I was wondering if it is possible to connect the SQL Server 2005 Express Version to Visual Studio 2003.If its possible , how can it be done?Cos i seem to have an error if i do so.

    You can check here for basic connectivity information:
    http://msdn2.microsoft.com/en-us/library/ms345332.aspx
    And make sure you check out the complete Express tutorial that Microsoft puts out for free:
    http://msdn.microsoft.com/vstudio/express/sql/learning/default.aspx
    Buck Woody

  • What MS SQL Server Express version should I install?

    Hi, I'm planning to use MS SQL Express for my LabVIEW app under Windows 7.
    There are 3 versions available on the MS site: 2005, 2008, 2012. My first choice is on the latest, however I wonder if there may be any reason to choose an earlier version.
    Also I wonder if the installation could conflict some way with the SQL Server Express 2005 the DSC module uses.
    Sorry for my rather dumb questions but I'm not very strong on the relational databases subject.
    Thanks a lot for any comment.
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

    Ranjeet...
    I am using SQLServer Express 2012 with TestStand 2012 and having no luck getting TestStand to log to the catalog that I have created based off of the standard NI SQL scheme. 
    When creating the tables using the build sql file I found that...
    I ran ito issues with the 'constraint' SQL commands TestStand was using:
    CONSTRAINT STEP_RESULT_FK FOREIGN KEY (UUT_RESULT) REFERENCES  (ID))
    this must actually be:
    CONSTRAINT STEP_RESULT_FK FOREIGN KEY (UUT_RESULT) REFERENCES UUT_RESULT (ID))
    Note.... the 'UUT_RESULT' infront of (ID), without this the statement fails.
    I had to correct all the constraint commands in order to get the tables built.
    Now when I try to use the catalog to log data using TestStand I get...
    An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging'
    An error occurred executing a statement.
    Schema: SQL Server Stored Proc (NI)
    Statement: UUT_RESULT.
    Description: Could not find stored procedure 'InsertUUTResult'.
    Number: -2147217900
    NativeError: 2812
    SQLState: 42000
    Reported by: Microsoft OLE DB Provider for SQL Server
    Source: TSDBLog
    The procedure is present so I am confused. 
    FYI... I am currently using TestStand in eval mode as I am waiting on delivery, could the eval mode be the issue???
    Any help would be greatly appreciated. I have done this before with TestStand 3.5 and SQL Server 2008 with no problems so I am confused why it not working now.
    Pete

  • Can i use sql server express 2008, 2012, and 2014 for commercial purpose?

    Good day,
    I saw that the sql server express 2005 can be used for commercial purpose without buying additional license
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8df18025-fc2b-43c2-8476-532336ff09e3/sql-server-express-for-commercial-use?forum=sqlexpress
    the question is can I do the same for sql server express 2008,2012, and 2014?
    can I install and use sql server express 2008, 2012 and 2014 on an azure vm? specifically
    http://azure.microsoft.com/en-us/pricing/details/virtual-machines/
    A0 instance
    just an off topic question, is it required to pay to use sql server on virtual machines?
    why is there a different pricing here
    http://azure.microsoft.com/en-us/pricing/details/virtual-machines/#Sql

    Hello,
    Yes, you can use all versions SQL Server Express for commercial use. Please read more resources about it.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/01dbc5c3-b5fe-42d4-9eb9-91683cf8285b/can-any-commercial-application-that-uses-sql-server-express-freely-redistribute-the-sql-server?forum=sqlexpress
    https://social.technet.microsoft.com/Forums/en-US/661ebf2e-ff2f-4dae-a8ae-e2179a764c09/sql-server-2012-express-in-commercial-product?forum=sqlexpress
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Convert Existing MDB database files to SQL Server Express

    Hi All,
    Can some one please help me on this:
    1) What is the current version of SQL Server Express?
    2) HOw much SQL Server Express costs (figure about 500 branch servers)
    3)Are there any Tools from Microsoft to convert Access 97 directly to SQL Server express, and how much do they cost?
    4)Server Hardware requirements to run SQL Server Express - disk size, memory size, security settings, pre-requisite, service needed.
    5)Maximum capacity / capabilities of SQL Server Express-max # of simultaneous users,tables,rows,database size.
    6)Any installation instruction for SQL Server Express.
    Thanks in Advance, Pls help
    Thanks
    Tony

    Hi Tony,
    Besides Bruce’s post, firstly, SQL Server Express is a free SQL Server edition,
     you can download SQL Server 2014 Express directly from
    this link and install it on your computer. For how to install SQL Server 2014 Express, please follow the steps in this similar
    blog.
    Secondly, for more information about hardware and software requirements for Installing SQL Server 2014 Express, please review this article:
    https://msdn.microsoft.com/en-us/library/ms143506.aspx .
    Thirdly, SQL Server Express has the following limitations:
    • 1 physical processor
    • 1 GB of RAM
    • 4 GB database size per database in SQL Server 2005 Express and SQL Server 2008 Express , 10 GB database size per database in SQL Server 2008 R2 Express and higher versions of SQL Server Express.
    However, there is no limit to the numbers of databases in SQL Server Express. And there is no technical limit to the number of connection that SQL Express can handle.
    In addition, there are several methods to convert an Access database to SQL Server, such as using
    SQL Server Import and Export Wizard and
    SQL Server Migration Assistant for Access, they are both free tools. For more information about convert an Access database to SQL Server, please review this
    KB article.
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • SQL Server Express with SS Management Studio. Which version is lightest/smallest?

    I’m looking to download the smallest/lightest version of SQL Server Express with SS Management Studio. 
    Which option should I choose?
    http://www.microsoft.com/en-us/download/details.aspx?id=29062
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Hello,
    What's the main propuse you use SQL Server Express edition? If you just use SQL Server in development. You can try to use SQL Server 2012 Express LocalDB.
    LocalDB is a lightweight version of Express that has all its programmability features.SQL Server Express LocalDB runs in user mode, and you can install it more quickly with fewer prerequisites (a minimal set of files necessary to start the SQL Server Database
    Engine) and no configuration.
    Reference:
    Introducing LocalDB, an improved SQL Express
    SQL Express v LocalDB v SQL Compact Edition
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • SQL Server Express 2008 instance fails to start

    I've installed SQL Server Express with a named instance 'SQLSERVER2'. I was able to connect to it and reference it in the management studio. There was a problem though with Visual Studio 9 when running an ASP.NET web application that required connecting to the same instance. So, I went into the configuration manager to change the security level of the instance from network to local service. The change went through but could not restart the instance. That is what has created my next round of problems. I can't go in and change it back to network because the instance is permanently stopped. I cannot start it with the services manager. How can I fix this?
    Here is the connection log:
    2009-12-21 11:36:32.20 Server      Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
     Jul  9 2008 14:43:34
     Copyright (c) 1988-2008 Microsoft Corporation
     Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)
    2009-12-21 11:36:32.50 Server      (c) 2005 Microsoft Corporation.
    2009-12-21 11:36:32.51 Server      All rights reserved.
    2009-12-21 11:36:32.51 Server      Server process ID is 21856.
    2009-12-21 11:36:32.51 Server      Authentication mode is MIXED.
    2009-12-21 11:36:32.53 Server      Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS2\MSSQL\Log\ERRORLOG'.
    2009-12-21 11:36:32.89 Server      This instance of SQL Server last reported using a process ID of 3216 at 12/18/2009 6:06:56 PM (local) 12/19/2009 2:06:56 AM (UTC). This is an informational message only; no user action is required.
    2009-12-21 11:36:32.89 Server      Registry startup parameters:
      -d c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS2\MSSQL\DATA\master.mdf
      -e c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS2\MSSQL\Log\ERRORLOG
      -l c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS2\MSSQL\DATA\mastlog.ldf
    2009-12-21 11:36:33.26 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2009-12-21 11:36:33.29 Server      Detected 2 CPUs. This is an informational message; no user action is required.
    2009-12-21 11:36:35.15 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
    2009-12-21 11:36:36.64 Server      Node configuration: node 0: CPU mask: 0x00000003 Active CPU mask: 0x00000003. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
    2009-12-21 11:36:37.42 spid6s      Starting up database 'master'.
    2009-12-21 11:36:38.98 spid6s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'SQLEXPRESS2'.
    2009-12-21 11:36:39.40 spid6s      SQL Trace ID 1 was started by login "sa".
    2009-12-21 11:36:39.50 spid6s      Starting up database 'mssqlsystemresource'.
    2009-12-21 11:36:39.59 spid6s      The resource database build version is 10.00.1600. This is an informational message only. No user action is required.
    2009-12-21 11:36:40.14 spid10s     Starting up database 'model'.
    2009-12-21 11:36:40.17 spid6s      Server name is 'USER-F19E13BA9B\SQLEXPRESS2'. This is an informational message only. No user action is required.
    2009-12-21 11:36:40.56 spid6s      Informational: No full-text supported languages found.
    2009-12-21 11:36:40.57 spid6s      Starting up database 'msdb'.
    2009-12-21 11:36:40.60 Server      Error: 17190, Severity: 16, State: 1.
    2009-12-21 11:36:40.60 Server      FallBack certificate initialization failed with error code: 1.
    2009-12-21 11:36:40.70 Server      Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.
    2009-12-21 11:36:40.71 Server      Error: 17182, Severity: 16, State: 1.
    2009-12-21 11:36:40.71 Server      TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property.
    2009-12-21 11:36:40.71 Server      Error: 17182, Severity: 16, State: 1.
    2009-12-21 11:36:40.71 Server      TDSSNIClient initialization failed with error 0x80092004, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Cannot find object or property.
    2009-12-21 11:36:40.71 Server      Error: 17826, Severity: 18, State: 3.
    2009-12-21 11:36:40.71 Server      Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
    2009-12-21 11:36:40.71 Server      Error: 17120, Severity: 16, State: 1.
    2009-12-21 11:36:40.71 Server      SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

    Hi,
    This problem can occur if the new Service Account does not have a profile on the machine. To resolve the issue connect to the SQL Server machine using the New Service account. This will create a profile for the user.
    SQL Server creates a self-generated certificate if a certificate is not explicitly specified and/or is not installed. This information is saved in the profile for the SQL Server service account. If the profile has not been created then SQL cannot register the self-generated certificate.
    If there are any more questions, please let me know.
    Thanks.
    ***Xiao Min Tan***Microsoft Online Community***
    What 'New Service account' are you referring to? SQL Server Express resides on my PC where I'm logged on as administrator. I don't know what you mean by connecting to the server. I only know about connecting to the database instance which is the root of the this problem because it can't be started. Sorry for my confusion...

  • Upgrade from SQL Server 2005 to SQL Server Express 2014 Enterprise

    I was just wondering if it is possible to upgrade from SQL Server 2005 to SQL Server Express or will I have to build the environment and then migrate the database?
    Thanks for any help

    Hi Lance_Romance,
    As others’ posts, you don’t have to build new environment and then migrate databases between SQL Server instances, you can use the in-place upgrade strategy to upgrade from SQL Server 2005 to SQL Server 2014 .Please note that SQL Server 2005 SP4 is required
    in this case.
    Before upgrading , I recommend you to use
    upgrade advisor, it can help to analyze your existing SQL Server deployment and inform you of issues that need to be addressed.  In addition, please perform a full server backup prior to performing the in-place upgrade, which will be an important way
    to revert your SQL Server to its previous state if the upgrade does not go as planned. For more details, please review this blog:
    Upgrading to SQL Server 2014: A Dozen Things to Check.
    Thanks,
    Lydia Zhang

  • Transactional replication from a failover cluster instance to a SQL Server Express DB

    Hello,
    I have been poking around on Google trying to understand if there are any gotchas in configuring transactional replication on a instance DB of a failover cluster, to a SQL Server Express DB. Also, this client would like to replicate a set of tables between
    two instances DB's which both reside on nodes of the cluster.
    Everything I've read suggests there is no problem using transactional replication on clustered instance as long as you use a shared snapshot folder. I still have some concerns:
    1) Should the distributor need to live on a separate instance?
    2) What happens in the event of an automatic, or manual failover of a publisher, especially if the distributor does not need to live on a separate instance? I know that when a failover occurs, all jobs in progress are stopped and this seems like a recipe for
    inconsistency between the publisher and subscriber.
    There is a paramount concern, that this particular client won't have staff on hand to troubleshoot replication if there are problems, hence my hesitancy to implement a solution that relies on it.
    Thanks in advance.

    1) Should the distributor need to live on a separate instance?
    Answer: It is recommended to configure the distributor on the different server, but it also be configured on Publisher/subscriber server. (Subscriber in our case is not possible as its a Express edition)
    2) What happens in the event of an automatic, or manual failover of a publisher, especially if the distributor does not need to live on a separate instance? I know that when a failover occurs, all jobs in progress are stopped and this seems like a recipe for
    inconsistency between the publisher and subscriber. There is a paramount concern, that this particular client won't have staff on hand to troubleshoot replication if there are problems, hence my hesitancy to implement a solution that relies on it.
    Answer: If you configure both publisher and distributor on the same server and the SQL instance is failed over, the data synchronization/replication is suspended till the instance comes online. 
    Once the instance is up,all the replication jobs will start again and it will continue to synchronize the data to subscriber. No manual intervention is required.

  • SQL Server Express Performance Limitations With OGC Methods on Geometry Instances

    I will front load my question.  Specifically, I am wondering if any of the feature restrictions with SQL Server Express cause performance limitations/reductions with OGC methods on geometry instances, e.g., STIntersects?  I have spent time reading
    various documents about the different editions of SQL Server, including the Features Supported by the Editions of SQL Server 2014, but nothing is jumping out at me.  The
    limited information on spatial features in the aforementioned document implies spatial is the same across all editions.  I am hoping this is wrong.
    The situation....  I have roughly 200,000 tax parcels within 175 taxing districts.  As part of a consistency check between what is stored in tax records for taxing district and what is identified spatially, I set up a basic point-in-polygon query
    to identify the taxing district spatially and then count the number of parcels within in taxing district.  Surprisingly, the query took 66 minutes to run.  As I pointed out, this is being run on a test machine with SQL Server Express.
    Some specifics....  I wrote the query a few different ways and compared the execution plans, and the optimizer always choose the same plan, which is good I guess since it means it is doing its job.  The execution plans show a 'Clustered Index Seek
    (Spatial)' being used and only costing 1%.  Coming in at 75% cost is a Filter, which appears to be connected to the STIntersects predicate.  I brute forced alternate execution plans using HINTS, but they only turned out worse, which I guess is also
    good since it means the optimizer did choose a good plan.  I experimented some with changing the spatial index parameters, but the impact of the options I tried was never that much.  I ended up going with "Geometry Auto Grid" with 16 cells
    per object.
    So, why do I think 66 minutes is excessive?  The reason is that I loaded the same data sets into PostgreSQL/PostGIS, used a default spatial index, and the same query ran in 5 minutes.  Same machine, same data, SQL Server Express is 13x slower than
    PostgreSQL.  That is why I think 66 minutes is excessive.
    Our organization is mostly an Oracle and SQL Server shop.  Since more of my background and experience are with MS databases, I prefer to work with SQL Server.  I really do want to understand what is happening here.  Is there something I can
    do different to get more performance out of SQL Server?  Does spatial run slower on Express versus Standard or Enterprise?  Given I did so little tuning in PostgreSQL, I still can't understand the results I am seeing.
    I may or may not be able to strip the data down enough to be able to send it to someone.

    Tessalating the polygons (tax districts) is the answer!
    Since my use of SQL Server Express was brought up as possibly contributing to the slow runtime, the first thing I did was download an evaluation version of Enterprise Edition.  The runtime on Enterprise Edition dropped from 66 minutes to 57.5 minutes.
     A reduction of 13% isn't anything to scoff at, but total runtime was still 11x longer than in PostgreSQL.  Although Enterprise Edition had 4 cores available to it, it never really spun up more than 1 when executing the query, so it doesn't seem
    to have been parallelizing the query much, if at all.
    You asked about polygon complexity.  Overall, a majority are fairly simple but there are some complex ones with one really complex polygon.  Using the complexity index discussed in the reference thread, the tax districts had an average complexity
    of 4.6 and a median of 2.7.  One polygon had a complexity index of 120, which was skewing the average, as well as increasing the runtime I suspect.  Below is a complexity index breakdown:
    Index
    NUM_TAX_DIST
    1
    6
    <2
    49
    <3
    44
    <4
    23
    <5
    11
    <6
    9
    <7
    9
    <8
    4
    <9
    1
    <10
    4
    >=10
    14
    Before trying tessellation, I tweaked the spatial indexes in several different ways, but the runtimes never changed by more than a minute or two.  I reset the spatial indexes to "geometry auto grid @ 32" and tried out your tessellation functions
    using the default of 5000 vertices.  Total runtime 2.3 minutes, a 96% reduction and twice as fast as PostgresSQL!  Now that is more what I was expecting before i started.
    I tried using different thresholds, 3,000 and 10,000 vertices but the runtimes were slightly slower, 3.5 and 3.3 minutes respectively.  A threshold of 5000 definitely seems to be a sweet spot for the dataset I am using.  As the thread you referenced
    discussed, SQL Server spatial functions like STIntersect appear to be sensitive to the number of vertices of polygons.
    After reading your comment, it reminded me of some discussions with Esri staff about ArcGIS doing the same thing in certain circumstances, but I didn't go as far as thinking to apply it here.  So, thanks for the suggestion and code from another post.
     Once I realized the SRID was hard coded to 0 in tvf_QuarterPolygon, I was able to update the code to set it to the same as the input shape, and then everything came together nicely.

Maybe you are looking for

  • To delete multiple entries in table control in module pool

    Hi, Please help me out to know , <b>how to delete multiple entries from table control</b> when multiple lines in table control are selected. Regards, Irfan Hussain

  • How do I restore Lion after Hard Drive Crash?

    My MacBook's hard drive failed recently.  It was easy enough to pop in my SnowLeopard DVD and restore the lastest Lion TimeMachine backup.  I was up and running in no time.  Easy. My question is what is the proper procedure in the era of Lion?  This

  • How do I re-install Imovie

    My new Imovie is acting very strange. It doesn't let me move events to an external hd and worse, the content library (transitions, titles etc) has disappeared. Do I just delete it from my app folder or do I get rid of fhe library in the movies folder

  • Profit center accounting in ECC 6.0 with Document Splitting

    HI We are working on a project in ECC 6.0 with document splitting functionality. I would like to know how to transfer Payables/Receivables, Materials, Assets in Profit center accounting. I have done necessary configuration but some how results are no

  • How to find the current users logged in.

    Hi, I have a problem in finding the current users logged into the database and the operations they are doing. If u know pls help me........ Thanks. K.Vijay Choudary Reddy.