sql-server

Combining SQL results using LINQ

I have a database of company registrants (for a search/directory funtionality). We've added a new table to hold "enhanced" information for registrants that pay for this feature (such as advertisements/additional images/logos etc). Right now the new table just holds the registrants unique identifier, and a few additional fields (paths t...

Dynamically taking a table name in aspx form using sql server

Hi! I'm trying to dynamically accept a table name depending on the conditions satisfied, also the column name is selected dynamically, and so is the comparison value, but I'm getting an error while running it. I'm writing this code in C# and my backend is SQL server 2005. Please help me. Here is the code: if( table=="studenttab"...

Graphical GUI for sql server.

Which version of sql server allows building queries in a graphical GUI ? ...

How can I practice my SQL Server, Sybase, and Oracle skills on a linux box?

I have a linux box. When I had a Windows box, I was able to download the free non-commericial use MS SQL Server. How can I run free personal copies of SQL Server, Sybase, or Oracle on my linux box? I don't need to to have any permanent databases or any great amount of storage. I just want to (re-)familiarize myself with these differen...

What version of SQL Server do I need to move database to production server?

Hi All, I have just finished developing an ASP.NET on my local Windows XP machine. I used Visual Studio 2008 and SQL Server express to develop the site. My problem is that now I would like to move the SQL Server database from my XP machine to my production server. I have been reading that SQL Server express cannot export my database. ...

Use optional arguments in SQLCLR

I have a stored procedure in MSSQL 2005 Server SQLCLR. Is it possible to define an optional argument to it? If so, how? ...

Value of MCITP: Database developer/administrator

I'm targeting these two certificates. But I don't really know that how they affect my CV, and, of course, my salary. Are they truly valuable? Do they make differences in your work and your position before and after you get it? ...

Is physical file fragmentation of the mdf file an issue?

I have ran a defrag report on a SQL server and the mdf file for the database is being reported as 99% fragmented. I asked a colleague and they said this may be normal as it just the way that type of file works internally. Is it an issue and would running a disk defrag for this file improve DB performance? It is a pain to because it requ...

How to spread tempdb over multiple files?

This blog http://blogs.msdn.com/sqlserverstorageengine/archive/2009/01/04/managing-tempdb-in-sql-server-tempdb-configuration.aspx states that it is a good idea to "Spread TempDB across at least as many equal sized files as there are COREs or CPUs." So my basic question is how do i actually configure my SQL server to do that. So I right ...

Does SQL Server DBA having good oppurtunities over oracle...?

can any body help me out for how is the job oppurtunities for sql server DBA...?is future is good for this position...?does it has more oppurtunities over oracle...? thanks, sivaram ...

AFTER INSERT Trigger for SQL Server to create unique random 8 character code?

I started with some stored procedure code by Raymond Lewallen for a password generator. I would like to create a trigger that will create a unique 8 character ID each time a new row (a customer) is inserted. What I have so far: CREATE procedure dbo.AllAccessIDgenerator (
   @showID varchar(40) @accessID varchar(100) O...

SQL Transactions (b)locking Selects - is my understanding correct

We are using ADO.NET to connect to a SQL 2005 server, and doing a number of inserts/updates and selects in it. We changed one of the updates to be inside a transaction however it appears to (b)lock the entire table when we do it, regardless of the IsolationLevel we set on the transaction. The behavior that I seem to see is that: If yo...

transfer data from Excel to SQL Server

Hi all, I have an Excel Spreadsheet that contains all my data that I need to put into an SQL Server database. I am fairly new o ASP.NET and have never had to export from Excel to SQL Server before. My Excel spreadsheets looks like this Trade Heading -> ArtID -> BusinessName -> AdStyleCode -> Address -> Suburb In SQL Server I have cre...

Find what Foreign keys are in use

I have about 50 tables with created-by and changed-by referencing the user table. When I want to delete the user, I would like to create a list of what tables this user has data in, so one can go delete/edit everything belonging to said user. Is there any way of doing this in SQL? ...

Datawarehouse Question

I have a structure like this in a DB | RoleID | RoleTypeID | PersonID | OrganizationID | FromDate | ToDate | Each role is only valid for dates between FromDate and ToDate. Each person has a name, gender and birth date. I want to put this date into a data warehouse to use with SSAS. There I want to be able to build cubes with the nu...

Understanding DataTable with SQL Server DataAdapter for best speed

I have been wondering this and can't really find a straight answer. In .NET when you fill a DataTable with rows from the database using the SQL Server data adapter does it truly load into memory right then and there or does it still read data from the database as you are accessing it in some regard? ...

Database-wide unique-yet-simple identifiers in SQL Server

First, I'm aware of this question, and the suggestion (using GUID) doesn't apply in my situation. I want simple UIDs so that my users can easily communicate this information over the phone : Hello, I've got a problem with order 1584 as opposed to hello, I've got a problem with order 4daz33-d4gerz384867-8234878-14 I want...

Statistical calculations in SQL Server

Does anyone know of any packages or source code that does simple statistical analysis, e.g., confidence intervals or ANOVA, inside a SQL Server stored procedure? ...

concurrent queries in T-SQL

Hello All, I have a long stored procedure that does a lot of querying and generates a report. Since its a summary report, it calls a lot of other procs to get data. I am wondering if its possible to execute concurrent sql batches from with a proc in Sql server ... many thanks ...

Developer tools to directly access databases

I work with several different databases and find myself trying connecting to these quite often to test a query. I use the database specific tools to connect to the DB and run the query. I find these DB specific tools like SQL Query Analyzer (SQL-Server), Oracle Enterprise Manager, MySQL Query Browser to be quite clunky and slow when it ...