.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

SQL Scheduled Job Defrag and Reindex

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :Sql Server
 

I had a question as I started planning this.  In SQL 2005, I hear that we can not do a reindex while users are in the database, but you can 'get away' with defragging while users are in there.

Is this correct?

And, are the SQL 2008 reindex/defrag conditions the same?

Thanks folks.




View Complete Post


More Related Resource Links

ASP.NET: Combine Web and Windows Services to Run Your ASP.NET Code at Scheduled Intervals

  

If you want to schedule ASP.NET tasks, one solution is to use a Web service to provide an interface to your ASP.NET application and build a Windows service that calls to it at scheduled intervals. Thus the ASP.NET application doesn't have to own the scheduling logic. Here the author shows how to schedule your ASP.NET tasks using a Windows service to initiate the Web service call because Windows services can start themselves when Windows boots up.

Andrew Needleman

MSDN Magazine March 2005


create Scheduled Task that auto send mails

  

hello every one

i bought a hosting plan that allows me to send about 500email/per hour

but my client wish to send about 2000 or 3000 email at a time

is there a way to split them and 500 email per a time automaticly without the need of reloging again every hour

my hosting plan doesn't allow me to create a sql jop or send mails via Sql Server.

any bright ideas ?


SSIS package Scheduled Job Not Running

  
I'm not sure which way to research this issue.. I have an SSIS package that we can run just fine manually. But, when we put it into a scheduled job, it won't run. The package is on the same system as the SQL Server (2005), but it does call for updates from tables on another SQL Server (2000) on another domain (trusted). So, I'm thinking this might be a permissions / security issue, but not sure where to start... The package ProtectionLevel is "don't save sensitive", but that didn't help. Any help would be appreciated. Thanks. jill

Data View and Scheduled Start & End Dates Filtering

  
I have a data view that needs to display all pages that are current and the closing date is greater than or equal to today's date. The issue I am having is that the data view is displaying pages that are have the a future scheduled start date or the scheduled end date is past, i.e. something that has a start date of tomorrow, is displaying and a page that has an end date of yesterday is displaying. I can tried to filter the data view on the scheduled start and end dates but I can't see it in the Filter Options of the 'Common Data View Tasks'. I have also tried adding XSLT Filtering but am unsure how to set it up.  I have added the following as an XSLT filtering [@PublishingStartDate<=$Today or string-length(@PublishingStartDate)=0] I am wanting to check whether I have done this correctly or not. Some pages won't have a scheduled start date but all will have an end date. Below is the code from my data view: <WebPartPages:DataFormWebPart runat="server" ShowWithSampleData="False" AllowRemove="True" AllowHide="True" SuppressWebPartChrome="False" PartImageLarge="" ViewContentTypeId="" ExportMode="All" Dir="Default" MissingAssembly="Cannot import this Web Part." ID="g_fdf00570_38e8_4df9_8ab3_5ca3ed974c41" DataSourceID="" IsIncludedFilter=""

When is SQL 2008 SP2 scheduled to get released for production environments?

  
I know that the SQL 2008 SP3 CTP version is already out but I want to know when is it scheduled to get released for production environments?

Scheduled Folder and File cleanup

  

Does moss have a built in way to schedule file and folder deletion besides "disposition approval"? (i.e. every 90 days) If not built in, what options are out there? Thanks.


Scheduled Backup suddenly started giving errors

  

 

Hi,

I have scheduled full backup daily at morning 6:00. It was running fine till yesterday. Suddenly today morning it failed giving following error....

 

I have executed maintenance plan manually and again it gave same error....

 

10/19/2007 11:03:10,FullDBBackup.Subplan_1,Error,1,*****,FullDBBackup.Subplan_1,Subplan_1,,Executed as user: ****\SYSTEM. ...9.00.3042.00 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  11:03:10 AM  Error: 2007-10-19 11:03:10.98     Code: 0xC0010018     Source: Back Up Database (Full)      Description: Error loading a task. The contact information for the task is "Back Up Database Task; Microsoft Corporation; Microsoft SQL Server v9; ? 2004 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1". This happens when loading a task fails.  End Error  Error: 2007-10-19 11:03:11.25     Code: 0xC00291EC     Source: {C7FB73D1-ADF1-42C0-B3D5-9F8014CC206B} Execute SQL Task     Description: Failed to acquire connection "Local server connection". Connection may not be configured correctly or you may not have the right permissions on this connection.  End Error  Warning: 2007-10-19

Scheduled subscription runs continously

  

We have SSRS 2005 enteprise edition and ran into an issue with a timed subscription running continously. At the same time we had a data load that backed up replication also. SSRS server is also a subscriber. The issue gets resolved as soon as IIS is reset on the SSRS server. Any and all help is appreciated.

Thanks


anyway to get all the scheduled reports in sql reporting service 2000

  

Is there a query i can run which will show me all the scheduled reports in sql server reporting services 2000?

I've logged onto the server via the web interface, but the information displayed in the shared schedules doesn't seem to match up.

For example there's one shared schedule for 3:30pm every weekday and when i look at what reports are assigned to that schedule, and then actually go to that report, in the subscription tab is actually says the report is scheduled for 3:20, not 3:30

Plus i assume if the report is not using a shared schedule, it wont show up on that page at all.

I tried selecting from the schedule table, but it looks like that's just the shared schedules.

So is there any way for me to get a listing of ALL the scheduled reports that are set to run today or the next few days?

thanks



Sql Server Agent failed to executed a scheduled bat file that contains sqlcmd command

  

Hi All:

