Mssql New Shell

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DevilsFish
    New Member
    • May 2007
    • 6

    Mssql New Shell

    I've heared that "return @result" is a bad idea (in sqlbrower) if i want to use sqlexec for my own created shell.
    http://www.motobit.com/tips/detpg_cmdshell/

    How is the command for sqlbrower (BULK INSERT) that "after" i can continue use sqlexec?

    If you dont make it public, please send me a private message (PM).

    Sorry, my english ist not so good.
  • DevilsFish
    New Member
    • May 2007
    • 6

    #2
    No idea? :-(
    It's very important!

    Comment

    • Motoma
      Recognized Expert Specialist
      • Jan 2007
      • 3236

      #3
      I am not entirely sure what you are asking, please could you reiterate what you are attempting to accomplish, and post a simple test case?

      Comment

      • DevilsFish
        New Member
        • May 2007
        • 6

        #4
        I would like to try to explain it.

        My MSSQL-Server is secured, so that the shell of SqlExec give a sql_error if one command (example dir c:\) has given.
        It's ok!!!!

        But i want to create a new Shell over SqlBrower so i can continue with (use) SqlExec and become no sql_error (with this new custom_shell).
        SqlExec used the standard cmd_shell!

        The Link show the command for a new custom_shell, but it dont work and i cant continue with SqlExec.
        The command (show Link) works, but i cant used continue SqlExec because of the sql_error.
        That i can continue (use) SqlExec the command must include the BULK INSERT command (i've heard).

        How is the completely command (include new custom_Shell and Bulk Insert) so i can continue??

        I hope you understand?

        Thanks for (fast) help. ;-)

        Comment

        • DevilsFish
          New Member
          • May 2007
          • 6

          #5
          Anybody there knows what i want?

          It's very important!

          Falls mein englisch zu schlecht ist, kann ich es auch auf deutsch schreiben. ;-)
          If my english is to bad i can write it in german.

          Comment

          • iburyak
            Recognized Expert Top Contributor
            • Nov 2006
            • 1016

            #6
            It is hard to figure out what are you asking for.... :(

            Here it is an examle how I use BULK INSERT from file.

            1. Create some table on SQL Server.

            [PHP]
            CREATE TABLE SomeTable (Results varchar(1000) null) [/PHP]

            2. Execute BULK INSERT
            [PHP]
            BULK INSERT YourDatabase.db o.[SomeTable]
            FROM 'd:\yourfile.tx t'[/PHP]

            It would probably help if you'll show your code and where you having an error.


            Good Luck.

            Comment

            • iburyak
              Recognized Expert Top Contributor
              • Nov 2006
              • 1016

              #7
              By the way to execute Shell command on a server you need special rights and if you don't have them you would not be able to do it.
              I think this is your problem. Talk to your DBA (database administrator) on this issue and he will explain that there is no work around it unless he will grant you specific rights.

              Thank you.

              Comment

              • DevilsFish
                New Member
                • May 2007
                • 6

                #8
                Please read all my Postings one more time. ;-)

                Our MSSQL-Server is secured, nobody can use the standard xp_cmdshell over Sqlexec, if anybody use a command with that tool and standard xp_cmdshell he get an sql_error.

                So we need a custom xp_cmdshell (example named new_cmdshell) that we can use continue over Sqlexec.
                Using Sqlbrower to create a new custom xp_cmdshell its ok, but the code is bad (see first posting).
                So the code must include the BULK INSERT command, they we need.

                I hope you understand?!

                Comment

                • DevilsFish
                  New Member
                  • May 2007
                  • 6

                  #9
                  The Problem still exists!

                  Comment

                  Working...