Forum Replies Created

Viewing 15 posts - 5,311 through 5,325 (of 6,679 total)

  • RE: List tables on a linked server

    This is really going to depend upon the server that you are linked to. If that server is SQL Server 2005 or 2008, you could use the following:

    SELECT {columns}

    ...

  • RE: How can I shrink the reservedSize of a table for SQL Server 2005

    You can try rebuilding the indexes:

    ALTER INDEX ALL ON yourtable REBUILD;

    If that doesn't work, verify that you have a clustered index on the table. If you don't have a...

  • RE: Issue with Page Torn / Bad Page ID

    Reviewing this article http://support.microsoft.com/kb/828339 tells us that we may not see errors using CHECKDB for an intermittent hardware problem.

    Since you are getting these on a regular basis - you are...

  • RE: Recovering space within a system table

    David, I wouldn't think so either - but, it really depends on how large the stored procedures were. They are looking at 8000 procedures that were removed, which could...

  • RE: Newbie question for small query

    moramoga (4/21/2009)


    Hi again, I did some test to check and this are my results:

    1. I deleted all software, hardware, material and travel records.

    2. I inserted 1000$ for project TEST in...

  • RE: Date change

    You will need to use dynamic SQL:

    Use Apr09;

    Declare @bulk_cmd varchar(1000);

    Set @bulk_cmd = 'BULK INSERT Ramses

    FROM ''G:\Ramses Logs\''' + CONVERT(VARCHAR,GETDATE(),112) + '-Ramsesapp.csv''

    WITH

    (

    FIELDTERMINATOR = ''',''',

    ROWTERMINATOR = '''')'

    Execute(@bulk_cmd);

    Make sure you match up the...

  • RE: Update table using procedure - Help

    It really is not clear what you are trying to do. Please review the article I link to in my signature and post some samples that we can work...

  • RE: insert statement using linked server. @@Identity and others

    Also - you really should not be using the return value from a stored procedure for anything other than the status. I would recommend using an output parameter for...

  • RE: Date time by hour

    What have you tried so far?

  • RE: Recovering space within a system table

    David O (4/21/2009)


    Hmmm, I must have mis-interpeted this post. Space isn't allocated to tables in Sql Server it is allocated to the database. If you deleted...

  • RE: SQL Agent Job Suspends

    Is this a stored procedure - and does the stored procedure use parameters? Do you create variables and use the variables in the queries for this procedure?

    Just thinking this...

  • RE: Recovering space within a system table

    Right - I was not recommending shrinking the database. Only, if absolutely required - because you are never going to grow the datafile again, ever - then you can...

  • RE: Can 2000 driver be used to connect to 2005?

    Cat (4/21/2009)


    I don't exactly understand. Perhaps I was not clear.

    Windows XP on client machines comes with SQL Server ODBC Driver for 2000.

    Soon clients will have to connect...

  • RE: Recovering space within a system table

    David O (4/21/2009)


    USE master

    go

    DBCC SHRINKDATABASE('your_database_name_here', NOTRUNCATE)

    go

    DBCC SHRINKDATABASE('your_database_name_here', TRUNCATEONLY)

    go

    This command will shrink the database and should be run off hours. As always when making a change to adatabase have a...

  • RE: Converting VBA iif statements to T-SQL

    Bob has outlined one of the ways you can approach this, however - that solution won't utilize any indexes on the date columns if they exist. If all you...

Viewing 15 posts - 5,311 through 5,325 (of 6,679 total)