sql-server

Unable to login to SQL Server + SQL Server Authentication + Error: 18456

Hello I have created login account on my localhost\sql2008 Server (Eg. User123) Mapped to Database (default) Authentication Mode on SQL Server is set to both (Windows and SQL) But login to SQL Server fails with following message (for User123) Note: Have checked multiple time that UserName / Password are typed in correctly Error De...

How to manage data access / preloading efficiently using web services in C# ?

Hello all, Ok, this is very "generic" question. We currently have a SQL Server database for which we need to develop an application in ASP.NET with will contain all the business logic in C# Web Services. The thing is that, architecturally speaking, I'm not sure how to design the web service and the data management. There are many th...

Rows in their own columns depending on their date and symbolized by 'x' [closed]

Dear All, please help me since I'm newbie in SQL Server. I have a select query that currently produces the following results: DoctorName Team Visit date dr. As A 5 dr. Sc A 4 dr. Gh B 6 dr. Nd C 31 dr As A 7 Using the fo...

The underlying provider failed on Open

I was using .mdf for connect to DB and entityClient. Now i want to change connection string that trehe will be no .mdf Is this conectionstring correct <connectionStrings> <!--<add name="conString" connectionString="metadata=res://*/conString.csdl|res://*/conString.ssdl|res://*/conString.msl;provider=System.Data.SqlClient;provider conne...

How to write to a text file in pipe delimited format from SQL Server / ASP.Net?

I have a text file which needs to be constantly updated (regular intervals). All I want is the syntax and possibly some code that outputs data from a SQL Server database using ASP.Net. The code I have so far is : <%@ Import Namespace="System.IO" %> <script language="vb" runat="server"> sub Page_Load(sender as Object, e as EventArgs...

Migrate Data and Schema from MySQL to SQL Server

Are there any free solutions for automatically migrating a database from MySQL to SQL Server Server that "just works"? I've been attempting this simple (at least I thought so) task all day now. I've tried: SQL Server Management Studio's Import Data feature Create an empty database Tasks -> Import Data... .NET Framework Data Provider ...

php fail to open a sqlserver 2000 database

I can use the sql server management studio to open a sqlserver 2000 database, but I can not open the same database in a php page using the same user and password. what is the problem? if(!$dbSource->open("192.168.4.241:1433","sa","sa","NorthWind")) { echo "Fail to open the sql server 2000 database"; } ----------------------- ...

finding numbers of days between two date to make a dynamic columns [closed]

Dear all, I have a select query that currently produces the following results: DoctorName Team 1 2 3 4 5 6 7 ... 31 Visited dr. As   A                             x    x ...      2 times dr. Sc   A                          x          ...      1 times dr. Gh...

Which jar to use for connecting to MS SQL server

Hi, Can some one please guide me to understand which jar file i need to include in my application to be able to set up a jdbc connection with ms sql server. thanks in advance. ...

SQL Server Export Data failing

I am trying to export a table from SQL Server 2005 using the Import/Export Wizard. I've had no problems exporting data and have successfully exported from 5 tables before, but I am now getting this error: Error 0xc0209029: Data Flow Task: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Destination Input" (114)" faile...

Why isn't INT more efficient than UNIQUEIDENTIFIER (according to the execution plan)?

I have a parent table and child table where the columns that join them together are the UNIQUEIDENTIFIER type. The child table has a clustered index on the column that joins it to the parent table (its PK, which is also clustered). I have created a copy of both of these tables but changed the relationship columns to be INTs instead, ha...

Which user account is running SQLCMD in T-SQL Script without -U and -P option?

I am using sqlcmd in a T-SQl script to write a text file to a network location. However SQLCMD is failing to write to that location due to access permission to the network folder. SP is being run under my user account which has access to the network folder. Could you please help me under which account sqlcmd will run if I do not specify...

Updating SQL Server database with SQL scripts

I have a number of manually written scripts (.sql) for tables, views and stored procedures that are used from an ASP.NET application. These scripts drop the object and recreates them. I need a way to update the database when the scripts change without deleting the object. For example, when a column is added to an existing table that has ...

If a table has two xml columns, will inserting records be a lot slower?

Is it a bad thing to have two xml columns in one table? + How much slower are these xml columns in terms of updating/inserting/reading data? In profiler this kind of insert normally takes 0 ms, but sometimes it goes up to 160ms: declare @p8 xml set @p8=convert(xml,N'<interactions><interaction correct="false" score="0" id="0" gapid=...

Calling a MS SQL Server scalar UDF from vba

I am programming an Access 2007 (accdb, not adp) frontend at connect to a SQL Server 2005 backend. How can I call a scalar user defined function from my vba code? ...

Sql Server 2000 Stored Procedure Prevent Parallelism or something?

I have a huge disgusting stored procedure that wasn't slow a couple months ago, but now is. I barely know what this thing does and I am in no way interested in rewriting it. I do know that if I take the body of the stored procedure and then declare/set the values of the parameters and run it in query analyzer that it runs more than 20x...

SQL Server Table definition from stored procedure result set

Hi, Is anyone aware of a way to create a table definition from a stored procedure result set? I have a stored procedure which produces a result set with 30+ columns, I'd like to get this into a table without having to manually create all the table columns. Is there a built in procedure that will dump out the column names and types..? ...

SQL count distinct subnets in an IP column

I need to get a get a count of all the distinct subnets in an IP column and group by the subnet on MS SQL. ie.. count all ips that have a subnet of 192.168.0,192.168.1,10.10.10 and so on. Any help is appreciated. Thanks ...

Tell me a situation in which SQL Server indexing is not required

Could you please tell me cases where indexing on an SQL Server table is not required? ...

Which method is best method for speed? in SQL Server, stored procedure

I have select, insert, update and delete query. If I have to write all queries in the same stored procedure that is good for performance or should I write all queries in separate stored procedures? ...