sql-server

Access a SqlServer 2005 Express Edition from a Network Computer

How do you access a SqlServer 2005 Express Edition from a application in a Network Computer? The access I need is both from application (Linq to SQL and ODBC) and from Management Studio ...

Oracle XE or SQL Server Express

Hi people, I'm starting a new project here (Windows Forms) and was wondering what's the best option today for a small (free as in beer) dbms. I've used SQL Server Express on the past projects, but time and time again I hear people saying that the product from Oracle is faster and more powerful. It will be used in a small company (aroun...

What is a good way to open large files across a WAN?

I have an application deployed into multiple zones and there are some issues with opening larger documents (20-50MB) across the WAN. Currently the documents are stored in Zone 1 (Americas) and a link stored in the database to the docs. I have heard some things about blobs in oracle and store binary in sql server 2005. And then per...

Query times out from web app but runs fine from management studio

This is a question I asked on another forum which received some decent answers, but I wanted to see if anyone here has more insight. The problem is that you have one of your pages in a web application timing out when it gets to a stored procedure call, so you use Sql Profiler, or your application trace logs, to find the query and you pa...

Automatically measure all SQL queries

In Maybe Normalizing Isn't Normal Jeff Atwood says, "You're automatically measuring all the queries that flow through your software, right?" I'm not but I'd like to. Some features of the application in question: ASP.NET a data access layer which depends on the MS Enterprise Library Data Access Application Block MS SQL Server ...

Differences Between MySql and MS SQL

I'm an ASP.NET developer who has used Microsoft SQL Server for all my database needs (both at work and for personal projects). I considering trying out the LAMP stack for some of my personal projects. What are some of the main differences between MySQL and MS SQL? Are using Stored Procedures a common practice in MySQL? Any advice or reso...

Best tool for auto-generating SQL change scripts for SQL Server

I'm doing a survey for the best SQL change script generators out there, specifically for MS SQL Server. I do know of Redgate SQL Compare, but I'd like to know what others use, and if there are free versions of such software that I could try. Any suggestions? ...

Best way to store a database password in a startup script / config file?

So our web server apps need to connect to the database, and some other apps have startup scripts that execute at boot time. What's the best way to store the name/password for these applications, in terms of security, e.g. perhaps we don't want sysadmins to know the database password maintainability, e.g. making the configuration easy ...

SQL, Auxiliary table of numbers

For certain types of sql queries, an auxiliary table of numbers can be very useful. It may be created as a table with as many rows as you need for a particular task or as a user defined function that returns the number of rows required in each query. What is the optimal way to create such a function? ...

HOWTO - Compare a date string to datetime in SQL Server?

In SQL Server I have a DATETIME column which includes a time element. Example: '14 AUG 2008 14:23:019' What is the best method to only select the records for a particular day, ignoring the time part? Example: (Not safe, as it does not match the time part and returns no rows) DECLARE @p_date DATETIME SET @p_date = CONVERT(...

Best way to connect To Sql Server with MFC

Soooo, I am starting this new job soon where most of the code is legacy MFC. The end goal is to convert/rewrite to C#. I'm a little rusty with MFC so writing some code so I can try and spark my memory. Anyway, was wondering the best way to connect to a SS2005 database with MFC. Back in the day CDatabase via ODBC was the way to go, has t...

How to set up a DB2 linked server on a 64-bit SQL Server 2005

I need to create a linked server to a DB2 database on a mainframe. Has anyone done this successfully on a 64-bit version of SQL Server 2005? If so, which provider and settings were used. It's important that the linked server work whether we are using a windows authenticated account to login to SQL Server or a SQL Server login. It's als...

How do you measure SQL Fill Factor value

Usually when I'm creating indexes on tables, I generally guess what the Fill Factor should be based on an educated guess of how the table will be used (many reads or many writes). Is there a more scientific way to determine a more accurate Fill Factor value? ...

SQL 2008 .NET CLR

Does SQL 2008 ship with the .NET 3.5 CLR, so that stored procedures written in CLR can use 3.5 features? ...

How do you kill all current connections to a SQL Server 2005 database?

I want to rename a database, but keep getting the error that 'couldn't get exclusive lock' on the database, which implies there is some connection(s) still active. How can I kill all the connections to the database so that I can rename it? ...

Why do Sql Server 2005 maintenance plans use the wrong database for dbcc checkdb?

This is a problem I have seen other people besides myself having, and I haven't found a good explanation. Let's say you have a maintenance plan with a task to check the database, something like this: USE [MyDb] GO DBCC CHECKDB with no_infomsgs, all_errormsgs If you go look in your logs after the task executes, you might see something...

How do you convert the number you get from datepart to the name of the day?

Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number? select datepart(dw, getdate()); This will return 1-7, with Sunday being 1. I would like 'Sunday' instead of 1. ...

No trace info during processing of a cube in SSAS

When I process a cube in Visual Studio 2005 I get following message: Process succeeded. Trace information is still being transferred. If you do not want to wait for all of the information to arrive press Stop. and no trace info is displayed. Cube is processed OK by it is a little bit annoying. Any ideas? I access cubes via we...

Building an auditing system; MS Access frontend on SQL Server backend.

So basically I'm building an app for my company and it NEEDS to be built using MS Access and it needs to be built on SQL Server. I've drawn up most of the plans but am having a hard time figuring out a way to handle the auditing system. Since it is being used internally only and you won't even be able to touch the db from outside the b...

Find out complete SQL Server database size

I need to know how much space occupies all the databases inside an SQL Server 2000. I did some research but could not found any script to help me out. ...