Showing posts with label express. Show all posts
Showing posts with label express. Show all posts

Thursday, March 29, 2012

Failed to open malformed assembly 'MyAssembly' with HRESULT 0x80040154

Hello,

I wrote SQL Stored Procedures in C# and I am trying to register the asembly with SQL Server 2005 (Express Edition) using CREATE ASSEMBLY statment. I get this following error.

"Failed to open malformed assembly 'MyAssembly' with HRESULT 0x80040154"

Does anyone know how to solve this problem? It is driving me nuts for the last few days. I did enable CLR for SQL Server and also tried re-install SQL Server, but still I get this error.

Thanks in Advance,

Ravi

If this is an OLE/COM Stored Procedure, you need to create it using sp_OaCreate, rather than Create Assembly. Create Assembly is only for pure CLR based stored procedures. Also, using sp_OaCreate to load CLR based code in SQL Server is not supported: http://support.microsoft.com/kb/322884, so it is recommended that you transition your SP to a CLR based SP that does not rely on COM.

Steven

|||

Hi Steven,

Thanks for the reply. Its is a pure .NET Managed code assembly. It only does simple database operations, I didnt even have any new assemblies referenced also other than the ones Visual Studio adds by default ex: System, System.Data. The same assembly works in a differenct computer.

Ravi

|||

Hi Ravi,

Do you get the same error message when creating a different assembly? Perhaps, could you try one of the CLR samples from the BOL samples available here and let me know what happens? http://www.codeplex.com/MSFTEngProdSamples

Thanks,

Steven

|||

Yes, I get the same error for any assembly I create, I will try these samples and let you know.

Thanks,

Ravi

Tuesday, March 27, 2012

failed to install sql server express due to Cannot alter the login 'sa'

Hi,

I am using dell precision m60 laptop with xp professional sp2. I had trouble to install sql server due to "Cannot alter the login 'sa'". I am part of administrators for this machine. Below is the log. Any idea? thanks. -dale

SQL_SUCCESS_WITH_INFO (1) in OdbcStatement::execute_batch
sqlstate=01000, level=0, state=1, native_error=15457, msg=[Microsoft][SQL Native Client][SQL Server]Configuration option 'show advanced options' changed from 1 to 0. Run the RECONFIGURE statement to install.

SQL_ERROR (-1) in OdbcStatement::execute_batch
sqlstate=42000, level=16, state=1, native_error=15151, msg=[Microsoft][SQL Native Client][SQL Server]Cannot alter the login 'sa', because it does not exist or you do not have permission.

Error Code: 0x80073b2f (15151)
Windows Error Text:Source File Name: lib\odbc_statement.h
Compiler Timestamp: Mon Jun 13 14:30:24 2005
Function Name: OdbcStatement::execute_batch@.CnfgSQL@.120
Source Line Number: 91

- Context --

Connecting to SQL Server
ExecuteSqlCommands
USE [master]
<Started SQL statement: Tue Feb 28 15:10:40 2006>declare @.ServerName nvarchar(255) if not exists (select * from sysservers) begin select @.ServerName = Convert(nvarchar(255), SERVERPROPERTY(N'ServerName')) execute sys.sp_addserver @.ServerName, local end
<Finished SQL statement: Tue Feb 28 15:10:41 2006>
<Started SQL statement: Tue Feb 28 15:10:41 2006>ALTER DATABASE model SET RECOVERY SIMPLE
<Finished SQL statement: Tue Feb 28 15:10:41 2006>
<Started SQL statement: Tue Feb 28 15:10:41 2006>EXEC sp_configure N'show advanced options', 1 RECONFIGURE WITH OVERRIDE
<Finished SQL statement: Tue Feb 28 15:10:41 2006>
<Started SQL statement: Tue Feb 28 15:10:41 2006>DECLARE @.Name AS nvarchar(128), @.LangID AS smallint SELECT @.Name=name, @.LangID=langid FROM syslanguages WHERE lcid=1033 EXEC sp_defaultlanguage N'sa', @.Name EXEC sp_configure N'default language', @.LangID EXEC sp_configure N'default full-text language', 1033 RECONFIGURE WITH OVERRIDE
<Finished SQL statement: Tue Feb 28 15:10:41 2006>
<Started SQL statement: Tue Feb 28 15:10:41 2006>EXEC sp_configure N'show advanced options', 0 RECONFIGURE WITH OVERRIDE
<Finished SQL statement: Tue Feb 28 15:10:41 2006>

Looks like if SQL Server 2005 RTM is installed in a Domain where a windows Group named 'sa', 'SA', 'Sa' or 'sA' exists, installation fails when Integrated Security is chosen. However, despite having the Windows group in the Domain, installation with Mixed Security work fine. After having installed successfully with Mixed Secuirty, the server properties can be changed to accept Integrated Security connections only. This should work.|||thanks, Jeff. It is working now.

Failed to generate a user instance SQL Server Express 2005

Hello,

I get the following message after updating to sql server express 2005 advanced.

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.

I noticed that in my C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data I have not databases? How do I get them back?

I also had to add back the aspnet to the permissions and the network and network service to the app_data folder.

Can any one help?

Thanks

Tom

Moving this thread over to the SQL Express forum.

-- Robert

|||

With User Instances the database files are not created in the old data directories, they are normally installed in the main project output directories for the project. In ASP.Net this is normally the ASP_Data directory. When the application starts it will automaticle attach the database to the database engine and set the permissions.

With your problem have you tried a complete rebuild of the application, Did it work befor you upgraded to Express Advanced. Also you might want to try opening up the file and attaching it to the database engine using the management studio just to make sure it is working fine, you can then detach it and try the application again.

|||

Hi Tom,

Did you ever resolve this issue?

You definitely need the databases located in Template Data in order for User Instances to work. If you didn't get this resolved, I would suggest trying to re-run the install. Usually the only reason an installation results in those files going missing is that some SQL process was running at the time of the installation.

If you haven't tried it yet. I'd also recomend moving to SQL SP1 which you can download from http://msdn.microsoft.com/vstudio/express/sql/download/.

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

Monday, March 26, 2012

Failed to generate a user instance of SQL Server

Hi, I have visual basic team 2005 beta that come with sql server express,

and i am trying to connect to a database on my local computer.

And i get this message "Failed to generate a user instance of SQL Server

due to a failure instarting the process for the user instance. The connection will be closed". If u ever heard of the Northwind database it is the one i am trying to

use I don't know much about how to configure server, but i am running this on

Window XP Pro and i am using a a user account with administrator privilages.

I even tried to create a new database and i get the same message.

