Tagged Questions

This tag is for SQL Server 2008, major build version 10.00.xxxx.

learn more… | top users | synonyms (1)

3
votes
0answers
18 views

Why does my procedure run slowly until I update statistics? [duplicate]

I am using a SQL 2008 database (not R2 sadly but have also tested this on an R2 database server) and have an ELT process running. Data is extracted from source and loaded to staging tables in the ...
3
votes
1answer
48 views

Can I somehow ignore uncomitted transactions which are causing the database to go into recovery?

I have a database which I have inherited which is just a collection of static data in seperate tables with no relations between tables. It is essentially just a number of tables which are the results ...
1
vote
1answer
386 views

SSIS FTP Sending Blank Files

I'm supporting an existing data interface that is a series of SSIS packages (SQL 2008 R2) for sending and receiving data with a third party. The communication is being done through FTP, and it uses a ...
0
votes
0answers
60 views

MSmerge_expand_sp triggers conflict in SQL Server

I am adding new data using SQL Server merge replication over web and getting this type of error. Could not find stored procedure 'dbo.MSmerge_expand_sp_A749C9F4793740CEA94A470F27259788'. Can ...
3
votes
0answers
77 views

Splitting SQL Server 2008 database [closed]

I manage a 280gb SQL Server database. The structure contains a single database file and many schemas. Each customer has a schema and an associated set of tables. so : MainDatabase : Schema1: ...
-1
votes
3answers
11k views

Where to download SQL Server 2008 R2 Enterprise Manager? [closed]

If SQL Server 2008 R2 Enterprise Manager(Not SQL Server Management Studio) free? where to downland it? Or it only for SQL Server 2000 and replaced by SQL Server Management Studio for later version?
0
votes
1answer
344 views

Restoring to specific point in time in SQL Server

EDIT: The problem turned out to be that while backups are made every night, I was trying to restore to a point in time that had not yet been backed up. I would have realized this sooner if I were ...
0
votes
1answer
236 views

SQL Server 2008 Timeout expired rebuild and reorganize index solve the issue

I have a large database with a file stream located on a different disk the server that hosts this database has a large number of another none related databases but the specifications of this server ...
0
votes
0answers
32 views

where to find out sql server config file?

I try to install SQL Server 2008 R2 cluster. One time is failed. One time is success. The reason is because inputs during different. Where is the config file to save the inputs from installation, like ...
0
votes
1answer
84 views

How to restore SQL Server database to a specific day? [closed]

Suppose I have an SQL Server 2008 which is installed on windows 2008. There is a db MyDb under the instance. MyDb is have full backup every night. Because of storage space on hard driver, only 7 days ...
3
votes
1answer
168 views

SQL Server: Can Page Verify be set to Checksum on any database, or must I check compatibility?

In Microsoft SQL Server, I have some older databases set to "Torn Page Detection" rather than "Checksum" page verify. Do I need to determine if a given SQL Server database is 'compatible' with the ...
1
vote
1answer
135 views

Recover Jobs from a MSDB

I need to recover the jobs from a MSDB file. I had to fully reinstall a new SQL Server and Windows Server, but apparently I forgot to ever do a MSDB backup. Yup, big blunder. Now I need to restore it ...
1
vote
1answer
810 views

Datawarehouse - Dimension, Fact, or Degenerative dimension

I am building a warehouse for a billing system that bills a number of services/utilities on the same invoice, as such I am having real trouble conforming to a recognised design method for the ...
0
votes
1answer
22 views

Are files and file groups included when doing a full backup?

I have a database with 4 files and 2 file groups. According to the size of the files, it's 1TB. However, the backup (non-compressed) is only 350GB. Is this typical? Or, do I need to specifically ...
1
vote
1answer
125 views

SQL Server log file continues to grow? [duplicate]

I'm having an issue with a SQL Server log file which will not maintain a steady amount of space held on a HDD which it has been issued. The drive is ~50GB and the log file is growing to occupy this ...
1
vote
1answer
183 views

INSERT INTO selected columns creates new column from JOIN [closed]

I have an INSERT INTO ... SELECT.. query that uses a JOIN on two tables. The results of the query should take a subset of the information and insert it into an existing table. That part works, but the ...
4
votes
1answer
211 views

