SQL Server :: Open A Batch File In Sql Store Procedure?
Sep 29, 2010
I have to open a batch file automatically in sql. So i have used the below command.EXECUTE master.dbo.xp_cmdshell 'D:Databasesatch123.bat'Its worked for few times. After that its not working.One time i have stopped before the process is complete.May be this is the issue.Now its returns null value.
View 4 Replies
Similar Messages:
Jan 25, 2010
I have a text file (test.txt) which contains n number of data like:
1234778
4567444
8970451
1212455
testhsdd
weresdfy
.
.
.
etc
I need to fetch first 75 data or lines and insert in the sql table. Again next 75 data or lines and insert in the sql table. Again next 75 data or lines and insert in the sql table until it finish all.How i can do it in ASP.NET with C#
View 6 Replies
Mar 24, 2010
How to enable a batch file to create output file on the Server side?
View 1 Replies
Sep 4, 2010
I am creating an intranet application which runs a batch file and create an xml file as result. Which i am using for further processing. My problem is when i am running my application from local machine batch file is running fine and creating xml,but when i am running it through iis nohting is happening,
it meance process.start coudn't start command Prompt.
I am using following code. I have given all permission to iis.
Dim ProcessInfo As Diagnostics.ProcessStartInfo
ProcessInfo = New Diagnostics.ProcessStartInfo("cmd.exe", "/C " + Server.MapPath("~myScript.bat"))
Dim Process As New Diagnostics.Process
ProcessInfo.CreateNoWindow = False
ProcessInfo.UseShellExecute = False
[code]...
View 3 Replies
Sep 7, 2010
I have a asp.net web site, I would like a page on that site to be able to invoke a Windows Scheduled task or a batch file on a server different to the IIS server?
Is it possible?
View 2 Replies
Feb 4, 2010
I have a batch file on another server on a different domain or network that I need to run from an ASP page. I found a simple enough script that opens a CMD prompt, goes to the location of the batch and runs it. If everything is on the same machine, it runs fine.
The issue I've run into now is that the batch file is on a file server and the ASP page is on a IIS server. The File server is on a internal network (separate domain) and the IIS server is on an external network (or different domain), both servers are hosted here.
When I try it and look at the event logs I can see a failure audit and its trying to login with the machine name.
View 1 Replies
Dec 28, 2010
Is there anyways to launch Cassini web server from a command line? The exe appears to be in this path, C:Program Files (x86)Common Filesmicrosoft sharedDevServer10.0
View 1 Replies
Oct 22, 2010
Below is the code I use to store file into database but there are a few problems.
1. couldn't store file larger than 4mb
2. couldn't store doc,docx,xlsx but only .txt
my table column are:
[code]....
View 2 Replies
Jan 23, 2011
Actually I have a gridview with many rows and I want to insert the all rows in sql server through one store procedure first row can inserted but what should we do for other rows
View 3 Replies
Jul 23, 2010
I have a large dataset (35,000+ rows) that I need to export to excel and then let the user download. I have done this the conventional way (with a gridview), but the data has grown, causing a OutOfMemoryException on the web server.
So I thought, would it not be better if I can export the data into excel on the sql server, and then transfer this data to the web server.
Note that this is not a one-off job. This will be ran regularly (twice a month), but the user. Hence I need something that the user can initiate.
View 1 Replies
Mar 13, 2015
i have a sql server store procedure which return json data. i want to get this data without .net framwork or php or any other server side language..
So how make this possible to get json data of sql server query through any client scripting language like jquery ajax method.
View 8 Replies
Feb 8, 2010
I had a little problem with the value that one of my SPs returns. In my SP, I create some temporary tables to store certain data from multiple tables and contains some queries for an advanced calculationBut precisely yesterday, the value that the SP returns was incorrect. I tried to look at the SP and the data again and everything was OK, but not the result from the SP.And what the heck!!..today the value is totally right ...I truly have no idea what's wrong with the SP..Is there anyone knows what the root of cause is?
View 4 Replies
Oct 12, 2010
is there a function for adding days to a date value within a stored procedure?If I had a field with a start date and a field for duration which would be how many days the even lasts....like if I wanted something like this:TableName.StartDate, DateAdd(TableName.StartDate, TableName.Duration) as EndDate, etc
View 4 Replies
Oct 26, 2010
this is my code:
[Code]....
some of my col datatype is nVarchar...
in run time because my value in my table (dt_excel_allRows) are FARSI ; the sequence of my parameter changed and it cant be executed!!!!!
of course the problem is because of FARSI is rtl languges....
i can not user sqlPArameter becuse of some reason....
i think some thing like rtl or ltr can fix my problem....but how?
View 2 Replies
Aug 28, 2010
I have two tables. Product_Table with ProductID as the primary key. My other table, ProductSKU_Table which has SKU as the primary key and ProductID as the foreign key. I am trying to create a store procedure to insert into both tables. How do I insert the primary key from the Product_Table into the foreign key of the ProductSKU_Table? This is what I have so far:
[Code]....
View 15 Replies
Aug 10, 2010
how to lock a stored procedure..
if its lock how to open and execute that stored procedure..
View 2 Replies
Mar 11, 2011
My SQL stored procedure returns 3 different datasets as follows:
team_id name
1 Team1
2 Team2
...and more
location_id name
1 Dallas
2 New York
...and more
branch_id name
1 Austin
2 New Jersey
...and more
How do I put this data into one Dataset so that I can loop through the data and manipulate it?
View 1 Replies
Apr 20, 2010
I have setup a job in SQL Server Agent which run a store procedure.
[Code]....
After the job excuted, the temp table have not been created.
If I type "exec data_syn_ClearAllEposData". The temp table has been created.
Global Temp table cannot create in SQL SERVER AGENT?
View 8 Replies
Jan 6, 2011
I am working on storing pdf file in sql server database and then reading a portion of it and displaying in html.
View 2 Replies
Mar 25, 2010
Is it better to store images directly in a database or to just store the name of the file in the db and display that file? I would think that just storing the filename of the image would keep the db size low...
View 1 Replies
Sep 29, 2010
Apologies if my question is too broad but I eed pointers on how to tackle the following problem. Currently, I run a batch file that launches a series of automation tests on QTP (a test automation tool). The batch file contains a vbs script path and it takes three parameters. Each time smeone needs to run the automation, I have to do this manually.What I'd like to be able to do is to allow other members of the team to access this functionality via an intranet web page. They would be able to login, choose the tests to run and then run them. My only other requirement is that the solution be based on .net and C# if possible. My current server is 2003 SP2.What is the best way to achiveve what I want? What is the recommended version of IIS and .NET framework to use? How do I configure IIS to be able to run the vbs script? I'm looking for a step-by-step approach if possible. I don't care if I have to convert the batch file into an executable or run the script directly, just as long as it is launched.
View 3 Replies
Dec 3, 2010
I have a problem which is a recent development. We used to be able to run a batch file from IIS, but now we can't. I have tried several different approaches to this issue, none of them have worked. I tried to run the batch file under cmd using CreateProcess, CreateProcessWithLoginW, CreateProcessAs User, none of which worked. I now know that CreateProcesswithLogonW won't work on Windows 2003 Server. This is a C++ webservice by the way, running on Windows 2003 server using IIS 5.1. I have also tried running the batch file from a vbs script and calling the script in C++ using system("Scriptname") and that does not work either. I have run out of options, or at least the options that I know about.
I learned that "EXEs in System32, which like CMD.EXE have "special" ACLs that prevent them from being launched remotely from IIS. CMD.EXE has further security checks inside of it to prevent being used to launch batch scripts launched remotely from IIS." So I have abondoned even attempting to run CreateProcess of anykind where I invoke "cmd.exe" to run a batch file. Which was why I tried the vbscript. I know this is a security issue. It has to do with either the NETWORK SERVICE account or the ASPNET account not having permission to do this. I have QA breathing down my neck at this point and I really need to figure out what to do. If it is a security setting that can be set without compromising security on the server then great (although I bet that isn't the case).
View 1 Replies
Jan 17, 2011
I need to know, how can one create a batch file(.bat) and run the same at a specified time (say everyday at 12am midnight) in asp.net(C#).
View 4 Replies
Jan 13, 2011
I'm using the System.Diagnostics.Process class to run a batch file. I need to be able to take an output from the batch file and then display it on the web-page, basically to know if it succeeded or not, since the batch runs an .exe that doesn't always succeed.
the values returned by the .exe and have the batch run a script depending on the value returned. The script could be a VBscript that sends info to the webpage, but even then I'm not sure how to accomplish this.
View 4 Replies
Jan 8, 2010
i have made one web site which is generating screensaver(MSI) dynamically.So to generate the MSI file i have to build a WIX project.So i executed using batch file which will use MSBuild.exe and cmd prompt. so its gave me an error "Access is Denied". i have also tried by making a windiws service but still the same error occurs.
View 1 Replies