sql-server-2008r2-express

how to import an excel file into sqlserver 2008

泪湿孤枕 提交于 2019-12-05 12:51:56
How can i import an excel file into a new table in sqlserver2008 express edition using an sql query without using the import wizard Thanks Prady There is a microsoft knowledge base article that lays out all the ways this is possible. http://support.microsoft.com/kb/321686 I think using OPENROWSET or OPENDATASOURCE will be the easiest way, without the wizard. (see Distributed Queries) SELECT * INTO XLImport4 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\test\xltest.xls', [Customers$]) See OPENROWSET documentation, with examples lower down the page. http://msdn.microsoft.com

Reporting Services availability SQL Server Express 2008 R2

你离开我真会死。 提交于 2019-12-04 18:44:51
问题 I am trying to add Reporting Services to my already installed version of SQL Server Express 2008 R2. I am installing it on a Windows Server 2008 R2 Standard edition box. When ever I run the install program to add extra features Reporting services is not listed. I have installed (I think) all the prerequisites needed IIS, ASP etc but to no avail. Reporting services are just not visible in my features list. Any ideas? 回答1: SSRS is only available in the SQL Server 2008 Express with Advanced

Error connecting to SQL Server 2008 R2 Express

早过忘川 提交于 2019-12-04 05:15:55
问题 I have installed SQL Server 2008 R2 Express on Windows 7. When I run a web project in VS2010 I receive the following error: 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 remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Strange, I am working on the

login failed for user sa at SQL Server 2008 R2

和自甴很熟 提交于 2019-12-04 02:57:44
问题 After upgrading to Service Pack 1, sometimes i got failed to login my server at this time, Server Configuration Manager is like below Do I need to change anything? thank you. -- Once I could login, Server Configuration Manager is like below During the failure time, I try to start "SQL Server (MSSQLSERVER)" but got fail to start. What is wrong in my R2 express? Please share me your idea. After running "SQL Server (MSSQLSERVER)", I could login in to my server as 'sa'. 回答1: Although my below

How to get current instance name from T-SQL

半腔热情 提交于 2019-12-02 14:35:10
How can I get the SQL Server server and instance name of the current connection, using a T-SQL script? Guillermo Gutiérrez Just found the answer, in this SO question (literally, inside the question, not any answer): SELECT @@servername returns servername\instance as far as this is not the default instance SELECT @@servicename returns instance name, even if this is the default (MSSQLSERVER) How about this: EXECUTE xp_regread @rootkey='HKEY_LOCAL_MACHINE', @key='SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQl', @value_name='MSSQLSERVER' This will get the instance name as well. null

What is Best Approach for Opening/Closing SqlConnection in C#

こ雲淡風輕ζ 提交于 2019-12-02 07:04:45
I would like to know what could be best approach to open a SqlConnection with Sql Server 2008R2 Express Edition Database. This Version of Sql has Limitations of RAM Usage and CPU Usage so we must adopt something best to open a SqlConnection . Right Now i am Checking Connection on Start and End of each and every Method. Here is an example of that. private void CheckValidId(string Id) { CheckConnectionStatus(); try { sqlConnection.Open(); sqlCommand = new SqlCommand("select * from ValidId where id=@id", sqlConnection); sqlCommand.Parameters.AddWithValue("@id", Id); sqlDataReader = sqlCommand

How to delete oldest week(period) in MS SQL database?

拟墨画扇 提交于 2019-12-01 22:49:58
MS SQL 2008R2 Express, I have database - one table with rows. And when db size became about 10gb I need to clean one oldest week in this table (I dont know the date). Could you help me with script? Thanks. UPD1. There is column DateAndTime, so i make query like this in VBA: strSQL = "SELECT DateAndTime ,TagName ,Val ,SetPoint ,Limit_H ,Limit_L ,Result FROM dbo.Statistic WHERE DateAndTime BETWEEN CAST('" & TimeBegin & "' AS datetime) AND CAST( '" & TimeEnd & " ' AS datetime) Order By DateAndTime desc , (CASE WHEN ISNUMERIC(TagName)=1 THEN CAST(CAST(TagName AS float) AS INT)END ) desc" What

login failed for user sa at SQL Server 2008 R2

柔情痞子 提交于 2019-12-01 15:27:58
After upgrading to Service Pack 1, sometimes i got failed to login my server at this time, Server Configuration Manager is like below Do I need to change anything? thank you. -- Once I could login, Server Configuration Manager is like below During the failure time, I try to start "SQL Server (MSSQLSERVER)" but got fail to start. What is wrong in my R2 express? Please share me your idea. After running "SQL Server (MSSQLSERVER)", I could login in to my server as 'sa'. Although my below snaps mention SQL Server 2008/express I would suggest to check for the below points. Check whether you need to

Entity Framework cached query plan performance degrades with different parameters

倾然丶 夕夏残阳落幕 提交于 2019-11-30 07:34:45
问题 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,

Unable to connect to SQL Server instance remotely

谁说我不能喝 提交于 2019-11-30 06:12:08
I’m trying to access the SQL Server instance on my VPS from SQL Server Management Studio on my local machine. It’s not working (the error I’m getting is: 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 remote connections. I think this is because I need to configure the database engine to allow remote connections (correct me if I’m wrong!). So I’ve found this step-by-step guide to help me do that: http://www