Questions tagged [sql-server]

SQL Server is a relational database management system from Microsoft.

SQL Server

Microsoft's SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality. It originated from the Sybase SQL Server 4.x codebase and Transact-SQL dialect (T-SQL), but it has forked significantly since then.

SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality.

354 questions
8
votes
4 answers

Should "tags" be an nvarchar field in a table, or should it be another table altogether?

I am building a photography website and I want to allow the user to put tags on their photos for easy searching. But I'm not sure if I want the tags to be an nvarchar field in each picture and then search for that tag in each record or if I want to…
5
votes
2 answers

Will SQL Server autonumber reuse a value if a record is deleted?

The titled basically states it. If I have a bigint column with primary key and autonumber, and a record is deleted, will SQL Server ever reuse that now available value? The underlying issue is that I have a multi-user environment, and if I retrieve…
4
votes
1 answer

sql server driver scripts seem awkward, is there a better way to batch sql scripts?

I've been writing 'driver' sql scripts (is that the correct name?) to run multiple sql 'sub' scripts in order, writing errors to log file etc. My Oracle version seems to be more or less ok, but my sql server one I'm struggling with. Specifically,…
timB33
  • 191
2
votes
1 answer

Adding a complex check constraint

I am working on a table that has a compound primary key that includes a date. Faculty PersonId StartDate EndDate Title .... ------------------------------------------------- I will add a compound key consisting of the PersonID and…
2
votes
2 answers

SQL Server 2000 vs 2008 Express?

Due to not wanting to pay licenses my company is still using SQL Server 2000 for new projects. This is very limiting for multiple reasons. I'm wondering what are the limitations of using SQL Server Express 2008? Is there any reason NOT to use it to…
1
vote
2 answers

Passthrough database views - what's the point?

I've inherited some legacy code which has some ostensibly strange views in an SQL Server database. They are basically complete passthroughs for a table. No column differences - a comparison of the columns using INFORMATION_SCHEMA.COLUMNS yields…
1
vote
2 answers

MS Sql server internals/troubleshooting courses?

We have been working with Microsoft on a ticket we opened due to one of our queries being much slower on MS Sql server 2k8 enterprise vs sql 2k5 standard. The engineers we are working with have incredible tools and knowledge of the internals of sql…
hp01
  • 127
  • 1
1
vote
1 answer

Syncing graph of data to other database (like data)

Switching to new system and need to keep old data going for some time. So, we need to update old database with data when new system being updated. It's a transactional data, like orders/shipments. Databases similar in principle but structures…
katit
  • 681
1
vote
0 answers

Managing shared storage in a high availability environment

I have an application with a custom high availability (HA) feature that provides automatic failover from an active primary server that experiences a failure to a passive backup server. To date, this feature has included manual replication of all…
Dan
  • 243
1
vote
1 answer

Way for store User recent playlist in database

Every time when user hears one music on system, the system stores this music to recent list, but I am afraid to pass over than decimal(19,0) limit in future. If I do Reseed I will get some problems insert invalid duplicate pirmary keys, but if I…
1
vote
4 answers

SQL Server Management Studio Show last executed query

I am looking for a way for SQL Server Management studio to show me the last SQL query that was run. For example, when I make modifications to a table in the designer mode, I will eventually want to make the same changes to the production DB without…
solidau
  • 409
0
votes
2 answers

Why does Microsoft SQL server default to failing on deadlock?

Why does Microsoft SQL server ( and possibly other SQL implementations ) default to failure when a deadlock is detected? Wouldn't it be more useful, at least as a default, for queries to be retried? For the systems I make for small businesses this…
0
votes
2 answers

How to update MSSQL DB schema during deployment in HA enviroment without any downtime

I spend a lot of time trying to figure out what MSSQL provide to update MSSQL schema without loosing the sync, but I find it hard to find a solution. Does any of you faced the some problem ? I found two solutions and both are not an option :…
sino
  • 105
0
votes
1 answer

Is SQL Server Sevice Broker appropriate for transfering large volumns of records from one database to another

I have a database that collects and process large volumes of records However due to the legacy nature of the system im working with (and the powers that be) i need to transfer (processed) records to a different database instance (with some small…
user140075
0
votes
3 answers

"flexible" functions in SQL Server 2012?

I'm looking for a very exotic thing and have no idea if it exists at all in SQL Server 2012. (Please forgive me - my background is in T-SQL, but not yet the fine details of SQL 'programming'.) So, whether this 'this' is a UDF or SP or something else…
user74933
1
2