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

learn more… | top users | synonyms (1)

1
vote
1answer
83 views

Server audit with more than 1.000 entries

On my Mssql 2008r2 I created a server audit for all login and logout: USE MASTER GO CREATE SERVER AUDIT audit_test TO FILE (FILEPATH = 'D:\Audit') GO ...
0
votes
0answers
52 views

Have non clustered index but no clustered index [closed]

If a table have two columns say (say Id and Name) has only non clustered index on name column but no clustered index, then what happens to performance of the table ?
1
vote
1answer
68 views

How to disable data type check while pushing data to Linked Server

I have two SQL serves one is SQL server 2005 and other SQL server 2008.I push data from SQL server 2005 to SQL server 2008 using Linked Server.I want to improve performance of data transfer. Few days ...
2
votes
1answer
2k views

SQL Server : keep track of all connections/disconnections

I have a Microsoft SQL Server 2008r2 SP1. I need to know which users connect to, and disconnect from, database. Ideally, I would like a list of (datetime, username, connect/disconnect). Can this be ...
0
votes
2answers
99 views

Accept null value on parent column in multipart relationship

EDIT: I've come up with one poor solution (below) that requires some denormalization, but does avoid the risks of UDFs in CHECK constraints. I would appreciate your help if you have a better answer. ...
1
vote
2answers
71 views

SQL User Security

We have applications connected to SQL using windows authentication. While having connection with Application user can also access to Database instance on the same time as well. We need to limit the ...
4
votes
3answers
392 views

Why does my procedure run slowly until I update statistics?

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
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
362 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
53 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
10k 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
326 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
218 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
83 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
157 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
133 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
671 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
116 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
173 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
210 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
105 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
7k 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
403 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
267 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
146 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
193 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
419 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
74 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
2k 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
397 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
142 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
84 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
193 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
182 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
154 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
2k 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
177 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
96 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 ...