Forum Replies Created

Viewing 15 posts - 1 through 15 (of 46 total)

  • RE: IDENTITY value becoming too big

    You can use DBCC CHECKINDENT to reseed identity value.

    DBCC CHECKIDENT ('Production.Product' , RESEED, 1001)

  • RE: SSMS Startup

    You can use start-up parameter -S <ServerName> to connect to a server.

    You can find more information in this post:

    http://sqlandme.com/2011/04/18/management-studio-startup-parameters-tips-tricks/[/url]

  • RE: Using checksum in backup

    bull49er (11/7/2011)


    Vishal Gajjar

    Thank you very much for quick response. Where is this column? Thanks

    In the output of RESTORE HEADERONLY command

  • RE: Using checksum in backup

    hmm.. never noticed that... 🙂

    You can use RESTORE HEADERONLY to check if the backup contains CHECKSUM:

    RESTORE HEADERONLY

    FROM DISK = N'C:\Database\Backup\WithChecksum.bak'

    look for column "HasBackupChecksums".

  • RE: Passing a variable to sp_MSForeachdb

    Try this:

    DECLARE @sqlCommand VARCHAR(2000)

    declare @db_type as varchar(10)

    set @db_type = '%_lts%'

    SET @sqlCommand =

    '

    USE [?]

    PRINT ''?''

    IF ''?'' like ''' + @db_type

    +

    '''

    BEGIN

    DECLARE @sql VARCHAR(1000)

    SELECT @sql = ''DROP SCHEMA '' + name FROM sys.schemas

    WHERE...

  • RE: Passing a variable to sp_MSForeachdb

    EXEC master..sp_MSForeachdb '

    declare @db_type as varchar(10)

    set @db_type = ''%_lts%''

    USE [?]

    IF ''?'' like '@db_type'

    BEGIN

    declare @sql as varchar(1000)

    select @sql = ''drop schema '' + name from sys.schemas

    where name not in(''dbo'',''guest'',''INFORMATION_SCHEMA'',''sys''

    ,''db_owner'',''db_accessadmin'',''db_securityadmin'',''db_ddladmin'',''db_backupoperator''

    ,''db_datareader'',''db_datawriter'',''db_denydatareader'',''db_denydatawriter'')

    exec (@sql)...

  • RE: How to know the Partion Scheme used from a TableName

    select 'scheme' = a.name,

    'function' = b.name

    from sys.indexes i

    inner join sys.partition_schemes a on a.data_space_id = i.data_space_id

    inner join sys.partition_functions b on a.function_id = b.function_id

    where i.object_id = object_id('dbo.Table_Orders')

  • RE: Stored Procs vs Ad Hoc

    Adhoc queries need to be exactly same for reuse. i.e. case-sensitivity, white spaces, etc...

    Generally, When a statement is used inside a stored procedure, it's not going to change and it...

  • RE: Boot Page Corruption

    Hi Sudhakar,

    If boot page is corrupt, you cannot run DBCC CHECKDB or go to EMERGENCY mode.

    You need to restore from a backup.

    Check this post by Paul : http://www.sqlskills.com/blogs/paul/post/Search-Engine-QA-20-Boot-pages-and-boot-page-corruption.aspx

  • RE: SQL Server 2008 R2 Service Pack 2

    Ninja's_RGR'us (10/20/2011)


    derekr 43208 (10/20/2011)


    Didnt have time to check the blog

    Any issues with Sp3?

    Yes, SP4 not out yet :hehe:

    Officially named SQL Server 2012, scheduled to release in first half of 2012.

  • RE: SQL Server 2008 R2 Service Pack 2

    Yes SP3 released, and I posted it on my blog to...... :blink:

  • RE: SQL Server 2008 R2 Service Pack 2

    SP1 is the latest service pack for SQL Server 2008 R2.

    SP2 is released for SQL Server 2008 (not R2).

  • RE: Disaster Recovery

    These type of questions are easier to answer as Enterprise edition (and his dad) has all the features!

  • RE: Auto Page Recovery with DB Mirroring

    I seriously need to pay attention to "can" and can't"....... :crazy:

  • RE: Unable to run Batch file though T-SQL (Xp_cmdshell)

    it could be a PATH issue..

    try running 'sftp2' using xp_cmdshell.

    make sure location of sftp2 is in PATH when the batch file is executing..

Viewing 15 posts - 1 through 15 (of 46 total)