Showing posts with label iis. Show all posts
Showing posts with label iis. Show all posts

Wednesday, March 7, 2012

creating a folder on the server

Hi,
I have a script that runs on an IIS webserver. The webserver is on a
different domain as the MSSQL server. I have an asp page that uses DSNless
connection to connect to the SQL server and execute stored procedures to
create a database locally. Everything works fine and both the MDF and LOG
files get created. The problem is that I want the files to be created in a
new folder everytime with name passed to it by the asp page.
How can i do this, i can't create it through the asp page because the IIS
server cannot access the MSSQL's servers harddrive.
Is there a way to create a folder locally ?
I was thinking of using a batch file and execute that, but don't know how to
call that.
Any help would be appreciated
Thanx
You can use xp_cmdshell to run internal commands such as MD, bat files and exe files.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"robert" <rob@.ms.com> wrote in message news:%232bE672rFHA.3556@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I have a script that runs on an IIS webserver. The webserver is on a
> different domain as the MSSQL server. I have an asp page that uses DSNless
> connection to connect to the SQL server and execute stored procedures to
> create a database locally. Everything works fine and both the MDF and LOG
> files get created. The problem is that I want the files to be created in a
> new folder everytime with name passed to it by the asp page.
> How can i do this, i can't create it through the asp page because the IIS
> server cannot access the MSSQL's servers harddrive.
> Is there a way to create a folder locally ?
> I was thinking of using a batch file and execute that, but don't know how to
> call that.
> Any help would be appreciated
> Thanx
>
|||Another alternative is to do this as an ActiveX script task inside a DTS
package, which can be kicked off from your ASP page.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"robert" <rob@.ms.com> wrote in message
news:%232bE672rFHA.3556@.TK2MSFTNGP10.phx.gbl...
Hi,
I have a script that runs on an IIS webserver. The webserver is on a
different domain as the MSSQL server. I have an asp page that uses DSNless
connection to connect to the SQL server and execute stored procedures to
create a database locally. Everything works fine and both the MDF and LOG
files get created. The problem is that I want the files to be created in a
new folder everytime with name passed to it by the asp page.
How can i do this, i can't create it through the asp page because the IIS
server cannot access the MSSQL's servers harddrive.
Is there a way to create a folder locally ?
I was thinking of using a batch file and execute that, but don't know how to
call that.
Any help would be appreciated
Thanx
|||Thanks will try it out.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:ekf8gz6rFHA.464@.TK2MSFTNGP15.phx.gbl...
> Another alternative is to do this as an ActiveX script task inside a DTS
> package, which can be kicked off from your ASP page.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "robert" <rob@.ms.com> wrote in message
> news:%232bE672rFHA.3556@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I have a script that runs on an IIS webserver. The webserver is on a
> different domain as the MSSQL server. I have an asp page that uses DSNless
> connection to connect to the SQL server and execute stored procedures to
> create a database locally. Everything works fine and both the MDF and LOG
> files get created. The problem is that I want the files to be created in a
> new folder everytime with name passed to it by the asp page.
> How can i do this, i can't create it through the asp page because the IIS
> server cannot access the MSSQL's servers harddrive.
> Is there a way to create a folder locally ?
> I was thinking of using a batch file and execute that, but don't know how
> to
> call that.
> Any help would be appreciated
> Thanx
>

Saturday, February 25, 2012

Creating a database on SQL server 2005

Hi,

This might be a dumd question,

But how do I create a database in SQL2005 the application installed on the server is below

Windows 2003 server , IIS 6.0 , .NET Framework 2.0 Beta 2 , Visual studio 2005 Team suite Beta 2 , Visual studio 2005 Team Foundation Server Beta 2, SQL server April Community Technology.


Thanks in advance.

Hi,

you can use the Sql Server Management Studio Shiped with Sql Server 2005.

Or you code your own app using SQL-Statements (Create Database myDB).