Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Thursday, March 29, 2012

Correct Setup for SQL Server 2005 for web project!

Ive been trying to get some type of Blogpost tutorial Etc on how to set up SQL Server 2005 to serve data to a website

1 How do I setup users?
a) Can I have 3 roles?
1a) Owner of DB can read/write

2a) reader Can Only read from database

3a) Writer. Can only write to database

How would I set this up? How can I call all these from ASP.NET depending on what the user is currently using on the website?

eg:

Just serving pages with content (reader)
Forms (writter)
admin (owner)

I also need to have the SQL keep sessions (Ive already ran aspnet_reqSQL.exe) and created all that im just unsure what type user can access all this

Any tutorials on how to set up a whole WEb application project from DB to VS 2005?

Thanks


Bump

No one knows how to correctly setup SQL Server?

|||

So no one know how to setup SQL Server 2005 efficiently and securely???????

*Sight*

|||

a) Can I have 3 roles?
1a) Owner of DB can read/write

2a) reader Can Only read from database

3a) Writer. Can only write to database

After you have installed sql server,you can create some user accounts and assign them permissions as you like. Open sql server-> select one database and expand-->select "security"--> click "Users" or "Roles"

sql

Sunday, March 25, 2012

copying tables from one database to another database

i am using visual web developer 2005 and SQL Express 2005 with VB as the code behind

i have two databases .

i want to copy all the tables with all the contents from one database to another database programatically

how to achieve this ?

please help me

easiest way is to use the detach - attach method or backup and restoresql

Thursday, March 22, 2012

Copying SqlServer database from web host

Hi,

I have a hard time copying my db (or instance?) from a SQL Server 2000 db which resides at my web host. I have Sql Server 2005 Express and Sql Server Management Studio Express on my computer and, well, there is no "ftp-like" option so I don't have a clue about how to proceed. I've read many posts on the net on this matter but nothing seems to apply to this, in my mind, rather common, configuration.

I have receieved Excel docs that should be appended to tables in my db. I have successfully installed DTS (seehttp://mobiledeveloper.wordpress.com/ for details - it's really simple but takes two hours) so I have a wizard for the actual import from Excel. My plan is now to

1. download/detach/whatever my table/db/part of the web host's db and download it to my computer. Then

2. fill the tables with the data from Excel. And finally, to

3. upload/attach/whatever my local db or table to the web host again.

I'm sooo confused, please, please help me out here!

Pettrer

Here's how:

http://forums.asp.net/1621926/ShowThread.aspx#1621926

Tuesday, March 20, 2012

Copying MSDE database to disk - how?

I have my little MSDE on my computer. I can add and delete stuff from it through Web Matrix. My question is, where exactly is the database stored in Windows?? Also, say I wanted to copy it to a disk so I could show it to someone else, what file(s) would I need to copy?

The reason why I ask is because I have been doing a website as a project and we have to hand in all files on a disk. Getting all the .aspx & .ascx and the .config file is easy, but the database & stored procedures is proving tricky to find.

ThanksTry using this tool - http://www.webattack.com/get/dbamgr2.html its a MSDE Manager. Install it then connect to your server. right click the database you want to backup then select 'Backup Database' and bobs your uncle:)|||Actually you shold use that tool, right click your DB then click 'Generate SQL Script'. This will be easier to install on a remote server

Monday, March 19, 2012

copying freextex indexes into multiple destination dbs on same dest server

Hi -
I've looked on Microsoft's web site:
http://support.microsoft.com/default...;EN-US;Q240867
and not yet been able to find a full answer to my question.
I'd appreciate any insight from others:
I have a database that has full text indexes on it, that I need to log ship
to multiple other (destination) servers. Also, to promote availability on
each of the destination servers, I plan to restore into two databases:
dest_db and dest_db_alt. Both are to have the same content, but different db
names. I intend to restore one set of dbs/logs from the source server into
standby mode in each destination database, sequentially, so that, with
proper client re-direction, a client hitting the destination server will
always get redirected to a read-only db in standby mode. While one db is
restoring, the other is readable. Ok, fair enough.
Now, the tricky part. The source db is freextex indexed, and one can't
build/rebuild freetext indexes on a db in standby or read-only mode. So,
apparently I'll have to copy the freetext index directory trees from the
source server and restore them on the destination server. What I'm uncertain
about is whether I'll be able to:
a) Use one set of freetext indexes files for both destination dbs (I don't
think so, If I understand things correctly),
b) Properly set the registry keys and directory/file names on the freetext
catalogs on the destination server so that even though at least one of the
destination dbs (necessarily) has a different dbid than the source database,
it will still be able to have a functioning freetext index. From the
generally related material I read it seems as if the registry keys map the
freetext catalog path(s) into SQL Server, and those catalog paths use dbids
and ftcatids integrated into their folder names to map a set of catalog
files to a dbid.
So here is my question: Can I just make multiple copies of the freetext
catalog files, differing only in the dbid portion of the folder name, and
then, using registry keys, map the newly created Freetext catalog folder(s)
into SQL Server with the relevant dbids on the destination server ?
Are dbids, or other database specific unique identifiers, hard coded within
the freetext catalog files themselves ?
Is there other important information I have to consider here ?
Thanks
Steve
Use replication for this. Create your catalogs and full text indexes using a
post snapshot script or create the tables and catalogs in advance, full text
index the tables, and then configure your article to delete the data not
drop and recreate the table (in the article properties section select the
browse button to the right of your table name, and in the snapshot tab, in
the name conflicts section , select delete all data).
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Steve" <Steve_a013452@.newsgroups.nospam> wrote in message
news:OJ9F4IqGGHA.2704@.TK2MSFTNGP15.phx.gbl...
> Hi -
> I've looked on Microsoft's web site:
> http://support.microsoft.com/default...;EN-US;Q240867
> and not yet been able to find a full answer to my question.
> I'd appreciate any insight from others:
> I have a database that has full text indexes on it, that I need to log
> ship to multiple other (destination) servers. Also, to promote
> availability on each of the destination servers, I plan to restore into
> two databases: dest_db and dest_db_alt. Both are to have the same content,
> but different db names. I intend to restore one set of dbs/logs from the
> source server into standby mode in each destination database,
> sequentially, so that, with proper client re-direction, a client hitting
> the destination server will always get redirected to a read-only db in
> standby mode. While one db is restoring, the other is readable. Ok, fair
> enough.
> Now, the tricky part. The source db is freextex indexed, and one can't
> build/rebuild freetext indexes on a db in standby or read-only mode. So,
> apparently I'll have to copy the freetext index directory trees from the
> source server and restore them on the destination server. What I'm
> uncertain about is whether I'll be able to:
> a) Use one set of freetext indexes files for both destination dbs (I don't
> think so, If I understand things correctly),
> b) Properly set the registry keys and directory/file names on the freetext
> catalogs on the destination server so that even though at least one of the
> destination dbs (necessarily) has a different dbid than the source
> database, it will still be able to have a functioning freetext index. From
> the generally related material I read it seems as if the registry keys map
> the freetext catalog path(s) into SQL Server, and those catalog paths use
> dbids and ftcatids integrated into their folder names to map a set of
> catalog files to a dbid.
> So here is my question: Can I just make multiple copies of the freetext
> catalog files, differing only in the dbid portion of the folder name, and
> then, using registry keys, map the newly created Freetext catalog
> folder(s) into SQL Server with the relevant dbids on the destination
> server ?
> Are dbids, or other database specific unique identifiers, hard coded
> within the freetext catalog files themselves ?
> Is there other important information I have to consider here ?
> Thanks
> Steve
>

