sql-server-2008r2-express

Execute sql script on SQL server using C#

你。 提交于 2019-11-29 18:06:20
SQL Server 2008 R2 Express, .Net Framework 4.0, Visual Studio 2010 I'm trying to execute a SQL script from a command prompt application. I found a sample code and trying to implement the same. But the following using statements are not recognized. using Microsoft.SqlServer.Management.Common; using Microsoft.SqlServer.Management.Smo; Am I missing any assembly reference ? You likely are, you need the assemblies that are included with the SDK that comes with SQL server. Be sure you installed the SDK when you installed SQL server. (screenshot taken from a random google image search, the

Entity Framework cached query plan performance degrades with different parameters

跟風遠走 提交于 2019-11-29 04:47:24
I have the following problem. Background I'm trying to implement an autocomplete selector with MVC3, EF4 and jquery over a table wit 4.5 million records. This is the table: CREATE TABLE [dbo].[CONSTA] ( [afpCUIT] nvarchar(11) COLLATE Modern_Spanish_CI_AS NOT NULL, [afpNombre] nvarchar(30) COLLATE Modern_Spanish_CI_AS NULL, [afpGanancias] varchar(2) COLLATE Modern_Spanish_CI_AS NULL, [afpIVA] varchar(2) COLLATE Modern_Spanish_CI_AS NULL, [afpMonot] varchar(2) COLLATE Modern_Spanish_CI_AS NULL, [afpIntSoc] varchar(1) COLLATE Modern_Spanish_CI_AS NULL, [afpEmpl] varchar(1) COLLATE Modern_Spanish

Execute sql script on SQL server using C#

匆匆过客 提交于 2019-11-28 12:59:43
问题 SQL Server 2008 R2 Express, .Net Framework 4.0, Visual Studio 2010 I'm trying to execute a SQL script from a command prompt application. I found a sample code and trying to implement the same. But the following using statements are not recognized. using Microsoft.SqlServer.Management.Common; using Microsoft.SqlServer.Management.Smo; Am I missing any assembly reference ? 回答1: You likely are, you need the assemblies that are included with the SDK that comes with SQL server. Be sure you

SQL Server 2008 R2 Express permissions — cannot create database or modify users

回眸只為那壹抹淺笑 提交于 2019-11-28 05:59:06
Recently just upgraded to SQL Server 2008 R2 Express. When I attempt to create a database after logging in using Windows Authentication with my id myuser I receive this error: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) CREATE DATABASE permission denied in database 'master'. RESTORE HEADERONLY is terminating abnormally Error 262 If I try to add the sysadmin role to myuser, this is the error I receive: Add member failed for ServerRole 'sysadmin'. (Microsoft.SqlServer.Smo) An exception occurred while executing a Transact-SQL

Unable to connect to SQL Express \"Error: 26-Error Locating Server/Instance Specified)

泄露秘密 提交于 2019-11-27 19:23:49
I am at an loose end with one particular box that is running SQL Server 2008 R2 Express. Windows Firewall is configured to allow inbound TCP & UDP 1433, 1434. Windows Firewall is configured to allow outbound TCP & UDP on any port. No other software AV/FW is currently running. When I try to connect to xxx.xxx.xxx.xxx\sqlexpress , it times out with the following error: TITLE: Connect to Server Cannot connect to xxx.xxx.xxx.xxx\SQLEXPRESS. ADDITIONAL INFORMATION: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was

SQL Server 2008 R2 Express permissions — cannot create database or modify users

烂漫一生 提交于 2019-11-27 01:08:31
问题 Recently just upgraded to SQL Server 2008 R2 Express. When I attempt to create a database after logging in using Windows Authentication with my id myuser I receive this error: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) CREATE DATABASE permission denied in database 'master'. RESTORE HEADERONLY is terminating abnormally Error 262 If I try to add the sysadmin role to myuser, this is the error I receive: Add member failed for