Ideando

agosto 4, 2007

Como ejecutar un comando msdos desde SQL

Filed under: programacion, sql, T-SQL — mrodriguez @ 5:52 pm

Existe un store procedure con el que se puede ejecutar una instrucción msdos desde sql. Se hace de esta forma:

exec master.dbo.xp_cmdshell ‘dir c:\ /b’

Esto nos entregará en forma de tabla el listado de la unidad c:\
De esta forma podríamos accesar archivos de un directorio y procesarlos de alguna forma en un store procedure:

set @query =’master.dbo.xp_cmdshell «dir c:\Directorio\ /b»‘
insert #x exec (@query)

Mas información útil en: http://www.insesys.com.mx

10 comentarios »

  1. hello there and thank you for your info – I have definitely picked
    up anything new from right here. I did however expertise some technical points using this website, since I experienced to reload the
    web site lots of times previous to I could get it to load properly.
    I had been wondering if your web hosting is OK?

    Not that I am complaining, but slow loading instances times
    will very frequently affect your placement in google and can damage your high quality score if ads and marketing
    with Adwords. Anyway I am adding this RSS to my email and could look out for much more of your respective fascinating content.
    Make sure you update this again very soon.

    Comentarios por free 12 month love tarot reading — diciembre 6, 2012 @ 5:52 pm

  2. I like the helpful information you provide in your articles.

    I will bookmark your weblog and check again here regularly.
    I’m quite certain I will learn lots of new stuff right here! Good luck for the next!

    Comentarios por As seen On tv magic mesh screen door — diciembre 15, 2012 @ 3:13 pm

  3. Whatever we have that isn’t broken goes up there. This may even require that you offer someone a place to sleep or a cab ride home. Three, have some fun while searching.

    Comentarios por Valerie — diciembre 24, 2012 @ 9:12 pm

  4. I have read so many content concerning the blogger lovers but this paragraph is in fact a pleasant article, keep it up.

    Comentarios por Laurene — abril 17, 2013 @ 7:41 am

  5. It also allows you to capture & store videos while you are out
    for a tour or picnic with friends. There are many new applications available for you to download within the market.

    Some manufacturers call their product a Cover while
    others use the name Case.

    Comentarios por star trek voyager — abril 20, 2013 @ 10:32 am

  6. For newest information you have to pay a quick visit world-wide-web and on web I found this web site
    as a most excellent site for latest updates.

    Comentarios por dallas texas auto insurance — abril 24, 2013 @ 4:55 am

  7. This slim and light tablet comes with specifications that provides high
    computing power. The built quality on the XPS is also a solid one with aluminum carbon chassis, giving it a sturdy, premium
    look. Aided by the Pills rapidly getting best tablet pc all of the direct
    device when using the iphone, it is really distinct that we should expect to witness it develop worldwide recognition for
    countless years.

    Comentarios por aberdeen — May 9, 2013 @ 10:59 am

  8. resume writing about yourself

    Como ejecutar un comando msdos desde SQL | Ideando

    Trackback por resume writing about yourself — octubre 30, 2014 @ 7:41 pm

  9. {repossession software|towing software|recovery software|auto repair software|auto repo software|vehicle repossession software|repossession software company|vehicle repo software|repo software company|auto repossession|vehicle repossession|vehicle re…

    Como ejecutar un comando msdos desde SQL | Ideando

    Trackback por {repossession software|towing software|recovery software|auto repair software|auto repo software|vehicle repossession software|repossession software company|vehicle repo software|repo software company|auto repossession|vehicle repossession|vehicle reposse — marzo 24, 2015 @ 3:47 am


RSS feed for comments on this post. TrackBack URI

Replica a star trek voyager Cancelar la respuesta

Crea un blog o un sitio web gratuitos con WordPress.com.