Deploying a SQL Server App

Discussion in 'ASP .Net' started by =?Utf-8?B?U2t1bGx5?=, Jan 20, 2005.

  1. If I have created my Web Application on my PC using command and connection
    objects (dragging them onto the forms from the Server Explorer window) how do
    I make it work when I deploy the application (and presumably the dB) to the
    Host server? The connection objects all refer to my PC not the server the app
    will eventually end up on?

    I guess my question is general. Where do I find out how to deploy a SQL
    Server/ASP.NET app to a server.....?

    Thanks
     
    =?Utf-8?B?U2t1bGx5?=, Jan 20, 2005
    #1
    1. Advertising

  2. Put your connection strings and other settings in the web.config and then
    when the app is deployed you only have one place to change it.
     
    =?Utf-8?B?U2NvdHQgU2ltb25z?=, Jan 20, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?U2t1bGx5?=

    Scott Allen Guest

    Skully:

    Instread of using connection strings that are hard coded into your source
    code, try placing them into the web.config file and reading them at run time.
    When you deploy to a new server you'll just need to tweak web.config with
    the right connection string.

    there are ways to encrypt the string if you need the security boost.

    There is some discussion here:
    http://msdn.microsoft.com/library/d...accessingsqlserverwithexplicitcredentials.asp

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    > If I have created my Web Application on my PC using command and
    > connection objects (dragging them onto the forms from the Server
    > Explorer window) how do I make it work when I deploy the application
    > (and presumably the dB) to the Host server? The connection objects all
    > refer to my PC not the server the app will eventually end up on?
    >
    > I guess my question is general. Where do I find out how to deploy a
    > SQL Server/ASP.NET app to a server.....?
    >
    > Thanks
    >
     
    Scott Allen, Jan 20, 2005
    #3
  4. Thanks Scott,
    One more question. To deploy the database which database files do I put on
    the server and where do I put them?

    "Scott Allen" wrote:

    > Skully:
    >
    > Instread of using connection strings that are hard coded into your source
    > code, try placing them into the web.config file and reading them at run time.
    > When you deploy to a new server you'll just need to tweak web.config with
    > the right connection string.
    >
    > there are ways to encrypt the string if you need the security boost.
    >
    > There is some discussion here:
    > http://msdn.microsoft.com/library/d...accessingsqlserverwithexplicitcredentials.asp
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
    >
    > > If I have created my Web Application on my PC using command and
    > > connection objects (dragging them onto the forms from the Server
    > > Explorer window) how do I make it work when I deploy the application
    > > (and presumably the dB) to the Host server? The connection objects all
    > > refer to my PC not the server the app will eventually end up on?
    > >
    > > I guess my question is general. Where do I find out how to deploy a
    > > SQL Server/ASP.NET app to a server.....?
    > >
    > > Thanks
    > >

    >
    >
    >
     
    =?Utf-8?B?U2t1bGx5?=, Jan 20, 2005
    #4
  5. =?Utf-8?B?U2t1bGx5?=

    Scott Allen Guest

    Generally you don't want to deploy the database files per se (although SQL
    2005 should make this easy). You could copy all the .mdf and .ldf files from
    one server to another and use a script or enterprise manager to 'attach'
    the database to the server.

    The usual appraoch is to generate SQL scripts to recreate the tables and
    any data needed then execute those scripts on the destination server. You
    can generate scripts through SQL Server's enterprise manger.

    Making sense?

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    > Thanks Scott,
    > One more question. To deploy the database which database files do I
    > put on
    > the server and where do I put them?
    > "Scott Allen" wrote:
    >
    >> Skully:
    >>
    >> Instread of using connection strings that are hard coded into your
    >> source code, try placing them into the web.config file and reading
    >> them at run time. When you deploy to a new server you'll just need to
    >> tweak web.config with the right connection string.
    >>
    >> there are ways to encrypt the string if you need the security boost.
    >>
    >> There is some discussion here:
    >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbco
    >> n/html/vbtskaccessingsqlserverwithexplicitcredentials.asp
    >> --
    >> Scott
    >> http://www.OdeToCode.com/blogs/scott/
    >>> If I have created my Web Application on my PC using command and
    >>> connection objects (dragging them onto the forms from the Server
    >>> Explorer window) how do I make it work when I deploy the application
    >>> (and presumably the dB) to the Host server? The connection objects
    >>> all refer to my PC not the server the app will eventually end up on?
    >>>
    >>> I guess my question is general. Where do I find out how to deploy a
    >>> SQL Server/ASP.NET app to a server.....?
    >>>
    >>> Thanks
    >>>
     
    Scott Allen, Jan 20, 2005
    #5
  6. Thanks Scott,
    Not sure I understand what you mean by "attach".
    Once the scripts are generated, how do i execute them on the server if my
    only view of it is through an ftp program?

    "Scott Allen" wrote:

    > Generally you don't want to deploy the database files per se (although SQL
    > 2005 should make this easy). You could copy all the .mdf and .ldf files from
    > one server to another and use a script or enterprise manager to 'attach'
    > the database to the server.
    >
    > The usual appraoch is to generate SQL scripts to recreate the tables and
    > any data needed then execute those scripts on the destination server. You
    > can generate scripts through SQL Server's enterprise manger.
    >
    > Making sense?
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
    >
    > > Thanks Scott,
    > > One more question. To deploy the database which database files do I
    > > put on
    > > the server and where do I put them?
    > > "Scott Allen" wrote:
    > >
    > >> Skully:
    > >>
    > >> Instread of using connection strings that are hard coded into your
    > >> source code, try placing them into the web.config file and reading
    > >> them at run time. When you deploy to a new server you'll just need to
    > >> tweak web.config with the right connection string.
    > >>
    > >> there are ways to encrypt the string if you need the security boost.
    > >>
    > >> There is some discussion here:
    > >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbco
    > >> n/html/vbtskaccessingsqlserverwithexplicitcredentials.asp
    > >> --
    > >> Scott
    > >> http://www.OdeToCode.com/blogs/scott/
    > >>> If I have created my Web Application on my PC using command and
    > >>> connection objects (dragging them onto the forms from the Server
    > >>> Explorer window) how do I make it work when I deploy the application
    > >>> (and presumably the dB) to the Host server? The connection objects
    > >>> all refer to my PC not the server the app will eventually end up on?
    > >>>
    > >>> I guess my question is general. Where do I find out how to deploy a
    > >>> SQL Server/ASP.NET app to a server.....?
    > >>>
    > >>> Thanks
    > >>>

    >
    >
    >
     
    =?Utf-8?B?U2t1bGx5?=, Jan 22, 2005
    #6
  7. Attaching and detaching databases are
    standard operations used in SQL Server.

    See http://databasejournal.com/features/mssql/article.php/2224361

    1.
    You should have a SQL Server Control Panel
    of some sort provided by your ISP, so you can
    work remotely on your SQL Server databases.

    With it, you can execute system stored procedures,
    like sp_detach_db and sp_attach_db, to detach and
    attach databases.

    2.
    If you have SQL Server installed locally, too,
    you can connect to the remote SQL Server
    and execute sp_detach_db and sp_attach_db.





    Juan T. Llibre
    ASP.NET MVP
    ===========
    "Skully" <> wrote in message
    news:...
    > Thanks Scott,
    > Not sure I understand what you mean by "attach".
    > Once the scripts are generated, how do i execute them on the server if my
    > only view of it is through an ftp program?
    >
    > "Scott Allen" wrote:
    >
    >> Generally you don't want to deploy the database files per se (although
    >> SQL
    >> 2005 should make this easy). You could copy all the .mdf and .ldf files
    >> from
    >> one server to another and use a script or enterprise manager to 'attach'
    >> the database to the server.
    >>
    >> The usual appraoch is to generate SQL scripts to recreate the tables and
    >> any data needed then execute those scripts on the destination server. You
    >> can generate scripts through SQL Server's enterprise manger.
    >>
    >> Making sense?
    >>
    >> --
    >> Scott
    >> http://www.OdeToCode.com/blogs/scott/
    >>
    >> > Thanks Scott,
    >> > One more question. To deploy the database which database files do I
    >> > put on
    >> > the server and where do I put them?
    >> > "Scott Allen" wrote:
    >> >
    >> >> Skully:
    >> >>
    >> >> Instread of using connection strings that are hard coded into your
    >> >> source code, try placing them into the web.config file and reading
    >> >> them at run time. When you deploy to a new server you'll just need to
    >> >> tweak web.config with the right connection string.
    >> >>
    >> >> there are ways to encrypt the string if you need the security boost.
    >> >>
    >> >> There is some discussion here:
    >> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbco
    >> >> n/html/vbtskaccessingsqlserverwithexplicitcredentials.asp
    >> >> --
    >> >> Scott
    >> >> http://www.OdeToCode.com/blogs/scott/
    >> >>> If I have created my Web Application on my PC using command and
    >> >>> connection objects (dragging them onto the forms from the Server
    >> >>> Explorer window) how do I make it work when I deploy the application
    >> >>> (and presumably the dB) to the Host server? The connection objects
    >> >>> all refer to my PC not the server the app will eventually end up on?
    >> >>>
    >> >>> I guess my question is general. Where do I find out how to deploy a
    >> >>> SQL Server/ASP.NET app to a server.....?
    >> >>>
    >> >>> Thanks
    >> >>>

    >>
    >>
    >>
     
    Juan T. Llibre, Jan 22, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VG9tIE4=?=

    deploying and re-deploying ASP.Net applications

    =?Utf-8?B?VG9tIE4=?=, Feb 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    411
    =?Utf-8?B?VG9tIE4=?=
    Feb 4, 2004
  2. Replies:
    2
    Views:
    433
    bruce barker
    Jan 5, 2005
  3. Replies:
    8
    Views:
    492
  4. =?Utf-8?B?Q2FybCBNLg==?=
    Replies:
    4
    Views:
    2,519
    sivlookingforu
    Aug 7, 2006
  5. Replies:
    0
    Views:
    329
Loading...

Share This Page