I get the same problem, not sure if anyone is monitoring this forum tho'|||If you are trying to attach the Northwind database it is most likely failing because the database is still attached to your main SQL Server process. You could either run sp_detach_db 'northwind' to detach the database from the main instance or copy the northwinf mdf and ldf files to another location to play with.|||I'm not trying to connect to any database - I simply created a site to test out the new web portal controls in beta 2. Navigating to a page in the site that uses Web Parts fails with this error - all other pages work fine (including a page with databound controls tied to a Sql Server instance on another machine.)
I understand that the issue is Sql Express is attempting to create a database in the App_Data directory, and that it cannot for security reasons.
I have given full rights for the directory to the Network Services, ASP.Net and IUSR accounts, but to no avail.
The error message indicates that it may be due to the Sql User permissions:
the logged-in user needs the dbcreator privilege in the appropriate SQL Server Express instance.
However there is no way (at least that I can find) to manage user security in SQL Express. I've installed the Express Manager (XM) but it doesn't have any security editing capabilities.
I cannot manage the instance using Enterprise Manager, and I cannot install SQL Server 2005 (believe me, I've tried) to use Sql Server Mansagement Studio.
I'm currently working on a review of the 2.0 Framework and I have a presentation to Management next week, so if anyone can shed some light on this it would be greatly appreciated.
Thanks,
Tyler|||Try changing Setting "User Instance=False" in your connection string and in the dialog.|||I was replying to the guy who was trying to attach Northwind and I assumed when you said you had the same problem you meant you were trying to attach a database also. If you are getting this error, you are trying to open a connection to a database with UserInstance = true and the database file specified in the connection string is in use. With an ASP page, the most common problem is that the IDE still has a connection to the database open and so it's user instance has the database file open with an exclusive lock. I don't know enough about the Web Portal controls to know what kind of databse access it is trying to do.|||No Worries Roger, I appreciate the help!
I'll give the userinstance setting a try and let you know what I find out...
Thanks!
Tyler|||Thanks Roger and Nutty -
Changing the setting to false was the trick! (it was set to true in Machine.config)
Appreciate your help!|||P.S. How do I mark a post as the ANSWER?|||the user instance must be set to false and make sure that your data source is .\SQLEXPRESS or (local)\SQLEXPRESS and not ComputerName\SQLEXPRESS.

SQL server 2005 express disables remote connections. see http://codebetter.com/blogs/sahil.malik/archive/2005/11/5.aspx

Failed to generate a user instance of SQL Server

Hello all,

I have a VB.NET 2005 windows based application that uses the Enterprise Library Data Access Application Block and SQL Server Express and I am having an issue getting the application to install and run from a Setup Package.

I have included the Prerequisites of SQL Server Express, .NET Framework and Microsoft Visual Studio 2005 Report Viewer in my setup project and when I run setup.exe that was created by my Setup Project, it appears everything is installed correctly on the client pc. However, when I go to run the application if get the following error:

10/05 08:44:35 ERROR DHGUI.DHConfiguration DHConfiguration_FormClosed
System.Data.SqlClient.SqlException: 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.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(CommandType commandType, String commandText, DataSet dataSet, String[] tableNames)
at DHFramework.Configuration.GetConfigDS()
at DHFramework.Links.InitializeLinks()
at DHGUI.DHConfiguration.DHConfiguration_FormClosed(Object sender, FormClosedEventArgs e)

I ran the SSEUTIL program with the -l option and it returns the message of:
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.

Can anyone please tell me what it is that I'm doing wrong and how I can get this to work? I'm up against a deadline and this is killing me!

Thanks,

Brent

There appears to be something that SQL Express doesn't like when being installed via a Remote Desktop connection. So I re-installed my application without using Remote Desktop and that seems to have cleared it up.

Brent

|||

Bsmith05 wrote:

I have included the Prerequisites of SQL Server Express, .NET Framework and Microsoft Visual Studio 2005 Report Viewer in my setup project and when I run setup.exe that was created by my Setup Project, it appears everything is installed correctly on the client pc.

how did you do? can you explain this to me, please?

|||If you're referring to how I included the prerequisites, right-click on your project in the Solution Explorer, click on the Publish tab and then you will see a button called Prerequisites. If you click that you will see a list of available Prerequisites. If you select any one of those they will be included in the installation package and they will be installed on the target machine during the setup process.

Hope that helps.

Failed to generate a user instance of SQL Server

Hello all,

I have a VB.NET 2005 windows based application that uses the Enterprise Library Data Access Application Block and SQL Server Express and I am having an issue getting the application to install and run from a Setup Package.

I have included the Prerequisites of SQL Server Express, .NET Framework and Microsoft Visual Studio 2005 Report Viewer in my setup project and when I run setup.exe that was created by my Setup Project, it appears everything is installed correctly on the client pc. However, when I go to run the application if get the following error:

10/05 08:44:35 ERROR DHGUI.DHConfiguration DHConfiguration_FormClosed
System.Data.SqlClient.SqlException: 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.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(CommandType commandType, String commandText, DataSet dataSet, String[] tableNames)
at DHFramework.Configuration.GetConfigDS()
at DHFramework.Links.InitializeLinks()
at DHGUI.DHConfiguration.DHConfiguration_FormClosed(Object sender, FormClosedEventArgs e)

I ran the SSEUTIL program with the -l option and it returns the message of:
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.

Can anyone please tell me what it is that I'm doing wrong and how I can get this to work? I'm up against a deadline and this is killing me!

Thanks,

Brent

There appears to be something that SQL Express doesn't like when being installed via a Remote Desktop connection. So I re-installed my application without using Remote Desktop and that seems to have cleared it up.

Brent

|||

Bsmith05 wrote:

I have included the Prerequisites of SQL Server Express, .NET Framework and Microsoft Visual Studio 2005 Report Viewer in my setup project and when I run setup.exe that was created by my Setup Project, it appears everything is installed correctly on the client pc.

how did you do? can you explain this to me, please?

|||If you're referring to how I included the prerequisites, right-click on your project in the Solution Explorer, click on the Publish tab and then you will see a button called Prerequisites. If you click that you will see a list of available Prerequisites. If you select any one of those they will be included in the installation package and they will be installed on the target machine during the setup process.

Hope that helps.sql

Failed to generate a user instance of SQL Server

Hi,

On my developer machine I don't have any problems with VS2005 and SQL Server 2005 Express. Now I should set up a server (Win2003Web) for a webhosting environment.
Every website has its own application pool with its own application pool user. Now if I try to connect to a db in my data directory I get the following error:

Failed to generate a user instance of SQL Server due to failure in

retrieving the user's local application data path. Please make sure the user has

a local user profile on the computer. The connection will be closed.

I already read the other threads about that subject but they didn't help me because I need to connect to the db with different application pool users.

Can somebody help me, please?!
Thanks, fabianOk, I think my problem is due to the fact that my application pool users haven't got a user profile and they aren't getting one because they can't login. I tried out to give one user the rights to login und afterwards i logged in. Since then the error is gone.
Is this the only solution to my problem? Do I must login with every new application pool user? I hope there's another solution .
I could create perhaps a directory in C:\Documents and...\ for the username but I don't think that would work?! Or create a user profile with a simple c# codesnipped (don't know if there's something like that)?

Any suggestions?

Failed to generate a user instance of SQL Server

Hi,

On my developer machine I don't have any problems with VS2005 and SQL Server 2005 Express. Now I should set up a server (Win2003Web) for a webhosting environment.
Every website has its own application pool with its own application pool user. Now if I try to connect to a db in my data directory I get the following error:

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

I already read the other threads about that subject but they didn't help me because I need to connect to the db with different application pool users.

Can somebody help me, please?!
Thanks, fabian
Ok, I think my problem is due to the fact that my application pool users haven't got a user profile and they aren't getting one because they can't login. I tried out to give one user the rights to login und afterwards i logged in. Since then the error is gone.
Is this the only solution to my problem? Do I must login with every new application pool user? I hope there's another solution .
I could create perhaps a directory in C:\Documents and...\ for the username but I don't think that would work?! Or create a user profile with a simple c# codesnipped (don't know if there's something like that)?

Any suggestions?

Failed to generate a user instance of SQL Server

Hi, I have visual basic team 2005 beta that come with sql server express,

and i am trying to connect to a database on my local computer.

And i get this message "Failed to generate a user instance of SQL Server

due to a failure instarting the process for the user instance. The connection will be closed". If u ever heard of the Northwind database it is the one i am trying to

use I don't know much about how to configure server, but i am running this on

Window XP Pro and i am using a a user account with administrator privilages.

I even tried to create a new database and i get the same message.

I get the same problem, not sure if anyone is monitoring this forum tho'|||If you are trying to attach the Northwind database it is most likely failing because the database is still attached to your main SQL Server process. You could either run sp_detach_db 'northwind' to detach the database from the main instance or copy the northwinf mdf and ldf files to another location to play with.|||I'm not trying to connect to any database - I simply created a site to test out the new web portal controls in beta 2. Navigating to a page in the site that uses Web Parts fails with this error - all other pages work fine (including a page with databound controls tied to a Sql Server instance on another machine.)
I understand that the issue is Sql Express is attempting to create a database in the App_Data directory, and that it cannot for security reasons.
I have given full rights for the directory to the Network Services, ASP.Net and IUSR accounts, but to no avail.
The error message indicates that it may be due to the Sql User permissions:
the logged-in user needs the dbcreator privilege in the appropriate SQL Server Express instance.
However there is no way (at least that I can find) to manage user security in SQL Express. I've installed the Express Manager (XM) but it doesn't have any security editing capabilities.
I cannot manage the instance using Enterprise Manager, and I cannot install SQL Server 2005 (believe me, I've tried) to use Sql Server Mansagement Studio.
I'm currently working on a review of the 2.0 Framework and I have a presentation to Management next week, so if anyone can shed some light on this it would be greatly appreciated.
Thanks,
Tyler|||Try changing Setting "User Instance=False" in your connection string and in the dialog.|||I was replying to the guy who was trying to attach Northwind and I assumed when you said you had the same problem you meant you were trying to attach a database also. If you are getting this error, you are trying to open a connection to a database with UserInstance = true and the database file specified in the connection string is in use. With an ASP page, the most common problem is that the IDE still has a connection to the database open and so it's user instance has the database file open with an exclusive lock. I don't know enough about the Web Portal controls to know what kind of databse access it is trying to do.|||No Worries Roger, I appreciate the help!
I'll give the userinstance setting a try and let you know what I find out...
Thanks!
Tyler|||Thanks Roger and Nutty -
Changing the setting to false was the trick! (it was set to true in Machine.config)
Appreciate your help!|||P.S. How do I mark a post as the ANSWER?|||the user instance must be set to false and make sure that your data source is .\SQLEXPRESS or (local)\SQLEXPRESS and not ComputerName\SQLEXPRESS.

SQL server 2005 express disables remote connections. see http://codebetter.com/blogs/sahil.malik/archive/2005/11/5.aspx

Friday, March 23, 2012

Failed to enable constraints


Hello there,

I have a table under SQL2005 express with 8 fields with a primaryKey defined.

In my BLL in the table adapter there is one "SELECT DISTINCT prodCAT from prods"

The prodCAT is a nvarchar(50) and it is not part of an index or primaryKey.

When I preview the data from my BLL I get the correct data.

I defined a new web form (aspx) and put a ddl (dropDownList) with an objectdataSource that relates to the above sql function/command

and I get a

"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."

BTW when I defined the above SQL in the BLL I got a "The new command text makes the function return data with schema different from the schema of the main query"

Any suggestions?Huh?

Does your BLL return a dataset? If so you shoudl not get the behaviour described.|||

yes, it should return a dataset.

|||

sorry,

it return a data table

|||Try changing it to return a dataset.|||How do I do that??|||Look athttp://www.dotnetjunkies.com/QuickStartv20/howto/doc/adoplus/GetDataFromDB.aspx ADO.NET: Populate a DataSet from a Database|||

Smile

First thanx a lot

If I populate the dataset using this technique by-pass the BLL. Is it the correct way to do things??

best regards

|||There are times when a Business Logic Layer is useful - this does not look like one! You could of course put an entry into the BLL that calls the layer below to get a dataset and pass it up to the GUI.

Failed to create Database

I am trying to create a blank/sample database on Dynamics POS with SQl Server Express. And a error message is read:

Error to create blank/sample database

Error details: failed to create windows users/groups or add the sql loggins

Do you have any idea why is this error message happening, or what can I do to fix it?

What OS did you use to install the point of sale system? And did your Express comes with Management Studio?|||

The operating system I use is Windows XP sp2

No , the Express came only with the server configuration Manager, the server error and usage reporting and the server surface area configuration.

|||OS(operating system), Tell the person Suface area configuration and configuration Manager without Management Studio is too limiting because I have talked to another Dynamics user with Express with everything. The reason is in Management Studio you can right click and create a database, if you make a mistake delete it and start new one. Hope this helps.|||

Thanks, but it didn′t work.

I installed it, and you′re right is easir to manage, even though the database I created appears at the Management studio, the POS keeps on telling failed to create XXX Database, ande Error details described before.

|||if there is no other error description in the installed of the POS application you will either have to use a SQL profiler (If you have another version of SQL Server that comes with SQL Profiler) or contact the vendor of the POS installation to investigate the problem or tell you where to find more detailed information about the error message (They may trace some error information to a trace source like a file)

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

There are steps you are missing in Dynamics, I have found a thread you can post on at the Dynamics forums. It is not a SQL Server issue but Dynamics configuration issue because POS needs to be added to the new database you have created.

http://www.microsoftdynamicsforums.com/forums/forum_posts.asp?TID=1245

sql

Failed to create Application Services Database for SQL Server

I have sql 2005 express installed with VS2005. I tried to install the service database using Aspnet_regsql.exe but always ended up with the same error:

Code Snippet

Setup failed.

Exception:
An error occurred during the execution of the SQL file 'InstallMembership.sql'. The SQL error number is -2 and the SqlException message is: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

-
Details of failure
-

SQL Server:
Database: [aspnetdb]
SQL file loaded:
InstallMembership.sql

Commands failed:

EXEC sp_addrolemember N'aspnet_Membership_BasicAccess', N'aspnet_Membership_FullAccess'
EXEC sp_addrolemember N'aspnet_Membership_ReportingAccess', N'aspnet_Membership_FullAccess'

SQL Exception:
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Web.Management.SqlServices.ExecuteFile(String file, String server, String database, String dbFileName, SqlConnection connection, Boolean sessionState, Boolean isInstall, SessionStateType sessionStatetype)


The database aspnetdb was always created with just 4 tables and 3 views.

Please can someone help me on this, thanks very much!

If the database still exists, the script might wait for the last database connection to close to be able to drop the database. Is there any DROp statement in the sql file ?

Jens K. Suessmeyer

http://www.sqlserver2005.de

failed to connect to the server

I downloaded sql server express 2005 and when I tried to create my first project I received this error

connection Failed

SQL state :01000

SQL Server Error : 109

[Microsoft][ODBC SQL Server Driver][Shared Memory]connection oppen(LoadNetlibs())

connection Failed

SQL state :08001

SQL Server Error : 109

[Microsoft][ODBC SQL Server Driver][Shared Memory]

any one help me please

hi,

you will have to obtain the latest service pack for SQL Server 2000

stop and start the service. i beleive it will solve your problem.

tomer

Wednesday, March 21, 2012

failed SQL Server Express installation

I have tried everything. The installation keeps failing and it seems to be a problem with WMI. Here is my installation summary and the error part of my wmidiag report. Can some one please help.

icrosoft SQL Server 2005 9.00.2047.00
==============================
OS Version : Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Time : Mon May 14 21:05:07 2007
PROHOMESTEVEMAC : The current system does not meet recommended hardware requirements for this SQL Server release. For detailed hardware requirements, see the readme file or SQL Server Books Online.
Machine : PROHOMESTEVEMAC
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.2047.00
Install : Successful
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SQLSupport_1.log
--
Machine : PROHOMESTEVEMAC
Product : Microsoft SQL Server Native Client
Product Version : 9.00.2047.00
Install : Successful
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SQLNCLI_1.log
--
Machine : PROHOMESTEVEMAC
Product : Microsoft SQL Server VSS Writer
Product Version : 9.00.2047.00
Install : Successful
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SqlWriter_1.log
--
Machine : PROHOMESTEVEMAC
Product : MSXML 6.0 Parser
Product Version : 6.10.1129.0
Install : Successful
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_MSXML6_1.log
--
Machine : PROHOMESTEVEMAC
Product : SQL Server Database Services
Error : SQL Server Setup Failed to compile the Managed Object Format (MOF) file c:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof. To proceed, see "Troubleshooting an Installation of SQL Server 2005" or "How to: View SQL Server 2005 Setup Log Files" in SQL Server 2005 Setup Help documentation.
--
Machine : PROHOMESTEVEMAC
Product : SQL Server Database Services
Error : SQL Server Setup Failed to compile the Managed Object Format (MOF) file c:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof. To proceed, see "Troubleshooting an Installation of SQL Server 2005" or "How to: View SQL Server 2005 Setup Log Files" in SQL Server 2005 Setup Help documentation.
--
Machine : PROHOMESTEVEMAC
Product : Microsoft SQL Server 2005 Express Edition
Product Version : 9.1.2047.00
Install : Failed
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SQL.log
Last Action : InstallFinalize
Error String : SQL Server Setup Failed to compile the Managed Object Format (MOF) file c:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof. To proceed, see "Troubleshooting an Installation of SQL Server 2005" or "How to: View SQL Server 2005 Setup Log Files" in SQL Server 2005 Setup Help documentation.
Error Number : 29513
--

SQL Server Setup failed. For more information, review the Setup log file in %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Summary.txt.


Time : Mon May 14 21:07:30 2007


List of log files:
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_Core(Local).log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SQLSupport_1.log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SQLNCLI_1.log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SqlWriter_1.log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_MSXML6_1.log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SQL.log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_Datastore.xml
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_.NET Framework 2.0.log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_Support.log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_Core.log
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Summary.txt
c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0027_PROHOMESTEVEMAC_SCC.log

28836 00:40:38 (0) ** WMI TIMER instruction(s): ........................................................................................... NONE.
28837 00:40:38 (0) ** INFO: WMI ADAP status: .............................................................................................. 2.
28838 00:40:38 (0) ** => The WMI ADAP process is processing a performance library (2).
28839 00:40:38 (0) ** Some WMI performance classes could be missing at the time WMIDiag was executed.
28840 00:40:38 (1) !! ERROR: WMI MONIKER CONNECTION errors occured for the following namespaces: .......................................... 1 ERROR(S)!
28841 00:40:38 (0) ** - ROOT/MICROSOFT/SQLSERVER, 0x80041002 - (WBEM_E_NOT_FOUND) Object cannot be found.
28842 00:40:38 (0) **
28843 00:40:38 (1) !! ERROR: WMI CONNECTION errors occured for the following namespaces: .................................................. 1 ERROR(S)!
28844 00:40:38 (0) ** - ROOT/MICROSOFT/SQLSERVER, 0x80041002 - (WBEM_E_NOT_FOUND) Object cannot be found.
28845 00:40:38 (0) **
28846 00:40:38 (0) ** WMI GET operations: ................................................................................................. OK.
28847 00:40:38 (0) ** WMI MOF representations: ............................................................................................ OK.
28848 00:40:38 (0) ** WMI QUALIFIER access operations: .................................................................................... OK.
28849 00:40:38 (2) !! WARNING: WMI ENUMERATION operation errors reported: ................................................................. 1 WARNING(S)!
28850 00:40:38 (0) ** - Root/Default, InstancesOf, 'SystemRestore' did not return any instance while AT LEAST 1 instance is expected.
28851 00:40:38 (0) ** MOF Registration: 'C:\WINDOWS\SYSTEM32\WBEM\SR.MOF'
28852 00:40:38 (0) **
28853 00:40:38 (2) !! WARNING: WMI EXECQUERY operation errors reported: ................................................................... 1 WARNING(S)!
28854 00:40:38 (0) ** - Root/Default, 'SELECT * FROM SystemRestore' did not return any instance while AT LEAST 1 instance is expected.
28855 00:40:38 (0) **
28856 00:40:38 (0) ** WMI GET VALUE operations: ........................................................................................... OK.
28857 00:40:38 (0) ** WMI WRITE operations: ............................................................................................... NOT TESTED.
28858 00:40:38 (0) ** WMI PUT operations: ................................................................................................. NOT TESTED.
28859 00:40:38 (0) ** WMI DELETE operations: .............................................................................................. NOT TESTED.
28860 00:40:38 (0) ** WMI static instances retrieved: ..................................................................................... 988.
28861 00:40:38 (0) ** WMI dynamic instances retrieved: .................................................................................... 0.
28862 00:40:38 (0) ** WMI instance request cancellations (to limit performance impact): ................................................... 0.
28863 00:40:38 (0) ** -
28864 00:40:38 (0) ** # of Event Log events BEFORE WMIDiag execution since the last 20 day(s):
28865 00:40:38 (0) ** DCOM: ............................................................................................................. 3024.
28866 00:40:38 (0) ** WINMGMT: .......................................................................................................... 5.
28867 00:40:38 (0) ** WMIADAPTER: ....................................................................................................... 0.
28868 00:40:38 (0) ** => Verify the WMIDiag LOG at line #19321 for more details.
28869 00:40:38 (0) **
28870 00:40:38 (0) ** # of additional Event Log events AFTER WMIDiag execution:
28871 00:40:38 (0) ** DCOM: ............................................................................................................. 0.
28872 00:40:38 (0) ** WINMGMT: .......................................................................................................... 1.
28873 00:40:38 (0) ** WMIADAPTER: ....................................................................................................... 0.
28874 00:40:38 (2) !! WARNING: => Verify the WMIDiag LOG at line #28428 for more details.
28875 00:40:38 (0) **
28876 00:40:38 (0) ** 2 error(s) 0x80041002 - (WBEM_E_NOT_FOUND) Object cannot be found
28877 00:40:38 (0) ** => This error is typically a WMI error. This WMI error is due to:
28878 00:40:38 (0) ** - a missing WMI class definition or object.
28879 00:40:38 (0) ** (See any GET, ENUMERATION, EXECQUERY and GET VALUE operation failures).
28880 00:40:38 (0) ** You can correct the missing class definitions by:
28881 00:40:38 (0) ** - Manually recompiling the MOF file(s) with the 'MOFCOMP <FileName.MOF>' command.
28882 00:40:38 (0) ** Note: You can build a list of classes in relation with their WMI provider and MOF file with WMIDiag.
28883 00:40:38 (0) ** (This list can be built on a similar and working WMI Windows installation)
28884 00:40:38 (0) ** The following command line must be used:
28885 00:40:38 (0) ** i.e. 'WMIDiag CorrelateClassAndProvider'
28886 00:40:38 (0) ** - a WMI repository corruption.
28887 00:40:38 (0) ** Under Windows XP SP2, you can validate the repository consistency
28888 00:40:38 (0) ** by executing the following command:
28889 00:40:38 (0) ** i.e. 'WMIDiag CheckConsistency'
28890 00:40:38 (0) ** Note: Under Windows XP SP2, when the repository is checked and detected INCONSISTENT,
28891 00:40:38 (0) ** a new repository is automatically re-created based on Auto-Recovery mechanism.
28892 00:40:38 (0) ** Note that some information can be lost during this process (i.e. static data, CIM registration).
28893 00:40:38 (0) ** However, the original repository is located at 'C:\WINDOWS\SYSTEM32\WBEM\Repository.001'.
28894 00:40:38 (0) ** The computer must be rebooted for the system to work with the re-created repository.
28895 00:40:38 (0) ** Note: The WMI repository reconstruction requires to locate all MOF files needed to rebuild the repository,
28896 00:40:38 (0) ** otherwise some applications may fail after the reconstruction.
28897 00:40:38 (0) ** This can be achieved with the following command:
28898 00:40:38 (0) ** i.e. 'WMIDiag ShowMOFErrors'
28899 00:40:38 (0) ** Note: The repository reconstruction must be a LAST RESORT solution and ONLY after executing
28900 00:40:38 (0) ** ALL fixes previously mentioned.
28901 00:40:38 (2) !! WARNING: Static information stored by external applications in the repository will be LOST! (i.e. SMS Inventory)
28902 00:40:38 (0) **
28903 00:40:38 (0) ** -
28904 00:40:38 (0) ** WMI Registry key setup: ............................................................................................. OK.
28905 00:40:38 (0) ** -
28906 00:40:38 (0) ** -
28907 00:40:38 (0) ** -
28908 00:40:38 (0) ** -
28909 00:40:38 (0) **
28910 00:40:38 (0) ** -
28911 00:40:38 (0) ** WMI REPORT: END --
28912 00:40:38 (0) ** -
28913 00:40:38 (0) **
28914 00:40:38 (0) ** ERROR: WMIDiag detected issues that could prevent WMI to work properly!. Check 'C:\DOCUMENTS AND SETTINGS\STEVE HOFER\LOCAL SETTINGS\TEMP\WMIDIAG-V2.0_XP.CLI.SP2.32_PROHOMESTEVEMAC_2007.05.15_00.37.32.LOG' for details.
28915 00:40:38 (0) **
28916 00:40:38 (0) ** WMIDiag v2.0 ended on Tuesday, May 15, 2007 at 00:40 (W:59 E:6 S:1).

Check out http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124864&SiteID=1 and http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx, both have information about handling WMI problems.

Mike

Monday, March 19, 2012

Failed of install Microsoft SQL Server 2005 Express Edition Kb 921

Hi, do anyone know how to solve this failed install problem of microsoft SQL
server 2005.
Hi
"tazhy7" wrote:

> Hi, do anyone know how to solve this failed install problem of microsoft SQL
> server 2005.
Check the log files in the installation log directory (usually ...\90\Setup
Bootstrap\LOG ) start with the summary and find out what the error message
and information output.
John

Failed of install Microsoft SQL Server 2005 Express Edition Kb 921

Hi, do anyone know how to solve this failed install problem of microsoft SQL
server 2005.Hi
"tazhy7" wrote:
> Hi, do anyone know how to solve this failed install problem of microsoft SQL
> server 2005.
Check the log files in the installation log directory (usually ...\90\Setup
Bootstrap\LOG ) start with the summary and find out what the error message
and information output.
John

Failed of install Microsoft SQL Server 2005 Express Edition Kb 921

Hi, do anyone know how to solve this failed install problem of microsoft SQL
server 2005.Hi
"tazhy7" wrote:

> Hi, do anyone know how to solve this failed install problem of microsoft S
QL
> server 2005.
Check the log files in the installation log directory (usually ...\90\Setup
Bootstrap\LOG ) start with the summary and find out what the error message
and information output.
John

Failed Login SQL Express

Everything works fine with the website I've created except i get a Login failed message every now and then

Failed Login is: NT AUTHORITY\NETWORK SERVICE

Is this to do with the maximum number of connections to the database?

how can i stop this from happening?

AusClans:

Is this to do with the maximum number of connections to the database?

Maybe, but probably not. That would be a different error message. What is the full exception message you get?

Don

Monday, March 12, 2012

failed because MDAC is not present

I have tried to install SQL 2005 Express but It seems that MDAC is not
present in my system Windows 2000 server SP4 spanish.
- What is MDAC ?
- How can I get it to install it ?
Thanks in advance.
The report is the following:
- Minimum MDAC Version Requirement (Error) Messages
* Minimum MDAC Version Requirement
* The system does not have the required version of Microsoft Data Access
Components (MDAC) for this SQL Server release.
For details, see Hardware and Software Requirements for Installing SQL
Server 2005 in Microsoft SQL Server Books Online.
What version of SQL Express are you trying to install and which OS version
are you trying to install it on? MDAC isn't used by the current versions of
SQL Express so this error doesn't make much sense.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Beldor" <Beldor@.telefonica.net> wrote in message
news:uBlXLLSHGHA.740@.TK2MSFTNGP12.phx.gbl...
>I have tried to install SQL 2005 Express but It seems that MDAC is not
>present in my system Windows 2000 server SP4 spanish.
> - What is MDAC ?
> - How can I get it to install it ?
> Thanks in advance.
> The report is the following:
> --
> - Minimum MDAC Version Requirement (Error) Messages
> * Minimum MDAC Version Requirement
> * The system does not have the required version of Microsoft Data Access
> Components (MDAC) for this SQL Server release.
> For details, see Hardware and Software Requirements for Installing SQL
> Server 2005 in Microsoft SQL Server Books Online.
> --
>
|||In the version tab of the file SQLEXPR.EXE it shows:
Microsoft SQL 2005 Server Express Edition - Version: 9.0.1399.6.
I'm trying to install it over Windows 2000 server SP4 in spanish.
Thanks in advance.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> escribi en el mensaje
news:uwBrxaSHGHA.4036@.TK2MSFTNGP12.phx.gbl...
> What version of SQL Express are you trying to install and which OS version
> are you trying to install it on? MDAC isn't used by the current versions
> of SQL Express so this error doesn't make much sense.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Beldor" <Beldor@.telefonica.net> wrote in message
> news:uBlXLLSHGHA.740@.TK2MSFTNGP12.phx.gbl...
>
|||Try installing MDAC from here:
http://www.microsoft.com/downloads/d...DisplayLang=en
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Beldor" <Beldor@.telefonica.net> wrote in message
news:uZMs1DcHGHA.3408@.TK2MSFTNGP12.phx.gbl...
> In the version tab of the file SQLEXPR.EXE it shows:
> Microsoft SQL 2005 Server Express Edition - Version: 9.0.1399.6.
> I'm trying to install it over Windows 2000 server SP4 in spanish.
> Thanks in advance.
>
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> escribi en el mensaje
> news:uwBrxaSHGHA.4036@.TK2MSFTNGP12.phx.gbl...
>
|||Thanks a lot.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> escribi en el mensaje
news:Oh6EUsfHGHA.2460@.TK2MSFTNGP10.phx.gbl...
> Try installing MDAC from here:
> http://www.microsoft.com/downloads/d...DisplayLang=en
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Beldor" <Beldor@.telefonica.net> wrote in message
> news:uZMs1DcHGHA.3408@.TK2MSFTNGP12.phx.gbl...
>

FAILED again! Express fails to install on Windows server 2003

VERY frustrating. I have tried uninstalling. removing regietry keys. removing with the windows unistaller etc... to NO avial. See my Core.Log:

Error: Action "LaunchLocalBootstrapAction" threw an exception during execution. Error information reported during run:
"c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\setup.exe" finished and returned: 3221225477
Aborting queue processing as nested installer has completed
Message pump returning: 3221225477

And my Core(local).log:

Error: Action "ReportChainingResults" threw an exception during execution.
DwLaunchMsiExec() returned : -1073741819
Error Code: -1073741819
Windows Error Text: Source File Name: sqlchaining\sqlchainingactions.cpp
Compiler Timestamp: Mon Jan 16 02:06:13 2006
Function Name: sqls::ReportChainingResults::perform
Source Line Number: 3140

Error: Failed to add file :"C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0014_APPS_.NET Framework 2.0.log" to cab file : "C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\SqlSetup0014.cab" Error Code : 2
Running: UploadDrWatsonLogAction at: 2006/11/17 1:32:51
Message pump returning: 3221225477

PLEASE Help.

Rich

Have you had previous versions of SQL 2005 installed on the same computer? Which versions?|||No its a clean install of Windows 2003 Sp1 and its not a DC. Crazy.|||

Moving to the setup forum.

Mike

|||

Hi Rich,

The error code looks like this:

# for decimal 5 / hex 0x5
ERROR_ACCESS_DENIED winerror.h
# Access is denied.

Are you running with Admin privileges when trying to install the SQL product?

|||any updates?|||

Fin,

Thanks for asking. I decided to wipe the server clean, install 2003 and all the updates. Then try the express install. This time it worked.

Thank,

Rich