Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

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


Report this thread to moderator Post Follow-up to this message
Old Post
Steve Richter
04-26-05 08:23 AM


Re: create database at shared hoster site
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


Report this thread to moderator Post Follow-up to this message
Old Post
Simon Hayes
04-26-05 12:23 PM


Re: create database at shared hoster site
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


Report this thread to moderator Post Follow-up to this message
Old Post
Steve Richter
04-26-05 12:23 PM


Re: create database at shared hoster site
You might be able to re-use this code in ASP:

http://groups-beta.google.com/group...br />
1b?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


Report this thread to moderator Post Follow-up to this message
Old Post
Simon Hayes
04-26-05 04:24 PM


Re: create database at shared hoster site
Simon Hayes  wrote:
> You might be able to re-use this code in ASP:
>
>
http://groups-beta.google.com/group...e72b5441b?hl=en[
color=darkred]
>[/color]

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


Report this thread to moderator Post Follow-up to this message
Old Post
Steve Richter
04-27-05 08:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 08:05 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006