Forum Replies Created

Viewing 15 posts - 2,116 through 2,130 (of 13,469 total)

  • RE: Check if database exist

    dynamic sql to create the database? that won't fix any warnign where you have a USE [NewDB] that doesn't exist at parse time, i think:

    if NOT EXISTS(SELECT * FROM...

  • RE: sp_who2 shows wrong value of hostname and login for a spid

    I know you explicitly said same server, but that's too weird.

    so theres no chance you are in a multi server environment, and the window you look at is test/development, but...

  • RE: USE MDX Query without using Linked Server- OpenQuery

    my first google for "linked server analysis servers" looked good to me,: they both showed examples of crating the linked server and the open query command as well.

    select * from...

  • RE: BCP in tab separated file to a table

    this is what they call a "ragged right" file format, and bcp and bulk insert cannot handle that;

    see this post for an example of how to do it, but the...

  • RE: how to answer interview question "what is the hardest sproc you have created?"

    Jeff Moden (1/8/2015)


    Now, based on what I just said, one of my first questions on an SQL Server technical interview for DBAs and Developers alike is "How do you get...

  • RE: Easy script help (I think!?)

    jrodriguez 62807 (1/7/2015)


    I am somewhat new and for that please forgive me but I need to create this script and it is driving me crazy that I can't figure it...

  • RE: how to answer interview question "what is the hardest sproc you have created?"

    it's a question to make you actually talk about details and solving difficult processes, so they can get some insight into how you solve problems.

    it's not a real, qualitative question...

  • RE: 'modify' stored procedure opens does not open for modifications as earlier

    i bleieve you recently modified this location in SSMS, which decides whether something is scripted with a if not exists selection:

    it may have been modified as a patch or something,...

  • RE: Filewatcher task to wait until specific files are modified?

    15 filewatchers, That's what i was originally thought i might have to do, and then i thought a script task that uses some code, that institutes a filewatcher would be...

  • RE: How to see currently executing store procedure execution plan?

    isn't it true that only procedures that have been called would have a cache in place?

    so if it's not in cache, it's either been aged out, or never called,...

  • RE: Restrict access to Database

    i think it's application name and hostname(workstationID) that can be spoofed. username , not a login, bu if your priviledges were high enough you can start using execute as...

  • RE: How to capture subfolders' path as variable and import them into database

    if you include System.IO, you can use the FileInfo object:

    --this is vb.Net code

    Dim MyFileInfo...

  • RE: How to see currently executing store procedure execution plan?

    a quick follow up:

    when you run the command above , you get results like this:

    you cna see any of the blue links or the plan itself becomes clickable.....

    one of...

  • RE: How to see currently executing store procedure execution plan?

    yes you can..

    there is some really nice optional features for the procedure.

    try running it with these flags:

    EXEC sp_whoisactive @get_outer_command = 1,@get_plans=1,@get_full_inner_text=1

    here's the list of parameters(sp_help sp_whoisactive)

    Parameter_nameTypeLengthPrecScaleParam_orderCollation

    @filtersysname256128NULL1SQL_Latin1_General_CP1_CI_AS

    @filter_typevarchar1010NULL2SQL_Latin1_General_CP1_CI_AS

    @not_filtersysname256128NULL3SQL_Latin1_General_CP1_CI_AS

    @not_filter_typevarchar1010NULL4SQL_Latin1_General_CP1_CI_AS

    @show_own_spidbit11NULL5NULL

    @show_system_spidsbit11NULL6NULL

    @show_sleeping_spidstinyint1307NULL

    @get_full_inner_textbit11NULL8NULL

    @get_planstinyint1309NULL

    @get_outer_commandbit11NULL10NULL

    @get_transaction_infobit11NULL11NULL

    @get_task_infotinyint13012NULL

    @get_locksbit11NULL13NULL

    @get_avg_timebit11NULL14NULL

    @get_additional_infobit11NULL15NULL

    @find_block_leadersbit11NULL16NULL

    @delta_intervaltinyint13017NULL

    @output_column_listvarchar80008000NULL18SQL_Latin1_General_CP1_CI_AS

    @sort_ordervarchar500500NULL19SQL_Latin1_General_CP1_CI_AS

    @format_outputtinyint13020NULL

    @destination_tablevarchar40004000NULL21SQL_Latin1_General_CP1_CI_AS

    @return_schemabit11NULL22NULL

    @schemavarchar-10NULL23SQL_Latin1_General_CP1_CI_AS

    @helpbit11NULL24NULL

  • RE: Validating T-SQL

    yep a rough example: set parseonly makes sure it's syntactically correct, but doesn't check for object existance:

    DECLARE @code varchar(max) = 'SELECT * FROM syys.tables';

    EXEC ('SET NOCOUNT ON;SET PARSEONLY ON;'+ @code)

    EXEC(@code)--Error...

Viewing 15 posts - 2,116 through 2,130 (of 13,469 total)