Thursday, March 8, 2012

copying data from Microsoft Access to SQL Server

Hello

I am developing a web application that will allow users to upload a .mdb file and from that file I need to populate an SQL database. I know the table name of the .mdb file, but I am unclear how to structure my data access layer correctly. How do I pull data from the .mdb file and once I have it how do i populate the SQL database?

Any advice would be greatly appreciated.


thanks!

There is one problem with moving Access data on the fly Access let people to just point and click what they wish, if that is your situation you need DTS because in SQL Server your data must be clean and relational. So if you have clean table definitions and clean inserts you could just use OpenRowset or OpenQuery. If not then DTS is your friend. So check your setup and post specifics so I can give you the resources as needed. Hope this helps.

Saturday, February 25, 2012

copying a database across servers

I'm developing a web application locally using SQL Server 2000. When it's time for me to throw it up on my host, how do I copy the database from my computer to their server? Thanks.use the DTS tools provided with SQL Server (import/export data).

What I usually do is script the database structure (and objects), set that up and check it over, THEN transfer the data, but whether you want to do it that way is up to you

j|||Another way is to simply stop your sql server and copy the database and log files to the other location and then attach the database.

Regards|||There are multiple ways as in using DTS or other tools. BUt if the other server is far apart and you donot want to use the internet bandwidth then I feel the best bet is to backup the database and then transfer/FTP the DB backup to be restored into the destination server. Copying the data and the log files are fine. But not the cleanest of approaches AFAIK.|||All solutions provided here are good, I would personally go with Atrax' Scripting solution, it is probably the best way to do it if you don't need to transfer any data and bandwidth is an issue, but you will need the admin on the remote server to launch your .sql script. Here's what I do: Select all your user tables, right-click and copy. Paste them into the Query Analyzer and boom you've got the script to create your tables. Same with SPROC's and any other objects you have created. You can paste them all into one file.

Add this to the top of your SQL Script if the DB does not exist on the server:

CREATE DATABASE [YourDBName]--Skip these two lines if the DB does exist
Go
USE YourDBName -- Add this regardless

and Save it. The script can now be executed from the QA on any SQL server to create your DB.
Piece-o-cake.

If you did need to transfer any data, you could create a DTS package to export the data to the remote server. But of course you have to have access and it depends on the amount of data you have stored and bandwidth as to how effective a transfer would be.

But again, all of the solutions provided here by the other posters so far are viable. It's a matter of personal preference. All though, if you script it and something blows up locally, you can easily recreate your database without having to copy it back from the remote server. An unlikey scenario, but entirely possible... just a thought.

Good luck.

Sunday, February 19, 2012

Copy Table Problem

Hi I am developing and web app for my final year in college but I am having problems trying to keep my 2 databases up-to-date (one in college and the other at home) I'm just wondering if there is anyway to copy a single table from the college db to the home including the table design and data etc. So I'm just wondering if anyone has any ideas of how I would go about doing this

Thanks in advance

Tim

Sql Server 2000 had aDTS Import/Export Wizard which allowed you to copy data between two registered Sql Servers (these could be on remote systems). I haven't used Sql Server 2005 but I would presume it would have something similair.