C# is a general-purpose, managed, garbage-collected, object-oriented programming language created by Microsoft.

learn more… | top users | synonyms

15
votes
3answers
374 views

How can I guarantee that inserts to SQL Server 2008 R2 are cached in RAM first?

Imagine a stream of data that is "bursty", i.e. it could have 10,000 events arrive very quickly, followed by nothing for a minute. Your expert advice: How can I write the C# insert code for SQL ...
14
votes
2answers
550 views

Setting up a central CLR stored procedure / function respository library for internal stored procs in other databases to use?

I would like to use code that I developed in C# CLR to be used in all of the databases on the system so that I don't have to set each to trustworthy and turn CLR on and keep a bunch of the same code ...
7
votes
2answers
1k views

how will nvarchar(max) store data in database will it be fast if some data is less then 4000 characters?

I have to develop a CMS which will support two Language English, Arabic. This CMS will be a sort of Article Publishing site. While designing & analysis i found that some articles are more than ...
7
votes
4answers
8k views

Converting RTF in a text column to plain text in bulk

I have a legacy system with about 10 million rows in a table. In that table there is a column of type text, most of them are standard text but about 500 thousand rows have RTF markup in them. I need ...
6
votes
3answers
4k views

3rd party dll in SQL Server CLR

I need to use a third party DLL in a trigger c# code in SQL Server CLR But when I try to add reference it just shows some DLLs from SQL Server. How can I add my third party dll to SQL Server?
5
votes
1answer
724 views

Deadlocks in SQL Server

We're currently encountering a problem with out ASP.NET Application that results in deadlocks on the SQL Server database. A bit of background information I can provide is that we rely heavy on AJAX ...
5
votes
1answer
366 views

Design for file based with many events

I'm not a database guy but I need to design a database to store events for our application. Our client app connects to remote hardware and syncs count data. The count data are csv files split into ...
4
votes
3answers
11k views

Login to SQL Server using Windows Authentication

I have an (.Net Console App) EXE which connects to various SQL databases using SQL server Authentication with appropriate credentials. Now there is change required in the EXE to use windows ...
4
votes
2answers
138 views

why SELECT is still using CPU & DiskIO?

I have a large database, about 30GB. In order to delete some data from a table (most data is in this table, simply because the # of rows), I have to do delete in batch. However, if I delete in too ...
4
votes
2answers
3k views

What server property makes TransactionScope escalating to MSDTC?

In our application we're using TransactionScope's. We're aiming to not use the MSDTC service because it's a lot slower than lightweight transactions. using (var transactionScope = new ...
4
votes
1answer
4k views

sql server , set N prefix as unicode for all queries by default

Is there any option in ms sql server which use N prefix for my database. There are many query in my application which non of them use N prefix for nvarchar fields , and now I have to set N for all of ...
3
votes
2answers
1k views

Trace unclosed connections

I get timeout errors every couple of days or so between IIS7 and an SQL 2008 Server. The error message I get is: System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to ...
3
votes
2answers
2k views

How to import a varbinary(max) column with bulk import?

I have a varbinary(max) column that I need to bulk import. The data I'm putting into this column is a byte[] in C#. How do I format the data in the comma-delimited file used for bulk import? In ...
3
votes
1answer
671 views

“Thread was being aborted” error when inserting 25k rows

I need to store about 25k rows worth of data into a single table about once a week. To achieve this, I'm creating an object (created from parsing XML), and sending the data within that object to a ...
3
votes
1answer
189 views

“A severe error occurred” - Login Failed (but only occasionally)

I'm using a C# application to execute a query against SQL Server. Here's the relavent portion of an exception I'm encountering once every twenty-four hours or so: System.Data.SqlClient.SqlException ...
3
votes
1answer
536 views

LOAD DATA INFILE fatal error encountered

I use this query for loading sql data from my pc to localhost mysql database.(version 5.0.10 working witj XAMPP) The query is as below: cmd = new MySqlCommand("LOAD DATA LOCAL INFILE '" + filename + ...
3
votes
1answer
474 views

Why does DataContext.SubmitChanges() Exist?

I'm not sure if this goes here or on Stack Overflow, but I figure someone here might know it. Why did the developers of LINQ decide that not only do you need ctx.InsertOnSubmit(item); but you also ...
3
votes
1answer
920 views

Daily database maintenance using SQL Server 2008 and a stored procedure

I have created a database maintenance plan using wizard though that link for SQL Server 2005. I have created a Maintenance Plan for SQL Server 2008 and it works fine. Now I required to complete the ...
2
votes
2answers
2k views

Looking for example design of using an SQL database as a queue for throttling web service requests of multiple users

I'm designing a system for multiple users to queue their requests to a web service which takes requests such as creating new entries, changing entries, requesting data. Many of the web service calls ...
2
votes
2answers
652 views

Restoring database always throwing exception

I am trying to restore some database backup file into the same database. The .bak file is creating problem always. When I select the .bak file from a network drive like "\\TestPC\ShareFolder\test.bak" ...
2
votes
3answers
2k views

Trying to connect to PostgreSQL with Entity Framework via Npgsql and C#

So, I'm new to databases and only have done a little with PostgreSQL before. I have C# (visual studio 2012) and have downloaded the Entity framework (6). I have also downloaded the latest Npgsql data ...
2
votes
1answer
296 views

Can geography datatype Lat/Long properties be returned using a view in SQL Server 2008?

Hopefully the question is fairly self-explanatory. I've been ferreting through the, what appears to be quite minimal/poor microsoft documentation regarding both views and geography datatypes in the ...
2
votes
1answer
128 views

InnoDB inserts 100 times slower than SQL Server inserts

I have a simple table with two columns: id (autonumber) and name (char(255). When I use C# to insert 100 records in a loop it takes about 30 milliseconds per insert. This is way too slow. So I ...
2
votes
1answer
91 views

MongoDB ReplicaSet reconfig when primary and majority don't exist

http://docs.mongodb.org/manual/tutorial/reconfigure-replica-set-with-unavailable-members/ Is there anyway to reconfigure a replica set in the event the primary as well as a majority of the servers ...
2
votes
1answer
527 views

How would you implement conversation groups/ locking for multiple users of a Service Broker Queue?

How do you implement conversation groups for multiple users using their own instance of the user applications but sending related messages to the service broker queue? Any good example of this kind ...
2
votes
1answer
85 views

What is happening with locks in my database?

I'm having some problems on my database. At any given time, I'm trying to execute an update with five records on my table, but this table is locked and I get a time out executing the query. I ...
2
votes
1answer
271 views

Best Practices for Creating and Deleting Records in MYSQL

I'm fairly new to working with databases, but I've currently have a webCrawler that I've written in C# using MYSQL database. The crawler is frequently writing and deleting records from the database ...
2
votes
0answers
154 views

Sleeping connections

I have a dedicated MySQL server(8GB) with following configuration. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql lower_case_table_names = 1 ...
2
votes
0answers
231 views

Strugling with updating a cassandra row in FluentCassandra

I have this problem with using Fluent Cassandra in a test application. All I want to do is set the IsOnline field to true inside the SignIn method, but I keep getting the exception supercolumn ...
2
votes
0answers
281 views

going from heirarchical XML to heirarchical SQL tables then SQL to c# objects to go to user view, how should I store the data in the databases?

Hi I'm getting my data from a web service using their getData call and it comes in as fairly chunky heirarchical XML, first everything all at once, like <allData> <product1> ...
1
vote
2answers
491 views

Designing a database tables for the following scenario

I just got following entities Employee, Client and Company. Where Employee and Client have one to many relationship with Company ie A single employee may be mapped to attend to many companies and ...
1
vote
3answers
502 views

What's the solution for corrupted MDF files?

We are working on an MDF file that has been corrupted, because a virus deleted 2 MB from the header of the file. We also have another backup of this MDF File from 3 months ago. Both MDF files have ...
1
vote
1answer
5k views

How to make stored procedure with outputs OUT sys_refcursor, OUT varchar2, and OUT number, then use in c#.net app

What is the syntax for a stored procedure that outputs a refcursor, a varchar2, and a number? I would like to output all three in the result, for the purpose of displaying count, and a message which ...
1
vote
2answers
2k views

Installing SQL Server Express instance so common users can access

I need to install a SQL Server Express instance (as an admin) which can be later on read and modified by regular users. I run into http://msdn.microsoft.com/en-us/library/ms254504.aspx, and I'm ...
1
vote
1answer
105 views

Finding parameter names for binding stored procedure parameters

For unit testing purposes I am attempting to call the DBMS_OUTPUT.PUT_LINE procedure from c# using parameters that are bound by name. Since this DBMS_OUTPUT package seems to be a standard on Oracle ...
1
vote
1answer
430 views

SSIS 2012 Ftp parallel/asynchronous multiple file download

Any help would be appreciated with either scenario. if Are there any settings available to download multiple files in parallel from an FTP server? else If not, I guess I'll just roll my own via ...
1
vote
3answers
1k views

Local user login access in sql server 2008

I have a created a local user called 'MynetDB' with SQL Server Authentication (password) in SQL server 2008. Server roles is public and user mapping to 2 databases as db_owner and public. Status has ...
1
vote
1answer
573 views

CLR TVF that calls web service is getting 401error

I am calling a web service from a CLR TVF in SQLServer 2008R2. On the IIS server this service has open permissions. When tested using GET or POST requests on a browser the web service works as ...
1
vote
2answers
104 views

script task sssis file extension is missing?

Hi I have problem with script task C# I create I have to prefix log file with date but my problem is not adding file extension log file is log_yyyy_MM_dd without extension I want ti extension log ...
1
vote
1answer
863 views

Best Format to Bulk INSERT/UPDATE Data to SQL SERVER using C# [closed]

Can anyone tell me what is best way to bulk insert/update data to SQL SERVER 2012 using C#? I have an excel file which I am passing as TVP(table value parameter) to a SP. But this is little bit ...
1
vote
1answer
53 views

Is there a public repo where I can contribute to the MySQL .NET connector?

We have found ourselves making some performance and scale improvements for the MySQL .NET driver from here http://dev.mysql.com/downloads/connector/net/ We know where to get the source in a ZIP ...
1
vote
2answers
726 views

Microsoft SQL Server how can i detach localdb to run on any computer

I am working on a personal project and have implemented a database system using the Entity Framework code first tutorial on msdn, link below, http://msdn.microsoft.com/en-gb/data/jj193542 I am ...
1
vote
1answer
188 views

Database Tasks in C#

We have 2 database environments a "Production" Database and a "Reporting" Database located on different physical windows server 2003 boxes. The reporting Db is derived off the Production database and ...
1
vote
1answer
756 views

Merge Replication from SQL 2008 R2 to SQL 2005 Express: SQL Server version (10.50) is not supported

I'm setting up a (one way) pull, RMO merge replication via web sync from my main database (SQL Server 2008 R2) and clients running SQL Server 2005 Express or 2008 Express (I must support both). I've ...
1
vote
0answers
39 views

Selecting aggregated string from database

I have a table in my database consisting of one column which is NewLanguage(varchar). I insert new languages to the table and I want to select the rows of the table and assign them to a string ...
1
vote
2answers
35 views

Garbage DB Objects Cleansing

How do I find in use db objects from all application pages is there any tool or trick I can use, just like we do search in Visual studio for an object in entire solution
1
vote
0answers
100 views

Transfer an Advantage Database's Schema/Data to a PostgreSQL Platform Using C# Program

I am currently in the process of writing a .NET program with C# to transfer a database on a Sybase/Advantage 9.1 platform to a PostgreSQL 9.3.4 platform. I am doing this transfer in two stages - ...
1
vote
0answers
228 views

Best practice - SQL Schema to store Timerecords for a Time and Attendance module

I'm starting a time and attendance module in C# and SQL. There will be many time rules depending on every shift. For example: Shift 7:00 - 14:00 for Administratives: 15 min grace time, but if ...
1
vote
0answers
53 views

Rows do not match Subscriber and Publisher

I have an transactional replication setup with updateable subscription that is utilized by an Application. When I insert a project into the application, the msrepl_tran_version is different on the ...
1
vote
0answers
592 views

Remote connection to PostgresSQL in Windows 2008 Server is prompting the error below [closed]

The error: Unable to read data from the transport connection. an existing connection was forcibly closed by the remote host. The conditions: I have the following connection string: server = ...