Forum Replies Created

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

  • RE: SQL DB slow after restore

    Does hardware performance of the machine are the same?

    make rebild indexes and update statistics

  • RE: Query modification

    try using exec master.dbo.xp_fixeddrives,

    when you get all disk on given server, you can use sp_OAGetProperty for get TotalSize and FreeSpace.

    @tSize = sp_OAGetProperty @disc,'TotalSize', @resTS output

    @fSize...

  • RE: SQL SERVER AGENT I SNOT RUNNING....

    log in with your Administrator,

    that is user specified when you installed sql server.

    If you forgot the pass and user name then read about recovery SA password

  • RE: search string that does not contain a string

    try this

    declare @test-2 varchar(1000)

    declare @rez int

    set @test-2 = 'alksjdfhkalsdhf update a;slkfjdlakjsdf where sadlkfjak!sdlfj people_table asdjfadsf'

    if ( charindex('update',substring( @test-2, 0, charindex('where',@test,0) ))...

  • RE: Linked Server: Trusted SQL server Error

    did you check status of SA user on linked server?

  • RE: getting mismatched data instead of having same data

    everything is float representation

    if you won't be able to change definition of table

    just change query

    select A.ID, B.ID, A.Value, B.Value

    FROM #TestAA A

    INNER JOIN #TestBB B ON A.ID = B.ID

    WHERE cast(...

  • RE: Sum a float column in SQL

    i would mention something here,

    be cautious when you work with real number, because there is a little bit difference in result when you sum float, decimal or money data type.

    In...

  • RE: Database mail alert fails for group account

    check this sql statement.

    select * from sysmail_mailitems

    go

    select * from sysmail_log

    go

    select * from sysmail_sentitems

    go

    select * from sysmail_allitems

    go

    select * from sysmail_event_log

    if there isn't any problem, maybe there is problem with group...

  • RE: Creating table from a Query results

    hoseam (2/6/2014)


    I want to create a new table with the about of that query, that output has to be my columns

    maybe

    select NOTE_ID, NOTE_DESCRIPTION, NOTE_TEXT, NOTE_STATUS, NOTE_STARTDATE

    , NOTE_ENDDATE, NOTE_AUTHOR, NOTE_LASTUPDATE...

  • RE: OS Disk Capacity Information

    there also be security concern for using CLR. You enable access to the .NET framework.

    In that case you provides too many things and mechanisms on the system than sql by...

  • RE: OS Disk Capacity Information

    first execute this

    exec sp_configure 'Ole Automation Procedures', 1; reconfigure with override;

    then USED THIS CODE

    declare @ipServer varchar(20) ='10.1.1.95'

    if exists (select name FROM tempdb..sysobjects where name = '#disks')...

  • RE: SQL JOB takes too much time to execute

    read something about parameter sniffing.

    put your code if its possible

  • RE: how to get 2 results of a procedure

    you can get table structure from procedure.

    use this to get column from SP table

    ;WITH SP AS (

    SELECT

    o.name AS proc_name, oo.name AS table_name, oo.id, ooo.name,

    ROW_NUMBER() OVER(partition by o.name,oo.name,oo.id,...

  • RE: Send sms from sql server

    sending sms is not a feautre of sql server.

    there are many opensource smpp client which is use for this purposes.

    read about smpp protocol

  • RE: Looping Comma separated string

    declare @input varchar(50)='100,200,300,400,500'

    select '1', q2.value from

    ( SELECT cast('<x>'+replace(@input,',','</x><x>')+'</x>' as xml) as txml ) q1 CROSS APPLY

    ( SELECT x.value('.','varchar(100)') as value FROM txml.nodes('x') as f(x) )q2

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