Forum Replies Created

Viewing 15 posts - 2,101 through 2,115 (of 5,394 total)

  • RE: How to prevent user login to SQL Management Studio ?

    I did a similar thing some years ago.

    Here's the code:

    CREATE TRIGGER [TR_LOGON_APP]

    ON ALL SERVER

    FOR LOGON

    AS

    BEGIN

    DECLARE @program_name nvarchar(128)

    DECLARE @host_name nvarchar(128)

    SELECT @program_name = program_name,

    @host_name = host_name

    FROM sys.dm_exec_sessions AS c

    WHERE c.session_id...

  • RE: Adding Data from Excel file to SQL server

    aseel.pa (1/16/2012)


    Can you please tell me how will i take the reports after all these?

    Many thanks for your support.

    Reports? Which reports? Can you clarify please?

  • RE: T-Log Backup Rolling Back

    Depends on the edition you are running. Enterprise edition has a feature called "fast recovery", that other editions don't have.

    In normal recovery, the database becomes available when the recovery process...

  • RE: Extracting parts of text from a varchar column

    PATINDEX should do the trick:

    DECLARE @SampleData TABLE (

    data nvarchar(max)

    )

    INSERT INTO @SampleData VALUES (N'<Booking Reference="XXXXX"> <Purchases> <Train Reference="00000000"> <Travellers> <Adult> <Title>Mr.</Title> <FirstName>Test</FirstName> <LastName>Testington</LastName> </Adult> </Travellers> <Outbound> <RailLeg OriginStation="MANCHESTER OXFORD ROAD" DepartDateTime="2011-11-25T07:15:00"...

  • RE: Force Job as Successful

    Paul Bukowski (1/15/2012)


    For now, I manually create a new dummy step (last step) in the job, like say select getdate() and then execute that step, which will force the job...

  • RE: Effectiveness of Resource Governor in a VM Environment

    Welsh Corgi (1/15/2012)


    Does anyone used the Resource Governor in a VM Environment?

    Currently looking at multiple instances of SQL Server?

    What is your concern exactly?

  • RE: Adding Data from Excel file to SQL server

    aseel.pa (1/16/2012)


    Is it possible to Add / Edit / Delete operations from this tool? or do i need to write any programs for this?

    Thanks,

    Sure. You can do most of the...

  • RE: Joins

    Please post table scripts (CREATE TABLE statements) for all tables / views in your query.

    Make sure to provide some sample data and describe the expected output based on your sample...

  • RE: Adding Data from Excel file to SQL server

    SSIS seems to me the best tool for this task.

    You can set it up easily with the Import/export wizard (right click the database node in SSMS and select tasks, import...

  • RE: How to keep a plan in cache

    GilaMonster (1/13/2012)


    The optimiser's not allowed to take that log to optimise queries (about 20 sec is the longest I've heard of and that was view upon view upon view...

  • RE: Are the posted questions getting worse?

    GSquared (1/13/2012)


    Does that clarify why I consider it a mildly bad idea?

    My CS teachers at university would have considered it a very bad idea and I would never have passed...

  • RE: Tail Log Backups

    No, in fact it's not a trick question at all, when you know the answer. 🙂

    Believe it or not, I never had to take a tail log backup in ten...

  • RE: Tail Log Backups

    JAZZ Master (1/13/2012)


    Went with the standard, nothing is "always" until proven otherwise.

    I could smell the trick from miles, but I clicked on "Yes" to prove myself I'm just a paranoid....

  • RE: comparsion of users between two servers

    Maybe not, but you could always do it the other way round.

  • RE: CDO vs Database Mail

    DBMail IMHO is a far better option.

    CDO needs enabling OLE automation, which is not a good idea if you wanto to keep your surface as little as possible.

    DBMail works good...

Viewing 15 posts - 2,101 through 2,115 (of 5,394 total)