From: Mario on


My local sql express database connection string look like this:

<add name="BazaConnectionString" connectionString="Data
Source=.\SQLExpress;AttachDbFilename=|DataDirectory|\Baza.mdf;Integrated
Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient"/>

And works fine.

Now I need to upload on my site.
First of all, administrator don't won't to give me an sql server IP,
just told me to replace Data Source to: localhost\SQL2008. I upload
App_Data, replace data source but it doesn't work.

So do I need to push administrator to give me IP adresss and then attach
the database?

How will I then debug application locally ? It isn't so practical to
change connection string from SQLExpress to SQL2008.



From: Sylvain Lafontaine on
First, you need to check if the SQL-Server is a regular edition (Web,
Standard, Enterprise) or the Express edition because user instances -
created with the parameter � AttachDbFilename=|DataDirectory|\Baza.mdf � -
are only supported with the Express edition, not the other editions. With
those other editions, the database file must be explicitely attached by an
administrator.

Also, for security reason, must installation of SQL-Server prohibits to
access it from the outside; so it's no use to ask for a SQL-Server IP
address.

What you usually get is an empty database that you must fill using sql
scripts that you will run locally from your web site. You should check what
you have and what you can do with your host.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)


"Mario" <pascal(a)po.t-com.hr> wrote in message
news:hpa5es$s1t$1(a)ss408.t-com.hr...
>
>
> My local sql express database connection string look like this:
>
> <add name="BazaConnectionString" connectionString="Data
> Source=.\SQLExpress;AttachDbFilename=|DataDirectory|\Baza.mdf;Integrated
> Security=True;Connect Timeout=30;User Instance=True"
> providerName="System.Data.SqlClient"/>
>
> And works fine.
>
> Now I need to upload on my site.
> First of all, administrator don't won't to give me an sql server IP, just
> told me to replace Data Source to: localhost\SQL2008. I upload App_Data,
> replace data source but it doesn't work.
>
> So do I need to push administrator to give me IP adresss and then attach
> the database?
>
> How will I then debug application locally ? It isn't so practical to
> change connection string from SQLExpress to SQL2008.
>
>
>


From: Mario on
On 04.04.2010. 18:26, Sylvain Lafontaine wrote:
> First, you need to check if the SQL-Server is a regular edition (Web,
> Standard, Enterprise) or the Express edition because user instances -
> created with the parameter � AttachDbFilename=|DataDirectory|\Baza.mdf � -
> are only supported with the Express edition, not the other editions. With
> those other editions, the database file must be explicitely attached by an
> administrator.
>
> Also, for security reason, must installation of SQL-Server prohibits to
> access it from the outside; so it's no use to ask for a SQL-Server IP
> address.
>
> What you usually get is an empty database that you must fill using sql
> scripts that you will run locally from your web site. You should check what
> you have and what you can do with your host.
>

It is regular edition. I created empty database through the dotnetpanel
and thanks, now I need to create script. I installed SQL Server
Management Studio (came with SQL Express 2008) and just looking how to
create a script, you mentioned. Thanks.
From: Sylvain Lafontaine on
The real problem is when you want to make changes to an existing database.
With SSMS, you can generate a differential script when you make change to a
table but you need to collect all of them along; which is not an easy work.
Personally, I prefer to use a sql-server comparaison tool that can compare
two different versions of a database and generate all the required scripts
necessary to bring one identical to the other. Myself, I use the one
provided by Red-Gate but you can find many others on the internet, some of
them free.

Completely free tools:

http://www.codeplex.com/OpenDBiff
http://www.codeplex.com/DbDiff

Tools that are free if you are using SQL-Server Express:

http://www.teratrax.com/tdc/
http://www.xsqlsoftware.com/LiteEdition.aspx

Other free tools that can be useful:

http://www.sqlservercentral.com/articles/Tools/64908/
http://www.sqlservercentral.com/Forums/Topic356421-283-1.aspx
http://www.sqlservercentral.com/articles/Miscellaneous/2959/

http://weblogs.sqlteam.com/mladenp/archive/2007/11/20/Free-SQL-Server-tools-that-might-make-your-life-a.aspx

Some of those free tools to work with SSMS (not necessarily to compare two
databases) won't work with the Expres edition (SSMS-E). Personally, I think
that it's worth it to buy the Developer Edition of SQL-Server (around 50$US)
to get access to the full version of SSMS instead of SSMS-E. If you're
serious about working with SQL-Server, 50$ is not a big deal.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)


"Mario" <pascal(a)po.t-com.hr> wrote in message
news:hpai3e$opo$1(a)ss408.t-com.hr...
> On 04.04.2010. 18:26, Sylvain Lafontaine wrote:
>> First, you need to check if the SQL-Server is a regular edition (Web,
>> Standard, Enterprise) or the Express edition because user instances -
>> created with the parameter �
>> AttachDbFilename=|DataDirectory|\Baza.mdf � -
>> are only supported with the Express edition, not the other editions.
>> With
>> those other editions, the database file must be explicitely attached by
>> an
>> administrator.
>>
>> Also, for security reason, must installation of SQL-Server prohibits to
>> access it from the outside; so it's no use to ask for a SQL-Server IP
>> address.
>>
>> What you usually get is an empty database that you must fill using sql
>> scripts that you will run locally from your web site. You should check
>> what
>> you have and what you can do with your host.
>>
>
> It is regular edition. I created empty database through the dotnetpanel
> and thanks, now I need to create script. I installed SQL Server Management
> Studio (came with SQL Express 2008) and just looking how to create a
> script, you mentioned. Thanks.


From: Mario on
On 04.04.2010. 20:04, Sylvain Lafontaine wrote:
> The real problem is when you want to make changes to an existing database.
> With SSMS, you can generate a differential script when you make change to a
> table but you need to collect all of them along; which is not an easy work.
> Personally, I prefer to use a sql-server comparaison tool that can compare
> two different versions of a database and generate all the required scripts
> necessary to bring one identical to the other. Myself, I use the one
> provided by Red-Gate but you can find many others on the internet, some of
> them free.
>
> Completely free tools:
>
> http://www.codeplex.com/OpenDBiff
> http://www.codeplex.com/DbDiff
>
> Tools that are free if you are using SQL-Server Express:
>
> http://www.teratrax.com/tdc/
> http://www.xsqlsoftware.com/LiteEdition.aspx
>
> Other free tools that can be useful:
>
> http://www.sqlservercentral.com/articles/Tools/64908/
> http://www.sqlservercentral.com/Forums/Topic356421-283-1.aspx
> http://www.sqlservercentral.com/articles/Miscellaneous/2959/
>
> http://weblogs.sqlteam.com/mladenp/archive/2007/11/20/Free-SQL-Server-tools-that-might-make-your-life-a.aspx
>
> Some of those free tools to work with SSMS (not necessarily to compare two
> databases) won't work with the Expres edition (SSMS-E). Personally, I think
> that it's worth it to buy the Developer Edition of SQL-Server (around 50$US)
> to get access to the full version of SSMS instead of SSMS-E. If you're
> serious about working with SQL-Server, 50$ is not a big deal.
>

Thank you on your great help. I will pass all that links. One more
question is: How I will run generated script and will I get a permission
from admistrator?