I am developing using visual web dev and sql server express. When this project goes live its going on another server running sql server(full version) this is my first asp.net app and my question is...
Do I just move the mdf file from the dev machine running sql server express to the new server running sql server full version to retain all the tables and data?
I know its been asked before but I want to be sure if this is the proper procedure.
Thanks in advance!
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. Exception Details: System.Data.SqlClient.SqlException: 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)Source Error: here is my web.config file:<?xml version="1.0"?><!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in WindowsMicrosoft.NetFrameworkv2.xConfig --><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings><add key="EmailFrom" value="webmaster@reaganpower.com"/> <add key="EmailSubject" value="File Ready for Download!"/><add key="SmtpServer" value=""/> <add key="MailUser" value=""/><add key="MailPassword" value=""/> <add key="MailPort" value="25"/><add key="EmailFormatSelected" value="Text"/> <add key="PageTitle" value="Send It Now!"/><add key="ShareLocalFolderPath" value="H:MIS DepartmentIntranetSendItNowFileStorage"/> <add key="httpDownloadPath" value="http://misfs/SendItNow/ContentFiles/"/> <!-- <add key="CurrentTheme" value="CleanBlue" />--> <add key="CurrentTheme" value="CleanOrange"/></appSettings> <connectionStrings> <add name="ConnectionString" connectionString="Data Source=(local)SqlExpress;AttachDbFilename=|DataDirectory|FileShareDB.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient"/> </connectionStrings><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.--> <identity impersonate="false"/> <roleManager enabled="true"/><compilation debug="true" strict="false" explicit="true"> <assemblies><add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation> <pages><namespaces> <clear/><add namespace="System"/> <add namespace="System.Collections"/><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>
Really confused ... I created 2 tables in a VB Express program (which went well). Problem is that I can't see/find those tables with MSME. I don't really understand how to connect the MSME to where the tables are. I created the tables under My DocumentsData and they are DBapp.mdf + DBapp_log.LDF and the tables are Items and Preferences. The VB application can "see" the tables OK.
Do I need to move the tables to C:Program FilesMicrosoft SQL ServerMSQL.1MSQLDATA (like the Adventureworks installation which I haven't done) or what?
I am to take a web app tomorrow to work to install it on a a web server. I just wanted to be sure which files in the web app Sql Server Express needs to operate. Is it the *.mdf file only or also the *_log.ldf and the aspnetdb.mdf files also.Thanks.
I receive 4 .csv file downloads periodically (3 times per day) via email from our corporate database. I open each file in Excel, save as excel files, import to Access, replace the previous tables...run action queries, generate reports combined with production data from CSRs and supervisors. ALL DONE MANUALLY!!!
Here's where I am now: -I've recently switched over to SQL Server Express. -Used SSMA to bring tables over from previous Access database. -Exercised the option to LINK these tables to the original Access database.(I'll explain why in a moment) -Created ADPs for front end data entry use. -Imported old Access database forms into the new ADPs previously used in Access. -Connected to the new Server Express. -I've eliminated my concurrent user problems by doing this. HOWEVER, I am still bound to using old Access/Jet database to generate reports based on periodic downloads from corporate .csv files.
Here's the question: What is the best way to import the csv files being sent to me via email into SQL Server Express? I've tried DTS. Seems to me you can't save AND actually use the packages later since it's the Express edition..... Importing manually 4 files, 3 times per day is a very tedious option I'd like to avoid. Any ideas? Oh, by the way. Corporate has told me they would be willing to post the files to an FTP site instead of emailing the files. That's about as much help as I'm going to get from them. Can SQL Server Express be set up to run stored procedures (triggers) on a hot folder? Thanks for your help.
I dont have the SQL EXPRESS installed instead I have SQL Standard Edition. I have two SQL Server instances installed. 1- UserLT (this is sql 2000)2- UserLTSQL2005 (this is SQL 2005 named instance) But when i try to add a database to my VS website project I get the following error: Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925 I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default) and changed the "SQLEXPRESS" to "USERLTSQL2005". But I still get the same error message. Any ideas how i can resolve this issue?
i've installed SQL server 2005 express and Visual web developper 2005 express.
when i whant to create a database in VWD the following error occures:
connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=49251
i searched the internet but can't find the solution, i already reinstalled my complete workstation but the problem stays.
I created a mdf file but couldnt for the life of me install it into SQL Sever Express [and when I say install i mean attach]. When I used SQL Server Ent, I had no issues. The only warning I got was that my mdf file was used by another process when I tried to attach with VS 2005 [ which is correct because ent had it]. I think mdf files are pretty touchy. Does anyone have any good articles on best practices? It seems you cant have a db with the same name as your attachment [ which would make sense] or have mdf files in the Data directory of your SQL Server instance you are trying to attach to. You will get the unc share error if you do. I think I need to start using user Instances but I could be wrong. You cant use them in ent but maybe i will solve my issue with attaching db files to express. I noticed that by default express doesnt install in mix auth mode and there might be some issues with access. How does everyone else normally install their mdf files for quick deployment [ say you want to deploy your db with your app so that users can quickly get started] ?
Hello, I am using the full version of sql server 2005 management studio to attempt to attach sql express mdf files to sql server 2005.
I was using the databases from an ASP.NET commerce starter kit in sql express. I want to update to sql server 2005, so i detached the dbs. i deleted the sql express management studio ctp and installed sql server 2005 from the free 6 month trial available online.
I then attempted to attach the sql express files to sql server 2005 and get the following error:
TITLE: Microsoft SQL Server Management Studio ------------------------------
Attach database failed for Server '<servername>'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------
Could not find row in sysindexes for database ID 9, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes. Could not open new database 'C:INETPUBWWWROOT<location>ASPNET.MDF'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 602)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=602&LinkId=20476
I also tried with the original mdf files i had downloaded without making any changes.
Panos writes "I am working with SQL Server 2005 Express Edition. How can I protect mdf files from being transfered (attached) and be used to another SQL server in another machine? Thanks Panos"
I've serached this forum and Google'd for a resolution to this issue, to no avail. Here's the scenario: I'm running VS 2005 on Windows Media Center laptop and need to create ASP.net membership for my web application built using VB. I have SQL Server Developer installed with instance name MSSQLSERVER. Previously, I uninstalled SQL Express and installed Developer edition and can now open and utilize Management Studio.
Now, when I try to create a new SQL Server database in my solution's App_Data directory, I receive the above error. I already changed instance name in VS2005 per Tools-Options-Database Tools-Data Connections to MSSQLSERVER.
Could someone provide me with a list of procedures to ensure proper setup of VS2005 with SQL Server Developer Edition?
Alright I'm using Visual Studio 2005 with SP1 and SQL Server Express 2005. I've downloaded all the updates on Windows Update. I'm joining a project late and trying to get the C#/SQL web-app up and running. My project manager has it built with Visual Studio 2005 pro and a full blown corporate license for the SQL server, but I don't have access to the SQL server quite yet.
When I try to open the "LLRCWEB.sln" file I receive the following error:
"The application for project 'C:Documents and Settings......LLRCSQL.dbp' is not installed. Make sure the application for the project type (.dbp) is installed."
Has anyone encountered this problem before? Are there any plug-ins or particular application versions you know are required to handle '.dbp' files, or will I have to Install Visual Studio 2005 Pro and get access to the SQL server?
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.
Anyone know of a good "free" way to back up web files and SQL Server 2005 Express Database? I was able to use Windows Server 2003 Backup utility to back up the folder where the Databases were stored, as well as the web files, with no errors. But I have heard a lot of discussion that you can't just simply backup SQL Server data files? I'm wondering how sound the backup I've created is... Any suggestions?
i wanted to test routines using my local sql server engine and thought I could backup the mdf ldf file on the true network sql server in which I am listed as a dbowner with full permissions. In fact i can add users for the at db etc.The backup allows me to browse to a local folder
with the following being the default C:Program FilesMicrosoft SQL ServerMSSQL10_50.CMS_PROJECTMSSQLBackup
i name the file and it executes properly but when i try to restore that file to my local db that path is not even visible to me.In fact when i use exploreer I cannot even find the folders after Microsoft SQL Server!I search for .bak but nothing.How can I see that folder construction in the sql browser but never in explorer -
Connection to SQL server files (*.mdf) require SQL express 2005 to function properly. please verify the installation of the component or download from http://go.microsoft.com/fwlink/?linkid=49251
I AM GOING TO RIP MY HAIR OUT WITH THIS PROBLEM. I have reinstalled both sql server express 2005 and VWD about 5 times with the same problem. please, please, please someone throw me a bone here and help me resolve this problem. When I create a new EMPTY website and I rightclick on my website in the solution explorer and choose add item, I chooe SQL Database, I give it a name 'database.mdf' and click add. I get the following message: you are attempting to add a database to an asp.net application. for a database to be gfenerally consumable in your site, it should be placed inside the 'app_data' folder. would you like to place the database inside the 'app_data' folder? I click YES (I know this message is normal) then I get the following message: Connection to SQL server files (*.mdf) require SQL express 2005 to function properly. please verify the installation of the component or download from http://go.microsoft.com/fwlink/?linkid=49251 I can add anything else but this damn mdf file. thanks for all your help in advance.
Can multiple instances of SQL 2005 Express attach to the same database files on a network share? I have seen this done before with MSDE where the database files are stored on the server, but instead of having a SQL server running on the network and then connecting to it, only the database files exist on the network share and the users connect through MSDE running on the local machine. Is this possible with SQL2005Express? I do not have the ability to share an SQL instance from one workstation to another nor do I have the ability to install an instance on the corporate server. Is it as simple as creating the database and storing the files on the share then attaching the database to the SQL Instance on each workstation?
I've created a linked server (and set up the corresponding schema.ini file) in order to perform bulk-inserts from some CSV text files into SQL tables (from my standpoint the text files are just for reading purposes). The linked server works fine (I can select the data in the files without a problem).
Now the question: is possible to automatically detect when one or more of those files change in order to start the import process automatically? Something like having a trigger created on the CSV files Or there's no easy way to do that so I have, to say something, to create a Job that periodically checks if the files have changed programatically (say, recording each file's timestamp everytime is imported and comparing the recorded value with the current one, or whatever)?
Hi all, I am using the sqlExpress database, and now I am looking for a hosting plan. Problem is that most of the .NET average hosting plans are expensive and gives limited space of database. I have 2 questions: 1. Is there any way to reduce size of data base? 2. why there is 2 files for database? 1 is .MDF extension and the other is .LDF. LDF is a lof file? if yes, how acn I remove it from the project. Thanks.
I proposed on a new server that we separate Data Files, Log Files, tempDB, Backups, etc. onto separate LUNS on a SAN with High Speed Solid State Drives.I was told that with the new technology with solid state SAN's that it would decrease performance and that it did not work the same way as it did when you had RAID 5's etc.I thought that if things were cared out correctly by a SAN Administrator they would know how to configure for optimal performance.
It works remotely if I run it via command prompt. But when I add this to a TSQL job on my remote SQL instance, it runs without deleting anything. What I'm missing?
Are there any specific Help files to download for SQL Server Management Studio Express. I thought I saw a link the other day, but I am not sure anymore... Or is it part of the Book online for SQL Server Management Express? I can't find reference to Studio in there...
I just downloaded SQL 2005 and SQL Express. I'm not seeing SQL Express in my Program files yet when I open SQL server configuration manager it AND SQL Server 2005 Services it says it's running. SQL Server Browser is NOT.
I have installation program which can Install MSDE 2000 base on the user input.
If user does not want to install it, I ill install SQL-DMO redistributable files, so during installation User can pick server location where database will be installed.
Now I want to upgrade to SQL 2005 Express and I want to perform the same steps. Where I can find SQL-DMO redistribution files for SQL 2005 Express ?
I am new to VC# and SQL Express. I am currently trying to find a way to store user selected files into SQL Express. I am using a column with the varbinary(MAX) data type. My current thought is to give the user a open file dialog box, and let them select the file they want to upload. On closing this dialog box, I convert the file selected into a file stream and insert into SQL Express.
Is this method a good one? If anyone else can give me pointers or hints to better methods, please do!
Hello,I'm looking for a tutorial or some sample code to save a file in sql server with c#. So far I have not been able to find a anything I could use as most tutorials are in VB. I'm using the varbinary max type to store the file. The part I need help with is selecting the file and converting it using the Stream object, not the SQL insert statements. Thanks,Arnold
When I develop I sometimes forget and try to open the database file with the MS SQL Express Manager even though the web application I am devloping is still using it ... error lock occurrs and thats fine .... but what is the best way to unlock the files again? .... often I find myself having to restart the workstation because of this and thats sounds a bit like overdoing it .... there should be an easier way to unlock locked db files ...without having to restart the workstations.... is there ?
I've written a ClickOnce app that deploys a Sql Server Express data file (.mdf) and log file (.ldf) along with the other application files. SQL Express SP2 is a prerequisite for this app. After the applicaiton installs and starts up it copies these files to a specific folder and attaches them by calling the AttachDatabase() method of a Microsoft.SqlServer.Management.Smo.Server object.
This method works fine using Windows XP, however when I run it on Windows Vista I get the following exception:
Microsoft.SqlServer.Management.Smo.FailedOperationException: Attach database failed for Server 'localhostSQLEXPRESS'. ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Unable to open the physical file "C:WashMasterDatabasewasshmaster.mdf". Operating system error 5: "5(Access is denied.)".
This exception occurs when I try to programmatically attach the database.
I've searched through the MSDN forums for a solution and I've only found two suggestions:
1.) Create all database connections using a User Instance. 2.) Create the database (using SQL) in the target folder, rather than copying it over from the deployment folder.
I don't like the idea of using User Instances because my entire data access layer is currently written using Ole and I would rather not rewrite it if I don't have to. I cannot find any way to use User Instances with Ole.
I also don't like the idea of creating the database using SQL because it is fairly large.
Here are my questions:
1.) Can User Instances be used with Ole?
2.) Can I somehow programmatically set the permissions of the copied data and log files so that SQL Express can access them without error?
3.) Is there a better method for doing what I'm trying to do or am I destined to have to either rewrite in data access layer so I can use User Instances or create my large database rather than copy it to the target directory?