Indexing

Technical Article

How to make maintenance plan in SQL server

  • Topic

 I need somebody to explain how we do the maintenance in SQL server.Is it normal to run every night CHECKDB/CHECKTABLE? And why?Our new DBA runs DBCC CHECKDB/CHECKTABLE with auto-repair option checked and this is the reason he puts the SQL server in a single user mode from 10 pm to 5 am every day.This is […]

You rated this post out of 5. Change rating

2004-07-30

2 reads

Technical Article

RE: dependencies across datbases

  • Reply

There are no dependencies across databases physically.  You can write a procedure to "look for" the logical dependencies between databases, but that would be pretty hard unless you've really been consistent on how you name your foreign keys, column names, and tables.

You rated this post out of 5. Change rating

2004-07-27

Technical Article

RE: How can I do this in SQL?

  • Reply

I'm not sure I can manage all that in a single query, however a stored procedure would be straightforward enough: use statements like select top 1 where <, select top 1 where >, to find the lower and upper bracker, if they are the same return that, if one or both ends of the bracket […]

You rated this post out of 5. Change rating

2004-07-16

Technical Article

RE: Cant drop a trigger

  • Reply

Thanks for your help.lawprod is the owner of the table and UTR_Duplicate_REQ is a trigger as per sysobjects, so nothing is wrong in the syntax. Here is the script:CREATE TRIGGER UTR_Duplicate_REQ  ON lawprod.REQHEADER FOR INSERT AS BEGINDECLARE  @v_req_number VARCHAR(14),          @v_l_index CHAR(4),          @v_line_nbr INT,          @v_atchnbr CHAR(2),   @v_operator_id VARCHAR(10),          @v_vendor VARCHAR(9),   @v_ssn […]

You rated this post out of 5. Change rating

2004-07-16

Technical Article

RE: Why the insert trigger doesnt fire?

  • Reply

Thanks a lot for your advice! My solution is the folowing:I use Execute SQL Task from DTS and I execute Update statement against table. This way  I always have only one record in a destination table, which is updated periodicaly.(without trigger ).Dima 

You rated this post out of 5. Change rating

2004-07-16

Technical Article

RE: Backup Possessive or Performance hog ???

  • Reply

A mapped drive is only available to the user who creates it. SQL Server runs under the system account and the mapping is not recognised by the system account(unless it is a share). UNC means the fully qualified path i.e. \\servername\drive_letter$\directory Can you try the below sqlmaint -D Database -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "\\servername\I$\DIRECTORY" […]

You rated this post out of 5. Change rating

2004-06-30

Technical Article

RE: Looping without a cursor

  • Reply

here's one i use... (just a shade faster than Julian's method  ) declare @clientId int select ClientId into #ClientList from ... while 1=1 begin   select @clientId = min(ClientId) from #ClientList where ClientId > isnull(@clientId, -1)   if @clientId is NULL break -- some code endhowever, using a cursor is sometimes more efficient than this method because […]

You rated this post out of 5. Change rating

2004-06-25

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers