Forum Replies Created

Viewing 15 posts - 16 through 30 (of 254 total)

  • RE: Script out index automatically, drop and recreate it

    Since this is 2005 forum, I assumed you're asking for 2005. For 2000 it would much easier - it did not have covered indexes. You can go through this script...

  • RE: how to go to sql server2005 command prompt

    If you want to execute DOS commands from within SQL Server use this:

    execute master.dbo.xp_cmdshell ' '

    But xp_cmdshell must be enabled on the server level.

  • RE: T-SQL sql server 2005

    select * from employee

    where = @paramerter

  • RE: Log file size growth

    Your database is apparently in full recovery mode. Make frequent log backup, for example every 2 hours or so.

  • RE: Script out index automatically, drop and recreate it

    declare

    @schema sysname,

    @table sysname,

    @index sysname,

    @stmt varchar(max)

    declare indexes cursor

    for

    select

    s.name,

    t.name,

    i.name

    from

    ...

  • RE: Copy Loggins, jobs, store procedures

    Yulia, do you have Business Intelligence Development Studio in your SQL Server installation ?

    Do you have Visual Studio for same version as your SQL Server ?

  • RE: Shrink server

    If you do backup logs with truncate only, there is nothing to restore. Because you don't actually backup.

    But let me ask you another question: Is this production or development system...

  • RE: Remove Schema / Remove Database User

    you can run this:

    select

    s.name

    object_id,

    o.name,

    o.type

    from sys.sysobjects o join sys.schemas s

    on o.uid = s.schema_id

    where s.name =

  • RE: List of users accessing a databases

    Yes, you last_batch column.

    But sysprocesses keeps only currently connected users. If you want to trace a user which has disconnected already you will not find him here. In this case...

  • RE: Shrink server

    Luke clearly explained what I mean by off hours.

    I recommend DBCC shrinkfile over shrinkdatabase because you can do shrinking more granularly. As you have indicated above, you are runninng...

  • RE: Shrink server

    You can't shrink entire server all at once. You can shrink one database at a time (DBCC shrinkdatabase). But I would better recommend you one file at a time (DBCC...

  • RE: Procedure Cache

    If you execute your procedure for 3rd time and so on, does it keep inserting new row in object cache or reuses one of the existing ones? And which one...

  • RE: T-SQL Debugger?

    The only one way that works is to conver stored procedure into a script and use print commands everywhere you need to retrieve a value..

  • RE: How to stop a sql job after certain time of execution?

    Set another job which periodically will query sysjobs and sysjobhistory in msdb system database. You can check run_status, _time, _duration.

    To stop the job you can use sp_stop_job 'job_name'

  • RE: Need output of a job in comma-delimited format

    No, I don't have SSIS or SQLCMD for this. The job is much simpler. In the body of a step1 I have a Select statement, and in advanced section I...

Viewing 15 posts - 16 through 30 (of 254 total)