sql-server-express

Connecting to SQL Server Express - What is my server name?

岁酱吖の 提交于 2019-12-03 04:34:30
I was just given a laptop to perform some development from a client and I am currently in the process of setting it up. Visual Studio 2010 is installed as well as SQL Server Management Studio 2008 R2. I'm trying to open SQL Server Management Studio to connect to the database but so far am not having much luck. I'm used typing in for a server name something like... localhost (local) SQLEXPRESS None of these are working. So my question is: How can I tell what type of SQL Server installation and configuration I have on this machine, and how can I discover what server name I need to use in order

ASP.NET Web Api: Project requires SQL Server Express

房东的猫 提交于 2019-12-03 04:13:47
I created a Web API project under VS 2010. After I switched to VS 2012, I always get a warning: The Web project 'xxx' requires SQL Server Express, whcih is not installed on this computer. [...] I do not want to install this SQL Server Express. I use IIS for debugging. How can I disable this dependency? I noticed also this in my web.config: <connectionStrings> <add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|[...].mdf;Initial Catalog=[...];Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> <

How do I fix a “Performance counter registry hive consistency” when installing SQL Server R2 Express?

青春壹個敷衍的年華 提交于 2019-12-03 02:14:49
问题 I'm trying to install SQL Server 2008 R2 Express from this site: http://www.microsoft.com/express/database/ I have a 64-bit, Windows 7 machine. I have tried both the 32-bit and 64-bit versions but each fail on "Performance counter registry hive consistency". How can I fix this so that I can install SQL Server 2008 R2 Express? 回答1: You can skip the Performance counter check in the setup altogether: setup.exe /ACTION=install /SKIPRULES=PerfMonCounterNotCorruptedCheck 回答2: Use Rafael's solution:

SQL Server Express CREATE DATABASE permission denied in database 'master'

两盒软妹~` 提交于 2019-12-02 18:04:56
After I change the option as UserInstance="False", then the error starts to happen. Because I want to use full-text search, the option change is required. BUT, it stopped to work. Is there any way to make it work again? I'm running Application Pool as Network Service with full control. A solution is presented here not exactly for your problem but exactly for the given error. Start --> All Programs --> Microsoft SQL Server 2005 --> Configuration Tools --> SQL Server Surface Area Configuration Add New Administrator Select ' Member of SQL Server SysAdmin role on SQLEXPRESS ' and add it to right

Cannot connect to local SQL Server Express 2008 R2

倾然丶 夕夏残阳落幕 提交于 2019-12-02 17:55:56
I just installed SQL Server Express 2008 R2 and I have a problem connecting to it using the SQL Server Management Studio (locally). All SQL Server services are started (SQL Server (SQLEXPRESS), SQL Server browser, also the DTC service) When I try to connect I get the following message: TITLE: Connect to Server Cannot connect to (local). ADDITIONAL INFORMATION: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow

How do I fix a “Performance counter registry hive consistency” when installing SQL Server R2 Express?

喜夏-厌秋 提交于 2019-12-02 17:16:19
I'm trying to install SQL Server 2008 R2 Express from this site: http://www.microsoft.com/express/database/ I have a 64-bit, Windows 7 machine. I have tried both the 32-bit and 64-bit versions but each fail on "Performance counter registry hive consistency". How can I fix this so that I can install SQL Server 2008 R2 Express? You can skip the Performance counter check in the setup altogether: setup.exe /ACTION=install /SKIPRULES=PerfMonCounterNotCorruptedCheck André Ferreira Use Rafael's solution: http://social.msdn.microsoft.com/Forums/en/sqlsetupandupgrade/thread/dddf0349-557b-48c7-bf82

save data to DB

怎甘沉沦 提交于 2019-12-02 08:08:41
问题 I am using Visual Studio 2010 with SQL Server Express and LINQ to SQL The application runs correctly when inserting data into the database during application execution. The data is inserted to the database. But, when I stop the application and click show table data in server explorer I do not see any data. Why is this so? Here the values for the copy output direction properties for my database solution items: database1.mdf: copy always database1Dataset.xsd: do not copy dataclasses1.dbml: do

how to pass column name with parameter in insert sql statment

℡╲_俬逩灬. 提交于 2019-12-02 06:58:12
问题 how to pass column name with parameter in insert sql statment e.g. @name='name' insert into employees (id,@name) values(1,'a') is this possible? 回答1: No it isn't possible you would need to build the SQL Statement including the column either in your application or by using dynamic SQL in SQL Server itself. Edit: RE: "what's dynamic sql". The approach is as follows. DECLARE @Value nvarchar(100) DECLARE @InsertString nvarchar(1000) DECLARE @name sysname SET @name ='name' SET @Value = 'a' SET

Restored database missing views, stored procs and foreign keys

房东的猫 提交于 2019-12-02 05:24:55
问题 I'm trying to create a copy of a database in SQL Management Studio (SQL Server Express) using Backup-Restore. Local to local. When I do it it copies tables and data, but ignores views, stored procedures and foreign keys. Object Explorer -> write-click "Databases" -> "Restore Database..." -> put in a name -> select a "from" database -> go This is the script that gets generated: RESTORE DATABASE [DbName_raw] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup

how to pass column name with parameter in insert sql statment

房东的猫 提交于 2019-12-02 05:15:47
how to pass column name with parameter in insert sql statment e.g. @name='name' insert into employees (id,@name) values(1,'a') is this possible? No it isn't possible you would need to build the SQL Statement including the column either in your application or by using dynamic SQL in SQL Server itself. Edit: RE: "what's dynamic sql". The approach is as follows. DECLARE @Value nvarchar(100) DECLARE @InsertString nvarchar(1000) DECLARE @name sysname SET @name ='name' SET @Value = 'a' SET @InsertString= 'INSERT INTO EMPLOYEES (id,' + @name + ') values(1, @Value)' EXEC sp_executesql @InsertString, N