Questions tagged [sql-server-administration]

43 questions
22
votes
2 answers

How can I query the list of database roles in a SQL Server 2000 database?

In Sql Server 2000, is it possible to return, via SQL query, a complete list of database roles that exist in a given database? I know it is possible to see these roles by expanding the Security, Roles, and Database Roles nodes in SQL Server…
Warrior Bob
  • 418
  • 1
  • 5
  • 11
11
votes
9 answers

SQL Batched Delete

I have a table in SQL Server 2005 which has approx 4 billion rows in it. I need to delete approximately 2 billion of these rows. If I try and do it in a single transaction, the transaction log fills up and it fails. I don't have any extra space…
Tom Ferguson
  • 907
  • 1
  • 10
  • 26
9
votes
3 answers

How to determine the size of a Full-Text Index on SQL Server 2008 R2?

I have a SQL 2008 R2 database with some tables on it having some of those tables a Full-Text Index defined. I'd like to know how to determine the size of the index of a specific table, in order to control and predict it's growth. Is there a way of…
8
votes
1 answer

RESTRICTED_USER

Before changing database schema I issue: ALTER DATABASE SET RESTRICTED_USER On completion: ALTER DATABASE SET MULTI_USER I understand that a running transaction will be permitted to continue until completion. Q: Is there any way to wait till all…
pkario
  • 2,180
  • 6
  • 26
  • 30
5
votes
2 answers

Can I run DBCC CHECKDB from .NET?

I am writing a scheduled job to mimic a SQL Server maintenance plan for SQL Express. (I have to do this because SQL Agent and related tools don't exist for SQL Express) One of the steps is to do a database integrity check. The TSQL for this…
Philip Fourie
  • 111,587
  • 10
  • 63
  • 83
5
votes
3 answers

SQL Server 2016 _can't start mirror

After upgrading SQL Server 2014 to SQL Server 2016 (both Enterprise editions), I can't start mirror. This works normally on SQL Server 2014. After I restore (WITH NORECOVERY) mirror database with full and log backups of primary database I normally…
Cubone
  • 61
  • 1
  • 1
  • 4
4
votes
4 answers

Backing up SQL Database for Reports

I'm looking for some help/suggestions for backing up two large databases to one server dedicated to reports. The situation is; My company has two databases for its internal website. One for the UK and one for Europe. Both are mirrored for DR. I have…
3
votes
5 answers

SQL Server Scheduled Job - says its running with no errors but doing nothing

I have a SQL Server scheduled job which has been running for about 6 months every night. However, it has stopped doing what it should (transfering data from one database to the next). There are no errors and when I run it manually it is fine. I'm…
AJM
  • 32,054
  • 48
  • 155
  • 243
2
votes
3 answers

Is it possible to restore a backup of a SQL Server 2008 database onto an instance of SQL Server 2000?

Is it possible to restore a backup of a SQL Server 2008 database onto an instance of SQL Server 2000? I need to work on an sample application for which database backup is in sql server 2008. But I'll not be able to install 2008. So is it possible to…
Ahsan
2
votes
2 answers

Java, proper approach for controlling Linux server from within Java code?

I've been tasked with setting up an automated system that will have to do some things on the Linux server that, from my understanding and research thus far are not able to easily be done from within Java, such as mounting a hard drive on the linux…
Rick
  • 16,612
  • 34
  • 110
  • 163
2
votes
1 answer

In MSSQL Server 2008 and later, any major differences between "sp_addlinkedserver" and using registered servers?

I am looking to create a SQL view which uses data from multiple servers. All of these are MS SQL Server 2008 and later From my understanding, there are two ways to go about in gaining access to the other servers: Using the stored procedure…
1
vote
1 answer

Active list of users in SQL Server SQL Database

Is there a way to get active list of users in a SQL Server database, lets say active from last one month OR say people who connected to the database anytime in last 30 days? I tried below query but it gives me list of all the users irrespective of…
Joseph
  • 530
  • 3
  • 15
  • 37
1
vote
1 answer

Extended Events and SQL Server Profiler

I understood the concept of Extended Events and SQL Server Profiler, I felt like both of them do the same work. I could not understand the major difference between them. Can anyone explain me the major difference between Extended Events and SQL…
Rajesh
  • 11
  • 1
1
vote
1 answer

Detaching a database as a backup strategy

I've read dozens of articles about why this is a bad idea. The arguments against using a detached database as a backup are legion. However, I still think that in my case, it makes good sense. Realizing that those are often the words of admins who…
1
vote
1 answer

SQL Server Agent job dependency (not step)

We have 2 Jobs created in SQL Server Agent. PreLoad DWHLoad Job step list in both Jobs have various steps. DWHLoad needs to be run after successful completion of PreLoad Job. As of now, I've scheduled PreLoad to run at 1:00AM and it finishes at…
Ash
  • 1,180
  • 3
  • 22
  • 36
1
2 3