SQL query filled Temdb complete Harddisk [closed]

I have a query which was earlier fine but now it is running me out of hard disk space with message that tempdb is full. My Harddisk has 90 gb of space as soon as i run query temdb runs out of space in ...
0
votes
0answers
117 views

Minimizing possible trigger impact

I'm trying to make sure a trigger doesn't cause trouble. (Quixotic, I know!) Is there more I can do to the trigger below to make it bullet-proof? Details: We have a huge table we don't control ...
0
votes
1answer
47 views

Having Issues Exporting to online SQL Server database [closed]

I successfully initiated the export wizard of Microsoft SQL Server 2008 Studio and it was exporting fine from the database on my PC to online server database. But suddenly my internet network went ...
0
votes
1answer
8k views

Setting user permissions for different SQL Server schemas

I need to limit access to a particular user, but they still need to be able to see the data in tables owned by dbo. I'm trying to do the following: dbo schema functions as it would normally, has ...
2
votes
1answer
480 views

Script all tables in a database

In SQL Server 2008 - is there any script available which will list all tables (incl column names, data type, length) for the entire database - with one script.
2
votes
2answers
297 views

Find which permissions are being used for a given user on a object

Is there any way in which I can see what permissions are being used to determine a users access to a given object? I'm able to see which permissions have been granted to various roles and users within ...
0
votes
1answer
160 views

How to create a trigger that update the date and time field and modify of the row

I want to create trigger that will update the record. The situation is like: I have one column named CheckInDateTime and one more named Status. If the administrator is not able to update the Status ...
3
votes
3answers
221 views

Is it possible to setup failover clustering between a 32 bit instance and a 64 bit instance?

I am attempting to setup a couple of virtual machines in my lab for testing failover clustering on SQL Server 2008 and Windows Server 2008. One of the hosts I have is not capable of running a 64 bit ...
0
votes
2answers
459 views

Restore in Full Recovery model with no transaction log backups

Just realized one of our databases has been in Full Recovery mode but we've not been making log backups. On a nightly basis, we've been running a job that runs this T-SQL command to do the database ...
0
votes
1answer
42 views

Linked SQL Servers

I'm trying to link 2 SQL Servers (2008 and 2005). I have tried it via the GUI and scripts, and having no luck. I have problems trying to to query through it with access. As I'm not the Admin of the ...
1
vote
1answer
88 views

Extracting text from a column

I want to import data from Excel into an existing table in a SQL Server database. I have a column like Gender and the values are Male and Female in Excel. I want to insert only the first character ...
4
votes
2answers
3k views

SQL join query to show rows with non-existent rows in one table

I am trying to get some reporting done for employee time records. We have two tables specifically for this question. Employees are listed in the Members table and each day they enter time entries of ...
1
vote
1answer
56 views

Creating an index on table A but with reference to table B

Our company uses a 3rd party application for numerous aspects of the business. One aspect is dealing with customer payments and when selecting a window within the app to list all the payments ever ...
1
vote
2answers
452 views

Metric to standard unit conversion in SQL Server

I am giving simplified version of my two table which are as follow. tblRecords ID unit val --- --- --- 1 KV 3 1 BAR 4 2 KV 7 2 KG 5 3 C 37 tblUnit unit ...
2
votes
1answer
148 views

Logging errors with extended events excluding some users

