Forum Replies Created

Viewing 15 posts - 166 through 180 (of 254 total)

  • RE: A transport-level error

    John and SQL Noob: No, SQL Server has not been stopped and started. In order to check whether server has been rebooted or not, I usually run query  select login_time...

  • RE: How SQL Server Chooses the Type of Join

    If sp_recompile is placed inside of stored procedure it will actually recompile the next time it runs. From here, for the current execution it uses the plan compiled at previous...

  • RE: Job history problems

    Hmmm.... I don't have anything like "EXECUTE msdb.dbo.sp_sqlagent_log_jobhistory..." in my profiler trace.

    I tried to resart SQL Agent, but the problem is still the same. I also checked SQL Server log,...

  • RE: Job history problems

    OK, I setup Profiler with output to a table. I ran this query against that table:

    select top 50 EventClass, TextData=substring(TextData,1,50), ApplicationName

    from monitor

    where ApplicationName like 'sqlagent%'

    and starttime >'2007-05-02 16:32:00.000'

    order by...

  • RE: Job history problems

    What filter should I apply ? An how about  select * from sysjobhistory ?

    It was just one job running on this server, but now I created another one running every minute,...

  • RE: Imports

    If you are using bcp or bulk load, choose fixed length format and use formating file, or you can bcp it in a buffer table with just one column varchar(max),...

  • RE: using sys.dm_exec_sessions , where to find database name/id

    Correction: you should use db_name(dbid), not object_name

  • RE: Select the most recent date for each item

    Try this:

    select

        t.item_code,

        t.qty_onhand,

        t.date_rcvd

    from my_table t

    join

        (

        select

            item_code,

            max_date_rcvd = max(date_rcvd)

        from my_table

        group by item_code

        ) m

        on t.item_code = m.item_code

        and t.date_rcvd =...

  • RE: Server name

    Camilo is right. That seems to work fine in your situation because you apparently don't have any linked servers.

    Generally, you have to add

    Where server_id = 0

    But in...

  • RE: 1/1/1900

    1. You have to build a cursor or a While loop to list all columns in a given table having data type char, varchar, datetime or smalldatetime, like

    select

    name

    from sys.columns .......

  • RE: Need to load file from and manipulate with Unix

    In my situation, the process must be synchronous, and it must be controlled from the SQL Server side. After 1st table is loaded SQL Server must send a command to...

  • RE: What do your developers use ?

    Hi Gift,

    I am sorry, but I am not getting to your points either.

  • RE: Frozen SSMS

    Should I connect to SS config manager in my local machine or at actual server machine via RDC ?

    Because what I see on my local machine SS conf mgr is...

  • RE: where is the information about Primary Key of a Table?

    select

        table_name = object_name(parent_object_id),

        PK_name = name

    from sys.objects

    where type='PK'

  • RE: Start up service based on SQL

    You can use system procedure sp_procoption (@sp_name)

    where @sp_name is stored procedure name that server will start right after the reboot. You can put your xp_cmdshell commend in that stored procedure.

     

Viewing 15 posts - 166 through 180 (of 254 total)