Forum Replies Created

Viewing 14 posts - 31 through 44 (of 44 total)

  • RE: SQL: BACKUPS::

    or another possible option is that the database is perhaps being restored by an automated process and then changed from simple to full recovery. Again check error logs and also...

  • RE: SQL: BACKUPS::

    Between the time it is working and the time it is breaking, there has to be some process that is causing the database to change recovery modes (or even possibly...

  • RE: Conversion failing

    So take the working sql you have and convert it in to dynamic passing in the column names. You may face trouble it the number of columns change though. It...

  • RE: Conversion failing

    Apologies. I was just querying the sys.databases table to demonstrate how you would call dynamic sql. Yours would be something more like...

    ALTER procedure [dbo].[totalinstallations]

    @importedquery nvarchar(1000),

    @coltotal nvarchar(1000)

    AS

    BEGIN

    EXEC ('

    SELECT '...

  • RE: Conversion failing

    Actually, you should be able to use isnumeric() function to get what you want to do....

    e.g.

    declare @test-2 table (col1 varchar(50))

    insert into @test-2 values...

  • RE: Conversion failing

    I guess you can go down the dynamic sql then

    e.g.

    declare @columnName varchar(128)

    set @columnName = 'name'

    exec ('select ' + @columnName + ' from sys.databases')

    As for your second question, yes there...

  • RE: Is security issue?

    Agreed with Sean. Backup and restore. You database name is order but that does not necessarily mean your datafile name is order.mdf. If you need to find out the name...

  • RE: link server not work for sql login with no sys admin permission

    The error that it gives you is correct. Lets say your report connects to the local database as reportuser1 on server1. In your linked server, on server1 which connects to...

  • RE: Conversion failing

    So there is your issue. In the stored procedure that gives you an error, you are trying to convert the text string 'installations' in to an integer which gives you...

  • RE: Conversion failing

    To make it simpler, your first query you are doing the same as

    select SUM( DISTINCT CAST('installations' AS int)) as Total

    It almost looks like by your question that you want...

  • RE: Conversion failing

    In your first example you are passing the text value of 'installations' in to your input parameter @coltotal and then trying to cast that to an integer which will fail...

  • RE: DTA Indexes and Statistics

    Ok it seems that these "hidden indexes" actually have is_hypothetical =1 from the dta run that was doen before my time. I need to look in to this more as...

  • RE: DTA Indexes and Statistics

    Ok so as I understand it, it is both an index and a statistic as they both exist in sys.indexes and sys.stats. My question now changes to, how come that...

  • RE: Pushing inserts into SQL server with C# ?

    Perhaps look in to doing a bulk insert call?

Viewing 14 posts - 31 through 44 (of 44 total)