473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

create database at shared hoster site

I have an sql script that I ran on my local system using osql. It
created all the tables, views, and even inserted sample data into the
tables.

Now I need to create that same database on a shared hoster site. Only
the hoster does not allow the running of osql.

How can I create my sql server database on my shared hoster site?

Can I save and restore my database somehow?

Is there a stored procedure I can run which will run the .sql script
file?

thanks,

-Steve

Jul 23 '05 #1
4 1834
That depends on how your provider expects you to execute SQL code - if
they don't allow osql.exe, then what do they allow? And how do you
connect to the hosted database - do you use Enterprise Manager? Since
osql.exe is just a client application, if you can connect to the SQL
server then you should be able to use it.

Simon

Jul 23 '05 #2

Simon Hayes wrote:
That depends on how your provider expects you to execute SQL code - if they don't allow osql.exe, then what do they allow?
the hoster is godaddy.com You do get a panel where you can manually
config the database. There is something called "Query Analyser" which
provides a window to run sql statements. I dont think this is the same
as the Microsoft Query Analyzer that I read about yesterday. In this
godaddy qa window I cannot "run sqlscript.sql" like I think you can do
in Microsoft Query Analyzer.

What I was able to do was cut and paste large sections of my script.sql
from my PC editor into the GoDaddy "Query Analyser" window. Then I
clicked the "submit" button and it basically worked.
And how do you
connect to the hosted database - do you use Enterprise Manager? Since
osql.exe is just a client application, if you can connect to the SQL
server then you should be able to use it.


well my asp.net code can use the SqlConnection class to connect to the
database, then use SqlCommand to run SQL commands. Can osql be run in
that context?

I am curious to know if there is a stored procedure I can use which
will run an .sql script.

thanks,

-Steve

Jul 23 '05 #3
You might be able to re-use this code in ASP:

http://groups-beta.google.com/group/...72b5441b?hl=en

A web interface which doesn't allow uploading scripts is quite limited
- I would definitely ask the provider if they can enhance it.

There's no stored proc to run a file, probably because the server would
need to have access to the script file somehow, which is tricky if it's
on your workstation. It's common to use xp_cmdshell to call osql.exe as
a way of executing scripts, but that's only really useful for syadmins,
because of the security implications.

Simon

Jul 23 '05 #4

Simon Hayes wrote:
You might be able to re-use this code in ASP:

http://groups-beta.google.com/group/...72b5441b?hl=en
that looks to be exactly what I am looking for.

thanks very much,

-Steve

A web interface which doesn't allow uploading scripts is quite limited - I would definitely ask the provider if they can enhance it.

There's no stored proc to run a file, probably because the server would need to have access to the script file somehow, which is tricky if it's on your workstation. It's common to use xp_cmdshell to call osql.exe as a way of executing scripts, but that's only really useful for syadmins, because of the security implications.

Simon


Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mike MacSween | last post by:
My client has an MS Access database application on her local machine. I have full access to that in terms of changing the design. I've got a simple PHP/MySql application on shared hosting, so no...
4
by: Steve Richter | last post by:
What can be done if the shared web hoster I am using allows only 1 sql server database and a second web application I would like to install is configured to use its own database? can databases...
12
by: VM | last post by:
I'm looking for an ASP.Net web hoster for my page and I'd like to know what I should consider when making my decision. Since I'm an independent software consultant, my short-term goal is to...
2
by: Vaughn | last post by:
I'm looking for a reliable Web Hoster that has full Dot Net functionality. I'm basically looking for something that's about $10/month or less, has ASP.Net support, and has positive feedback and...
8
by: Vaughn | last post by:
I'm looking for a reliable Web Hoster that has full Dot Net functionality.I'm basically looking for something that's about $10/month or less, has ASP.Net support, and has positive feedback and...
2
by: §iD` | last post by:
Hi! I would like to create a virtual folder (which I want to mount) and populate managing his content by a DLL or something like that in VB.NET (2.0). How can I acomplish this? Thanks to...
16
by: flip2flik | last post by:
Hi. I am using visual web developer express edition and I am using vb.net as the programming language. I want to create a new aspx file on a button click. I will have a template that the new...
25
by: pereges | last post by:
Hello, I'm trying to build a database driven website for a library management system. The database is stored on a remote server which all of my team mates can access. I've installed MySQL, PHP and...
6
by: Mr. X. | last post by:
Hello. How can I create aspnetdb from scratch ? (I want a script that create all table, views, etc... on that database). Thanks :)
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.