Forum Replies Created

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

  • RE: Monitor database size with dbcc showfilestats

    If your are NOT using a sysadmin login, wich permissions do you need to run DBCC showfilestats?

  • RE: Concurrent Administration

    I tried and it worked. I started first the backup an then started te shrink operation and all went well.

  • RE: T-SQL

    UMG Developer (1/5/2011)


    Alberto IT (1/5/2011)


    To complicated. Yo can solve it using CHARINDEX:

    As long as you don't mind incorrect results:

    DECLARE @inputValue NVARCHAR(20)

    DECLARE @student TABLE

    (Id INT PRIMARY KEY IDENTITY(1,1),

    StudentName NVARCHAR(50),

    StudentResult INT)

    INSERT INTO...

  • RE: T-SQL

    To complicated. Yo can solve it using CHARINDEX:

    DECLARE @inputValue NVARCHAR(20)

    DECLARE @student TABLE

    (Id INT PRIMARY KEY IDENTITY(1,1),

    StudentName NVARCHAR(50),

    StudentResult INT)

    INSERT INTO @student

    VALUES( 'Hardy', 100), ('Rocky', 98), ('Panky', 99)

    --Select 1

    SET @inputValue = 'Hardy'

    SELECT...

  • RE: Powershell Database Backup Script

    Please explain me about the variable $location. It is used in the line $webclient.UploadFile($uri, $location) to send the file to a FTP server, but $location is never initialized nor populated.

    Alberto

    ------

  • RE: Your Point of View

    My wife should read this! about the black and white thing and getting more tolerant. Shame she doesn't read English (I'm in Peru). But I will make time to translate...

  • RE: Transaction Log Growth, do you need it?

    I'm Triyng to autogrowth a log file. A created a DB witn one table with a couple of char 8000 fields, inserted many, many rows. But the Registry never gets...

  • RE: From a flat File into a Proc as Table-Valued Param. Getting error.

    To use TVP in SQL 2008 you first need to create a UDT based on the data type Table. I'm not sure if what youre trying to do is possible.

    Here's...

  • RE: Test your problem solving skills!

    I ended up with a mixed solution. I find it simple compared with those you proposed:

    Declare @Path varchar(256)

    declare @myquery varchar(1000)

    Set @Path = 'C:\Archivos de programa\Microsoft SQL Server\MSSQL.1\MSSQL\Data\'

    set @myquery = 'dir...

  • RE: SQL Server Features

    well, this time is a poll. Please tell me if I'm doin'g wrong

  • RE: write query from databases on 2 different servers

    You have two servers, local and remote. The remote server (or instance) must be a linked server:

    From the current server write this:

    SELECT a.Filed1, b.Field2

    FROM LocalTable a

    JOIN LinkedServer.OneDB.dbo.RemoteTable b

    ...

  • RE: Move table from one filegroup to another filegroup

    ah! I forgot to say that the scripts work for SQL 2005/2008

  • RE: Move table from one filegroup to another filegroup

    Here you have a couple of scripts that show you where are the objects:

    TABLES:

    SELECT

    t.name AS [Table],

    s.name AS [Schema],

    ds.name AS [FileGroup]

    FROM

    sys.tables AS t

    INNER JOIN sys.schemas AS s ON s.schema_id = t.schema_id

    INNER...

  • RE: Retrieving detaset from one stored procedure into another

    Great trick that one with OPENROWSET. Very useful. I used to crete a temp table an then populated it with the result of a the system sp, but with this...

  • RE: Move table from one filegroup to another filegroup

    This is the one, promise. Sorry for the inconvenience

    SET XACT_ABORT ON

    BEGIN TRY

    BEGIN TRAN

    CREATE CLUSTERED INDEX ix_TableA_Transfer ON tableA (id) ON [OtherFileGroup]

    COMMIT

    END TRY

    BEGIN CATCH

    ROLLBACK

    END CATCH

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