Showing posts with label execution. Show all posts
Showing posts with label execution. Show all posts

Sunday, March 11, 2012

An error occurred during the execution of the SQL file InstallRoles.sql.

Error text:

An error occurred during the execution of the SQL file 'InstallRoles.sql'. The SQL error number is 446 and the SqlException message is: Cannot resolve collation conflict for equal to operation.
Cannot resolve collation conflict for equal to operation.

Erroroccurred when running 'aspnet_regsql -Sservername-E -ddatabase -A r'
with previously installed mambership scheme ondatabase.

When googling on this issue, one post on forums.asp.net is listed but link is dead...
please help...



ADDITION:

Also I forgot to mentiona few things(thanks to Kris):
dead link url:forums.asp.net/1063397/ShowPost.aspx

An error occurred during the execution of the SQL file 'InstallCommon.sql'.

Hi,

I'm using Microsoft Visual Studio 2005 Beta 2.

I have created Personal Site using Project Template. 1st it started giving me error related to "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed."

Then i made changes in web.config under configuration "User Instance=True" to "User Instance=False".

Now it started giving me error as follows:
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 262 and the SqlException message is: CREATE DATABASE permission denied in database 'master'.
Creating the C__INETPUB_WWWROOT_SITE_APP_DATA_ASPNETDB database...

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

SQLExpress database file auto-creation error:

The connection string specifies a local SQL Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

    If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist. If the applications App_Data directory already exists, the web server account only requires read access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the SQL Server Express database already exists within the applications App_Data directory. Note that revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the SQL Server Express database already exists. This will cause an error when SQL Server Express attempts to create a duplicate of an already existing database. SQL Server Express must be installed on the machine. If the application services database does not already exist, the SQL Server Express service account must have read and write access to the applications App_Data directory. This is necessary because the SQL Server Express service account will create the application services database. The web server account used to connect to SQL Server Express must have rights to create a new database.
      When using the local web server(Cassini) installed with Visual Studio, the logged-in user needs the dbcreator privilege in the appropriate SQL Server Express instance. When using IIS, the process account needs the dbcreator privilege in the appropriate SQL Server Express instance. Only consider granting a process account dbcreator privilege on secure development machines. Do not grant the dbcreator privilege on production machines without fully investigating and understanding the security ramifications of running a production web server with the dbcreator privilege. The process account requiring dbcreator privilege varies depending on operating system platform and ASP.NET configuration settings: For IIS5, and IIS6 running in IIS5 isolation mode, the default web server account is the local ASPNET machine account. For IIS6 native mode, the default web server account is NETWORK SERVICE. If application impersonation is enabled, then the application impersonation account requires the dbcreator privilege. If an explicit account was specified for the web server process (either in the <processModel> element for IIS5 and IIS5 isolation mode, or the application pool account on IIS6), then the explicit account requires the dbcreator privilege.

Stack Trace:

[SqlExecutionException: An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 262 and the SqlException message is: CREATE DATABASE permission denied in database 'master'. Creating the C__INETPUB_WWWROOT_SITE_APP_DATA_ASPNETDB database...] System.Web.Management.SqlServices.ExecuteFile(String file, String server, String database, String dbFileName, SqlConnection connection, Boolean sessionState, SessionStateType sessionStatetype) +783 System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +721 System.Web.DataAccess.SqlConnectionHelper.EnsureValidMdfFile(String fullFileName, String dataDir, String connectionString) +365

The new problem is a result of turning off User Instance. The ASP user doesn't have the permissions to create databases and do the other things specified in the message. User Instance set to true will give your ASP user administration permissions. Your choices are to grant all the approprite database priviledges as specified in the error message to the asp user or to get user instance working. User instance probably didn't work because the asp user didn't have Windows read write permissions to the directory where the database files are located.

Thursday, February 16, 2012

ambiguity performance problem

The first query execution time less than 1 second
But the second query takes around one minute

SELECT ACC_KEY1,ACC_STATUS_LAST FROM PSSIG.CLNT_ACCOUNTS INNER JOIN PSSIG.CLNT_CUSTOMERS ON
PSSIG.CLNT_ACCOUNTS.CSTMR_OID = PSSIG.CLNT_CUSTOMERS.CSTMR_OID
WHERE (PSSIG.CLNT_CUSTOMERS.CSTMR_START_DT >= '1900-1-1 12:00:00') AND
(PSSIG.CLNT_CUSTOMERS.CSTMR_END_DT <= '2106-12-31 12:00:00') AND
(PSSIG.CLNT_ACCOUNTS.ACC_KEY1 >= '0000000000000') AND
(PSSIG.CLNT_ACCOUNTS.ACC_KEY1 <= '9999999999999') AND
(PSSIG.CLNT_ACCOUNTS.ACC_STATUS_LAST in (5,-999)) AND
ACC_KEY1 > '0' ORDER BY ACC_KEY1

SELECT ACC_KEY1,ACC_STATUS_LAST FROM PSSIG.CLNT_ACCOUNTS INNER JOIN PSSIG.CLNT_CUSTOMERS ON
PSSIG.CLNT_ACCOUNTS.CSTMR_OID = PSSIG.CLNT_CUSTOMERS.CSTMR_OID
WHERE (PSSIG.CLNT_CUSTOMERS.CSTMR_START_DT >= '1900-1-1 12:00:00') AND
(PSSIG.CLNT_CUSTOMERS.CSTMR_END_DT <= '2106-12-31 12:00:00') AND
(PSSIG.CLNT_ACCOUNTS.ACC_KEY1 >= '0000000000000') AND
(PSSIG.CLNT_ACCOUNTS.ACC_KEY1 <= '9999999999999') AND
(PSSIG.CLNT_ACCOUNTS.ACC_STATUS_LAST = 5 ) AND
ACC_KEY1 > '0' ORDER BY ACC_KEY1

Note 1 : value -999 deos not exist in the table field ACC_STATUS_LAST
Note 2 : value 5 exist in most of rows about ( 999999/1000000 ) from the table rows count
Note 3 : the number of rows in each table around 15000000

Hi,

didi you have a look at the execution plan ? The execution plan can be seen in QA (using SQL 2k) or Query Pane (using SQL2k5) graphically or by using the statement SET SHOWPLAN ON before isseing the statement.

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||Yeah, and then post it. I would love to see how an equality query is beat out by an OR query. This looks very much like it is probably an optimizer issue, unless the plan shows something obvious...|||

thank you for this notice ,

because there is a big difference between the access plan for both queries

and I don't now why this happen ,

Thursday, February 9, 2012

Alternative to Microsoft?

Andreas,
there are axtiveX controls to control the execution of=20
the various agents. Have a look at this for more detail:
http://www.windowsitpro.com/Articles/Index.cfm?
ArticleID=3D39079&DisplayTab=3DArticle
As for general options, there are alternatives out there.=20
I recently looked at SQL DataCompare, which could be used=20
in a similar way. Some of these alternatives are also=20
significantly faster. However, consider that merge has a=20
huge amount of inbuilt versatility. Merge has automatic=20
range management, a rich set of conflict resolution=20
techniques and assign priorities, the option to=20
dynamically filter data and prefilter snapshots, the=20
ability to configure unidirectional replication (in=20
either direction), the ability to control the batch size.=20
Along with other replication methods, we have subscriber=20
timeouts and inbuild alerts. The list of extras is huge=20
and the price of this functionality is the increased=20
complexity behind the scenes.
is designed for high autonomy.
>--Original Message--
>I have to implement a simple Merge-Replication, using=20
the MSDE.=20
>That means, I can=B4t using Enterprice-Manager.=20
>I don=B4t want using SQLDMO because of redistribution-
problems.=20
>Using T-SQL, it is quite difficult to implement Merge-
Replication.=20
>Are the thrid-pary-products, ActiveX-Controls,=20
Libraries, assembly,
>etc. that manage SQL-Server-Replication very well?
>What do you think about writing your own merge-
replication tool? I
>just wrote a prototyp, and it seems to be very easy.
>pro:
> - no limitations on changing data strukturs while=20
publishing tables
>!!!
> - using a connection in ONE direction (no re-connect=20
from subscriber
>to distritubor necessary, ideal for replication into=20
internet !! )
> - high level of transparency, you can debug each step,=20
you can log
>each SQL-Statement
> - if you want to use a single-sided replication (like=20
transactional
>replication) the subscriber database need not implement=20
anything (no
>table, no trigger, nothing!!)
> - few overhead: just adding 3 triggers per table (like
>MS-merge-replication does) and 2 or 3 system-tables
> - very simple code to switch on replication (just=20
adding the 3
>triggers to each table, independent on data strukture)
>contra:
> - replication-process itself is not tested, each=20
possible event have
>to be implemented and well tested
>I would be happy if someone would like to diskuss this=20
with me, or if
>someone has just written a tool like this, or have=20
another good idea.
>Andreas Lauffer, Germany
>.
>
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:<086e01c51813$bebd2800$a501280a@.phx.gbl>...

> there are axtiveX controls to control the execution of=20
> the various agents. Have a look at this for more detail:
> http://www.windowsitpro.com/Articles...yTab=3DArticle
OK, I tested these controls. There are not bad, but fare away from
beeing perfect. Sometimes the error messages arent detailed enough,
you dont know why replication doesnt work.
In addition, the controls covers only a part of the whole replication
process.

> As for general options, there are alternatives out there.=20
> I recently looked at SQL DataCompare, which could be used=20
> in a similar way. Some of these alternatives are also=20
> significantly faster.
SQL DataCompare looks very nice, but it seems so that it cannot merge
Datasets. You have to tell the tool, wheater to change the Database B
with the changes from A or vise versa.
Maybe there is a possibilty with C#, if you compare all the changes
from Database A and B and generate SQL-Scripts manually.

> However, consider that merge has a=20
> huge amount of inbuilt versatility. Merge has automatic=20
> range management, a rich set of conflict resolution=20
> techniques and assign priorities, the option to=20
> dynamically filter data and prefilter snapshots, the=20
> ability to configure unidirectional replication (in=20
> either direction), the ability to control the batch size.=20
> Along with other replication methods, we have subscriber=20
> timeouts and inbuild alerts. The list of extras is huge=20
> and the price of this functionality is the increased=20
> complexity behind the scenes.
I dont need range management, assign priorities, Data filters, etc.
Comflict management is even much much simpler and comfortable if you
implement this inside your code.
[vbcol=seagreen]
>
>
> is designed for high autonomy.
> the MSDE.=20
> problems.=20
> Replication.=20
> Libraries, assembly,
> replication tool? I
> publishing tables
> from subscriber
> internet !! )
> you can log
> transactional
> anything (no
> adding the 3
> possible event have
> with me, or if
> another good idea.