I have a 5GB database and a 20GB transaction log (SQL Server 2005). Not sure why it is so large or what happened to make it that large, it used to be around 1/2 the size of the DB. DB grows about 1GB/month.
Are there any guidelines to how how big your transaction log should be relative to your database file size?
EDIT: I'm not saying...
Hi,
Does someone have a link where I can read on how to access my remote server's sql server '08 installation?
update
I want to access sql server 2008 from management studio on a remote server.
Remote access is disabled by default!
...
As a followup to this question I'm wondering what your SQL Server backup/maintenance plan is, and how I can make mine better.
Currently I'm running two plain-jane maintenance plans from the plan wizard.
The first runs nightly and does just about everything ...
Full database and transaction log backup
integrity check, rebuild index, r...
Is there a way to use Profiler to determine whether a table is being accessed by queries?
I saw an event named Object:Opened (Indicates when an object has been accessed, such as for SELECT, INSERT, or DELETE statements) and Object:Closed, but these do not seem to work.
In particular, I created a simple trace with both Object:Opened and...
Current, I've got a stored procedure that has a main goal of doing a full text search through a database table of films and tv shows. In order to get it to do partial-keyword searching, I added some code in SQL to split up the search query by spaces, and output a statement like the following:
' "batman*" ~ "be*" '
The original string,...
Is there a way to tell SQL Server to not cache certain types of plans? For example, if you have a large number of users queries coming from SQL Server Management Studio, is there a way to tell these to not be cached in the plan cache, thus taking up memory and other resources? Are there other behavioral tweaks that you can do to preven...
I have a field (say, foo) in a table in a SQL Server database that was originally defined as nullable, but new requirements indicate that this field must be non-null.
What's the best way of updating this field to non-null via an update script without deleting the contents of the table? I tried generating a script from the Design view, ...
In the Oracle world, it's been gospel to build your database block size to be even multiples of the File system's block size. I assume this is still true but I'm not adverse to being told why technology has made this irrelevant.
But I've been told some SQL Server DBA's are going to upgrade the OS of a SS2000 installation to 64bit to get...
I have two tables. Club and Coach.
Between them is 0,1 - 0,1 relationship (coach can have zero or one club. club can have zero or one coach).
When I want to change the coach of the given club, i have to update the club table. So i have to change idCoach of that club. Lets consider a new coach (the newly assigned coach of the given club) ...
I've got a backup made using the regular SQL Server 2005 backup command. Is there a way to restore just a single table, not the whole DB?
...
I have a web application that needs to fire off a long-running SQL Server procedure (to rebuild a table) when certain criteria are met. What is the recommended procedure to do this?
I was thinking, when the criteria are met a record would be inserted into the database and a scheduled SQL server job would check that table at a specified ...
I have a property defined in my HBM file like this:
<property name="OwnerId" column="OwnerID" type="System.Int32" not-null="false" />
It is defined as a nullable field in the database also. If a record in the DB has the OwnerID column set to an integer, this object is correctly loaded by NHibernate. But if the record has it set to n...
Hi all,
I have an internal enterprise application I've developed for my company built on .Net 3.5 / SQL 2008.
I have two types of databases. The main system database which contains all of our global data, such as user names, and customers, etc. And project databases, which contain the actual data pertaining to our clients project.
...
I have seen posts that show three ways to reset the DMV views:
Reset the SQL Service
Detatch the database
Close the database
All of these methods seem to require taking the system off-line for a few moments. Is there a way to reset the statistics on demand without interrupting use of the database? When we have odd performance issue...
I am absolutely new to the .NET world, and started with C# on friday. I have some experience with database apps, though.
We will go with LINQ-to-SQL for a medium scale project. I am used to generating my schema from classes and keep track of changes with subversion and equivalents to Ruby's Migrations. There obviously is no easy way to ...
I need to query a database which is designed so what a NVARCHAR column keeps age of clients. I want group clients using
GROUP BY age / 10
but when engine encounters some string like '20.10.1984' (someone entered his bithday instead of age), my query fails.
The percent of "bad" ages is very small, so I want just to skip records which ...
I have many jobs that have a step to send 1 specific email out to a list of people. That list of reciepients is hardcoded in the step command and I need to remove one person from that list, in all jobs.
How do I loop through ALL the jobs in the Sql Server Agent and modify the command text to find+replace a specific piece of text.
I ...
What is the maximum number of publishers one can create on one Database on that same database server itself?
Also, Vice - versa ,
What is the maximum number of subscribers one can create on one Database on that same database server itself?
...
I want to create a trace on a database server from my C# app, like what you do in SQL Server Profiler. I have found stored procedures (sys.sp_trace_create etc...) that dont seem to work for my SQL management studio. I was wondering if anyone could help with the coding, or where i would start to do this?!
...
Is there an easy way to chase down table/stored procedure/function dependencies in Sql Server (I'm using 2k5)? I've inherited a giant application with lots of tables and even more stored procedures and functions that are long and interlinked.
At the end of the day is there a way to build a dependency tree? Ideally what I'm looking f...