I use extended events to store database errors, like this: CREATE EVENT SESSION [ErrorCapture] ON SERVER ADD EVENT sqlserver.error_reported ( ACTION ( sqlserver.client_hostname, ...
-1
votes
2answers
99 views

Create Automated Indexing for huge SQL Server Table [closed]

i have Huge SQL table like 800mil record. it takes about 30gig of disk space without any indexing on it. what is the best method to apply index in it? also this table gets about 50,000 record ...
0
votes
2answers
3k views

How to read “CPU (ms/sec)” in the “Recent Expensive Queries” of Activity Monitor?

Is CPU (ms/sec) the cpu time in ms in previous second? If it reaches 1000, does it means that it uses 100% CPU? However, on my 8 cores server, the % Processor Time is usually very low like several ...
1
vote
1answer
97 views

how do I check the last time dbreindex or an index defrag was executed

Is there a quick tsql I can use to check when was the last time a dbreindex, index defrag and update stats was executed on the database? Appreciate everyone's quick response.
-1
votes
2answers
201 views

Insert into an empty table with or without clustered primary key? [closed]

I will need to insert some rows in an empty temp table. The table has PK of (month date, id char(10)). The source table is partitioned by month. Which of the following is faster? 1a) the target table ...
0
votes
1answer
213 views

How to remove orphaned Log Reader Agents from Replication Monitor?

How do I remove the two Log Reader Agents with errors from the Replication Monitor? As you can see, the job does not exist (Error message produced by right click > Properties on errored Log Agent ...
0
votes
1answer
173 views

In Extended Events what is the difference between rpc_completed and sql_batch_completed? [duplicate]

I understand that rpc_completed is defined as the completion of a remote procedure call and sql_batch_completed is the completion of a t-sql batch. However can anyone explain in concrete terms what ...
8
votes
3answers
3k views

Can I create a user defined table type and use it in the same transaction?

When I execute the following (in management studio, GO will separate the commands into batches) use tempdb begin tran go CREATE TYPE dbo.IntIntSet AS TABLE( Value0 Int NOT NULL, Value1 Int ...
4
votes
2answers
181 views

Make “as” mandatory when create column alias?

We found a lot of bugs are caused by missing comma, select aaaa, bbbb -- forgot comma ccc, dddddddd, ..... Is it a way to make expression name invalid and it must be expression as ...
1
vote
1answer
1k views

Why does SQL Server fail to create a procedure referencing a linked server?

Red Gate Deployment Manager (RGDM) today failed with a "login failed" error even though it had administrative control of the target server: 2013-11-04 17:13:22 +00:00 INFO Creating ...
-1
votes
3answers
110 views

Alternative of a query

I have a query : SELECT TOP 21 * FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY contacts.id ) AS row_number, contacts.id, contacts.first_name, ...
4
votes
1answer
66 views

How can I script out a copy of the backup to multiple locations?

Is there a way to script a copy of the backup file to multiple destinations? For example, the following will split the backup into 3 segments which make up the entire backup file. But, I'm looking to ...
0
votes
1answer
30 views

How can I write to replicated environments without impacting production? [duplicate]

Are there any methods (mirroring, snapshot replication, change tracking, etc...) available in SQL Server 2k8 which would allow me to replicate production data to several individual development ...
6
votes
2answers
209 views

Figuring out the physical size of a group of tables in SQL server

I have a group of about 30 tables, and I want to know the physical size on disk of all of these tables (plus indexes). Is there an easier way of doing this than through the GUI in SQL server 2008 R2? ...
1
vote
2answers
153 views

SP or query to dump “password policy” checkbox for all logins

sp_helplogins doesn't show a column for this. I need a listing of all logins, with the status of their "Enforce password policy" checkbox. This is for an auditor, and the standard practice is for ...
0
votes
0answers
791 views

CHECK constraint ignored during INSERT SELECT

I have the following 2 tables (simplified): CREATE TABLE dbo.[StagingTable] ( HostName [nvarchar] (max) NULL ,UserName [nvarchar] (max) NULL ,AccountType [nvarchar] (max) NULL ) CREATE TABLE ...
1
vote
0answers
185 views

Restore of SQL service master key not required to decrypt data after migration?

This is a bit of the opposite of how this question is usually asked-- I used the following to create a database master key, a certificate, and a symmetric key: Here's how I created the certs/keys ...
3
votes
2answers
453 views

How to transfer database from SQL Server to DB2?

I have a database file on disk called project.mdf. I want to import this into IBM DB2. How do I import this database?
0
votes
0answers
61 views

SQL Server JOIN with COUNT [closed]

I have two tables I'm trying to query across. One contains an entry for every time a user tunes to a particular channel in our middleware. The second is normalized table containing station ...
1
vote
1answer
154 views

Unique constraint on multiple nullable columns Sql Server

We have a PriceCombo table with the following columns: id (not null), a_id(null),b_id(null),c_id(null), discount(not null). We are using this table to figure out which price to assign various combos ...