I am currently using Windows 2003 R2, Standard Edition.
I have Microsoft Sql Server 2005 Installed with the latest service pack which is sp3.
I logged into the operating system as an administrator. The windows administrator id is "test2".
I logged into the Microsoft Sql Server 2005 database using "Microsoft Sql Server Management Studio" as an "sa" which is database admin.
I placed a bat file called "test1.bat" in the directory c:\test3, the file "test1.bat" contains the following content:

sqlcmd -b -e -Q "ALTER INDEX ALL ON [JOHNDATABASE].dbo.TABLE2 REBUILD"

In the dos-prompt, I can run the "test1.bat" batch file with no errors.
It gives me the following output:
c:\test3\sqlcmd -b -e -Q "ALTER INDEX ALL ON [JOHNDATABASE].dbo.TABLE2 REBUILD"
ALTER INDEX ALL ON [JOHNDATABASE].dbo.TABLE2 REBUILD

Using "Sql Server Agent", I created a new job called "Scripts1".
For the "General" link, I have the following values:
Name:test2
Owner:SA
Category:Database Maintenance

For the step link, I have the following values:
Step Name:test2
Type:Operating system(CmdExec)
Run As:SQL Agent Service Account
Command:
sqlcmd -b -e -Q "ALTER INDEX ALL ON [JOHNDATABASE]

Sql Server Agent failed to executed a scheduled bat file that contains sqlcmd command

  

Hi All:

I am currently using Windows 2003 R2, Standard Edition.
I have Microsoft Sql Server 2005 Installed with the latest service pack which is sp3.
I logged into the operating system as an administrator. The windows administrator id is "test2".
I logged into the Microsoft Sql Server 2005 database using "Microsoft Sql Server Management Studio" as an "sa" which is database admin.
I placed a bat file called "test1.bat" in the directory c:\test3, the file "test1.bat" contains the following content:

sqlcmd -b -e -Q "ALTER INDEX ALL ON [JOHNDATABASE].dbo.TABLE2 REBUILD"

In the dos-prompt, I can run the "test1.bat" batch file with no errors.
It gives me the following output:
c:\test3\sqlcmd -b -e -Q "ALTER INDEX ALL ON [JOHNDATABASE].dbo.TABLE2 REBUILD"
ALTER INDEX ALL ON [JOHNDATABASE].dbo.TABLE2 REBUILD

Using "Sql Server Agent", I created a new job called "Scripts1".
For the "General" link, I have the following values:
Name:test2
Owner:SA
Category:Database Maintenance

For the step link, I have the following values:
Step Name:test2
Type:Operating system(CmdExec)
Run As:SQL Agent Service Account
Command:
sqlcmd -b -e -Q "ALTER INDEX ALL ON [JOHNDATABASE]

The My Site of [user name] is scheduled for deletion

  

Hey Guys,

some of my users are getting the following email:

----- Original Message -----

From: SharePoint

To: user

Sent: Sun Oct 10 15:16:26 2010

Subject: The My Site of (username) is scheduled for deletion

 

The My Site of user is scheduled for deletion in 3 days. As their manager you are now the temporary owner of their site. This temporary ownership gives you access to the site to copy any business-related information you might need. To access the site use this URL: http://moss/my/personal/user

Now the issue is, that user has not been deleted, so there is no reason for their site to be deleted. 

any ideas how to disable this?

 

Thanks,

Tony


WCF client as a windows service or scheduled task

  

Hi,

I am consuming a web service in a WCF Client app and subsequently update my DB with the latest updates. The WCF is configured using basicHttpBinding, securityMode of TransportCredentialOnly, and clientCredentialType of Windows.  My timeouts (Close, Open, Receive, Send) are all set to 10 minutes.  I am using a Sql Server Agent Proxy with the correct Domain account (actually the same account that is logged into the server itself) given the SSIS Package Execution subsystem and said Proxy is being used for the 'Run as' in the package Step.  The account is a local Administrator AND a sysadmin.

I want to host this WCF app as a Windows service or a scheduled task. I want to know if I can do this and if so, how to accomplish? This service handles minimum of 100 records to max of 100,000 records. The task needs to be automated and scheduled. Appreciate any inputs.

Thank you


DKoushik

How can we reindex single table in s sql server 2008?

  

Hi,

I have a requirment truncate and reindex the single table,how can we reindex a table?

If we truncate the table,is it necessary to reindex the table(if busines needs).

What is the code for reindex the table in sqlserver2008?

 

Thanks,

Naidu.


SQL 2005 can't defrag a database

  

Hi,

I'm running SQL Server 2005 and when I run defrag.exe I find that my main database file has well over 1000 fragmentations in a 37GB file.  I've tried running defrag but it always reports back that it cannot defrag the file.  There is about 54% free space on the drive and I stopped all SQL services before trying to defrag but no luck.

Any suggestions on how to defrag this file?

One thing I did think of and tried on a test database was to backup the database, detach it, delete the files and then do a restore of the database.  That seems to have worked but I haven't fully tested the database after restore.  Does this approach make sense or is there some risk I haven't thought of?  It sure seems faster than doing a defrag and it does test my disaster recovery abilities.

Thanks in advance,

Linn


How to be emailed about Scheduled end date on a document list item

  
I have configured a sharepoint document library to allow users to use scheduling and so it can be published and un-published on a given date. I need users to be able to set an alert to be informed about when scheduled end dates are reached. I tried using the out of the box alerts but this does not seem to be triggered. Can anyone suggest the best approach?

DB reorg? vs Index Defrag

  

Hi,

Is there such a thing as a db reorg for sql server?  I know there is an index reorg and index defrag.  Has anyone ever heard of this and or how it is done?  Someone in my group said they thought it was possible and should be done semiannually but didnt know the details on how to do it  I have never come across any info on it and I researched it. i do know this is done for oracle though.

Thanks


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend