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

Anuncios

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.

    Comentario 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!

    Comentario 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.

    Comentario 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.

    Comentario 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.

    Comentario 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.

    Comentario 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.

    Comentario por aberdeen — mayo 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

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

Blog de WordPress.com.

A %d blogueros les gusta esto: