I'm have developed a web site with .Net 2.0 and Sql Express. To make a loooong story short, I have managed to lose the myDB.ldf file. I still have the .mdf file but can not get my app to connect due to the .ldf missing. Please help if you can. Many thanks!!!
The error I get is: "Cannot open user default database. Login failed.
Login failed for user 'myComputerUser'.
File activation failure. The physical file name "D:WebProjectswebProjectApp_DatamyDb_log.ldf" may be incorrect. "
In the last one and half years, I used the Northwind Database in SQL Server Management Studio Express (SSMSE) to learn the programming of SqlConnections, Data sources, Database Exploere, ADO.NET 2.0, etc. via VB 2005 Express.
The Northwind Database in my SSMSE got lost very often, but I was not aware of it. How can I know where the Northwind Database is used or processed by my VB 2005 Express projects that were the examples of some tutorial books or my trial projects? How can I release the Northwind Database back to my SSMSE from the VB 2005 Express projects? Please help and advise.
I have lost LOG file, and I can not open database, (Error 5105) enterprise manager can not create database is it possible to not rewrite database ?? br
Hi. I've following problem: - Customer played with his logical drives in a CPQ smart array - He played too much: he lost the drive with the LDF-File - Now the SQL-Server is in a kind of wired mode; you can start and stop it, but you cannot connect to (neiter 'sa' nor any other user available before) In fact the mode is not wired: what shall he do other when most important file is missing... :o - The problem for me now is:
> How can I get the Enterprise Manager or Query Analyzer up and running again to start a restore?
PS: The restore is to be done from a tape-library running Veritas Backup Exec + SQL-Agent
PPS: Error-log says (what I already know): 2005-10-04 17:18:02.69 spid11 Device activation error. The physical file name 'H:DEVLOG1DEVLOG1.ldf' may be incorrect.
I made a mistake in copying my database and somehow lost my file header. How do I recreate my file header without losing all the data in my database? Is there a way to undo my mistake?
Can anyone help me to recreate the .NDF file if it was lost and not restorable? I have a stored procedure written that will then help me rebuild all indexes on all tables, but I can't seem to figure out how to create the index file again so I can run it. I have tried index files from other databases to no avail. There is no backup to go to.
here is my error message wich can also be seen live at www.aspdoug.com/menu log in with user: doug pass: macromedia! -------------------------------------------------------------------------------------------------------------------------------- Server Error in '/menu' Application.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 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 and write 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. 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 the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database. Sql Server Express must be installed on the machine. The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts. Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +737554 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +114 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +421 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +133 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +68
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Below is my web.config file. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------<?xml version="1.0"?><configuration>
<system.web><!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. Visual Basic options: Set strict="true" to disallow all data type conversions where data loss can occur. Set explicit="true" to force declaration of all variables.--> <compilation debug="false" strict="false" explicit="true"></compilation> <pages><namespaces> <clear /><add namespace="System" /> <add namespace="System.Collections" /><add namespace="System.Collections.Generic" /> <add namespace="System.Collections.Specialized" /><add namespace="System.Configuration" /> <add namespace="System.Text" /><add namespace="System.Text.RegularExpressions" /> <add namespace="System.Web" /><add namespace="System.Web.Caching" /> <add namespace="System.Web.SessionState" /><add namespace="System.Web.Security" /> <add namespace="System.Web.Profile" /><add namespace="System.Web.UI" /> <add namespace="System.Web.UI.WebControls" /><add namespace="System.Web.UI.WebControls.WebParts" /> <add namespace="System.Web.UI.HtmlControls" /></namespaces> </pages> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Forms" /> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors>--> </system.web> </configuration>
------------------------------------------------------------------------------------------------------------------------- MY host told me that they do not support sqlexpress and to change it MySql 2005 or something. im using hostmysite.com builder plan.
I have Full database backup upto previous day and transaction logfile of Today transaction. my database has crashed. I have restored previous day's Full backup. I have faced difficulty to restore today's transaction from today's transaction log. What are the steps to restore full database back and one day's transaction log file. Note: there is no differential database backup and transaction backup.
Hi, I was sent a .bak file which I need to open and place in sql server express. I googled this but did not come up with any clear instructions. Can some please give me a good link that explains this. Thanks
Hi all, I have the "Northwind" database in my Sql Server Management Studio Express.
In my C:ProSSEAppsSamplesForChapter02Chapter02 folder, I have the following 2 files: (1) ListColumnValues (MS-DOS Batch File) sqlcmd -S .sqlexpress -v DBName = "Northwind" CName = "CompanyName" TName = "Shippers" -i c:prosseappschapter02ListListColumnVales.sql -o c:prosseappschapter02ColumnValuesOut.rpt (2) ListColumnValues (Microsoft SQL Server Query File) USE $(Northwind) GO SELECT $(CompanyName) FROM $(Shippers) GO When I ran the following SQLcmd: C:ProSSEAppsSamplesForChapter02Chapter02>ListColumnValues.bat I got the following "ColumnValuesOut.rpt" with error messages:
'Northwind' scripting variable not defined. Msg 102, Level 15, State 1, Server L1P2P3SQLEXPRESS, Line 1 Incorrect syntax near '$'. 'CompanyName' scripting variable not defined. 'Shippers' scripting variable not defined. Msg 102, Level 15, State 1, Server L1P2P3SQLEXPRESS, Line 1 Incorrect syntax near 'CompanyName'.
I copied these T-SQL statements from a book and I do not know how to correct them. Please help and tell me how to correct these errors.
How do I move a tab serperated file into a table in SQL express using sql express? I need simple fast way to to this.
I can export all my access file into tab or comma files and then build the new tables and import them. I tried upsizing the table in access but sql express will not accept them at all and I cant find a way around it.
I am at the moment participating in a project and we have run into a few difficulties which I'm hoping you guys may be able to help with.
In short, we are attempting to construct an online manager game related to cycling. Although the database has been created already in SQL Server Express and some of the website has been made, we also would like to create an executable file (written in Visual Basic) which can be placed on the server and scheduled to execute once a day. The file should read data from the database and perform its defined calculations, before writing back to the database again for further use on the website.
The problem at the moment is that I can't figure out how to make the file recognize the database in such a way that I am able to use read/write statements with SQL directly. I have tried looking numerous places online but all sources show examples of creating web forms and using buttons and such to call functions whereas I simply want one compiled executable.
If you have any advice or recommendations on how I may tackle the problem I would appreciate the help greatly.
Essentially it a question of what is needed (perhaps in terms of code) for me to make the VB file in such a way that I can do SQL queries on it independent of any user interaction. We want the code to handle the database updating on its own each day.
I have an app that i use to connect to the database file locally. The app collects the information schema tables data. Once i have connected to the file once i cannot come back and connect again because it says the file is in use. but if i close the app and reopen i can connect just fine.
This happens with every db file i connect to. I can connect to several different files in a row but as soon as i try to connect a second time it pops up in use.
What am i missing? It has to be something in my app since it releases it as soon as the app is closed. Let me know what else i need to provide on how the app runs if noone has come across this issue yet. One other note is that i am connecting to it in a background worker. I have already tried to dispose of the background worker but that is not what is holding the file.
How do I move a tab serperated file into a table in SQL express using sql express? I need simple fast way to to this.I can export all my access file into tab or comma files and then build the new tables and import them. I tried upsizing the table in access but sql express will not accept them at all and I cant find a way around it.Thanks
I need to be able to update a database in SQL Server Express from an Access database that a user will be uploading. Can anybody give me some suggestions about how to accomplish this besides reading in each record and updating the SQL server one record at a time. David
Hello, I am pulling my hair out here... I don't seemt o be able to solve this issue. I am Developing a new website using Sql Express. But I get this error sporadically claining that the "file is in use by another process". Thinking it is the Express management Studio I shut it down.... Nope still errors.. Ok maybe it is the XSD designer.... So I close that XSD designer window in visual Studio.... nope still erroring. hmmm... Maybe I'll shutdown Visual Studio and try that... Nope still gives the error. Ok let restart the SQL Express Services.. Nope still errors. OK OK REBOOT... Now it works for about two testing iterations. Then it starts all over.... What is locking this file? Is their any tools out there to tell me what is locking the File? I am using XP Home Edition, VS 2005 Statndar Edition with Sql Express... Thanks Chris
Hi, i'm still rather new to sql server and sql server express. My problem is that I have 50 fixed width files(actually was LIS file type, converted to txt using notepad). Each text file has about 50 columns of data. What would be the best way to get this into sql server db?
We use SQL Express in our Applikation in file mode. Users can create databases in different folders and pathes. Each time a user loggs into our applikation, we attach the db he choosed, and every time he closes the applikation, we detach the db.
While this works fine in Windows XP, we have serious problems with Windows Vista.
We tried a connectiong string with "attachdbfilename", "sp_attach_db" and SMO server.AttachDatabase
Where could we get some more advice for our problem. It is in fact an issue of UAC.
I am having a hard time finding the executable file to start sql express 2005 or SQL exress 2005 with advance services. I installed the SQL express and had the desktop icon....but I thought i would need to uninstall it before installing SQL 2005 with advance services. Now I can not find anything to start the program.
Hello Everyone, I am trying to restore a bak file which came with code for a tutorial. I think it is safe to restore, but sql server 2005 express has the following problem when I try to restore it. TITLE: Microsoft SQL Server Management Studio Express------------------------------ Restore failed for Server 'BOBSQLEXPRESS'. (Microsoft.SqlServer.Express.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476 ------------------------------ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'C:Program Files (x86)Microsoft SQL ServerMSSQL.1MSSQLDashboard.mdf'. (Microsoft.SqlServer.Express.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&LinkId=20476 The links given for help have no information about the problem and I'm not really sure where I should be looking to solve this. I'm a newbie to databases so if you could provide a step-by-step answer that would be best. Thanks in advance. Robert
Hi All, I have a .sql file with all my queries written in it. Now I want to know, Is it possible to run this sql file in SQL Server 2005 Express Edition like we can do in Oracle? If it is possible then tell me how to do it?Thanx in advance for any kind of help.Regards,Paramhans Dubey.
Hi,i have a MDF sql server express database used by an asp.net application (located in local dir App_Data on the same computer as the Sql server).I would like to integrate it into Sql Server express. I mean: NOT only attach it, but transform it as it was created direclty into Sql server and not in Visual Web Developper tool.In Studio Management, i rightclicked on Databases and i took 'Attach'. Now i can see and manage that database from Studio Management, but it still refers to the local path of the MDF file. I see that by doing this query: select * from master...sysdatabases How can i make it a full database of Sql server?Thanks Tartuffe
I'm a little stuck here. How can I import a flat tab delimited file into a SQL 2005 Express table? The standard DTS and import features are not there :-(Thanks,Casey
I am just starting to learn SQL 2005 Express. After opening the Management Studio Express, I right Click on the Databases node and create new database. then create a name etc. The problem is that when I click ok to create the new database, I get a warning saying that Input a filename. However when I click on filename (after filepath) it is greyed out and I cant add a filename.
I have database written in SQL SERVER 2005 since last two year .Now the Database size become 33MB, and the log file become 450 MB . The log file is too large for me . Do you any know how clear the log file in SQL SERVER 2005 EXPRESS SP2 ?.Thanks
This might be obvious - but if so I've missed it so far.
Is it possible to connect remotely to an Express database used in a website which is created in the App_Data folder by VWDEE 2005 and attached by filename?
As far as I can tell these databases don't have a name and aren't mounted until an attempt is made to access them. I certainly can't see any sign of it in SQL Management Studio.