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

Friday, March 30, 2012

Personal Web Developer Kit SQL Error

Hi folks,

I get this error message when I try to run my personal web page starter kit (Ctrl + F5) which has come straight out of the box:

Server Error in '/WebSite1' Application.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

    If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist. If the applications App_Data directory already exists, the web server account only requires read and write access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the applications App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database. Sql Server Express must be installed on the machine. The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +173 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199 System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +1069 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +606 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +219 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +49 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89 System.Data.SqlClient.SqlConnection.Open() +160 System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +67 [HttpException (0x80004005): Unable to connect to SQL Server database.] System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +123 System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +89 System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString) +26 System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) +388


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

In my web administration tool, under the Security tab the following error is listed:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unable to connect to SQL Server database.

and under the provider tab the provider is listed as: AspNetSqlProvider.

So what do I need to do?

(By the way, I wasn't exactly sure where to put this post, but if it gets moved to another forum please may you post the new link? Cheers)

In the default installation, SQL Server installs with very tight security.

Please refer to these articles for help in setting the correct configuration parameters.

Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

Configuration -Connect to SQL Express from "downlevel clients"
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx

Configuration -Connect to SQL Express and ‘Stay Connected’
http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html

Configuration - Guideline for Connectivity Question Posting
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1

|||I don't seem to have SQL Server 2005 installed (it's not in the start menu, nor in Program Files). Do you think this is the problem? Do I need to install it, and if so, where from?
|||

heebiej wrote:

I don't seem to have SQL Server 2005 installed (it's not in the start menu, nor in Program Files). Do you think this is the problem? Do I need to install it, and if so, where from?

That could be a problem after you install it you still need to use the surface area configuration tool to enable browser services and allow remote and local connection then enable both TCP/IP and Named Pipes. Try the link below to download SQL Server Express with Advanced features, one more thing there are many user improved version of this kit you may want to check the forum for this kit at the Asp.net forums. Hope this helps.

http://msdn.microsoft.com/vstudio/express/sql/download/advanced/default.aspx

|||You can download a copy of SQL Server 2005 Express from here.

Monday, March 26, 2012

Permit user to select columns for a report: why not use Dynamic SQL?

I certainly have read lots of negative comments about using Dynamic SQL. And I have read some of the excellent web pages on the subject, such as

http://www.sommarskog.se/dynamic_sql.html

I have learned much from those discussions.

But I still find myself faced with a problem for which Dynamic SQL seems like the only reasonable solution: letting a user select the columns to include in a report, and the sort order for the output data.

In the application of concern, there are maybe seven columns that one might want to have in a report. If the user can choose any combination of these seven columns, and the order in which they are displayed (as well as the SORT order), it would be necessary to write something like 7! (7-factorial = 5040) individual reports to provide all the possibilities that included all 7 columns, plus (7 choose 6, with concern for order) (or 7*6*5*4*3*2 = 5040) ways to choose 6 of the 7 columns (with a group-by taking care of the column not chosen), etc.

(Even if we chose to ignore the order, and let the "presentation layer" of a .NET UI take care of that, there are still (2^7 -1) = 127 different ways to choose the columns for the report, knowing that at least one column must be selected.)

And when another level of detail is added to the data, we must duplicate all the existing reports so that we can have them "with and without" the new column.

This would be hundreds or thousands of reports -- just dealing with 7 columns in the selection list, and possibly the desired order for those 7 columns.

In MS Access it seems one has a "query builder" that is essentially constructing Dynamic SQL statements based on the selections the user makes in the "query builder." In Access one can use the "SQL View" to see the SQL statement written by the "query builder."

Why does this user community seem to frown on Dynamic SQL as a way to make thousands of very similar reports (same tables JOINed together on the same columns) that merely need different columns in the SELECT and GROUP BY clauses? This would essentially be duplicating some of the operation of the "query builder" in MS Access. Is that a bad design?

What am I missing?

In the type of situation you describe, Dynamic SQL is a good option. However, I would never allow the end user to be able to type in column names, or even see the SQL code. That would open you to SQL injection.

Instead, build a form to create the SQL string. Use drop down lists and check boxes for the user to select columns and sort criteria. Build the SQL string 'behind the scene'. Do not allow the user to write anything that you put in the SQL String. If you follow such precautions, you 'may' be able to prevent the use of SQL injection by the end users, but not by anyone familiar with the code. (Upwards of 75% of economic damage comes from within...) Preventing even developers (and power users using Excel, etc.) from having the opportunity to use SQL injection would require using stored procedures.

|||

The key word is "report". For purely reporting, particularly reporting on a database that is not part of your OLTP system with live users trying to get work done, you are absolutely right. Giving users ad hoc access to write reports to your live system is just giving them a license to bring down your system. So be careful and make sure to constrain them some how (query governor, qa processes, etc.) My advice is always to provide a copy of the data (either transformed into a format for easy reporting (like OLAP), or just replicated/snapshotted) that the user can write reports to their hearts delight. If the query brings down the server, no revenue is likely lost.

But you are right, the only thing you gain by using stored procedures for reports is plan saving, and who cares? Reports may be run once a day, whereas OLTP queries are often run once a second (or more in some systems). We use stored procedures for reports only when the queries are so complex they won't fit in a single query (well, when the people writing them can't fathom how to make them into a single query :)

I definitely prefer the no dynamic SQL rule for reports that go off of the OLTP system though. The more fixed the set of queries, the more reasonable the support is, and your OLTP system is where money comes in, and that is where you get paid from. Never want to dissapoint there.

|||

Arnie,

Yes, as you mentioned, the user would select columns in some sort of drop-down list. There would be no room for SQL Injection. The User Interface in .NET would also allow the user to define the column order for the output report display, as well as the sort order for that display. The details have not yet been worked out.

Louis,

The reports I am discussing ARE for the "OLTP System." The main purpose of the OLTP system is to provide reports to users (people are producing reports more than any other sort of transaction). The current report menu tree is approx. 40 selections, each with its own stored procedure (it had been 23 reports, but we just recently added a dozen more, or so; soon we must add approx. 200 more if we don't use Dynamic SQL; each returns 2 or 3 data tables; each is maybe a 500-line stored procedure). But the users are asking for a wider variety of reports (to "slice and dice" the data different ways, to look at the same data from different perspectives, and with different levels of detail), which would cause the menu tree to expand to 10,000 entries or so, each with its own stored procedure unless we make a single stored procedure that uses Dynamic SQL.

So we could either write 5,000,000 lines of code and make a separate procedure for each report, and have the User Interface decide which of the 10,000 stored procedures to use (one per report), or we could write a few Dynamic SQL stored procedures that were each maybe 1000-1500 lines, and which could produce all 10,000 reports. (I hate to think of editing 10,000 stored procedures if we decide to rename a table, or a column in a table, or any similar maintenance activity!) (And there is also the issue of how to provide a .NET menu for the user to select from 10,000 reports, as opposed to providing merely a "select columns, display order, and sort order" for a list of 7 columns.)

These reports are run only hundreds to thousands of times per day, on a busy day; maybe dozens of times per day on a slow day. Because of the volume of the data a report may take a minute or two for the stored procedure to run and for the output to be formatted. Many users can only access a small amount of the data, so their reports run in a few seconds.

The users would not be writing any reports -- they would be merely choosing the columns they wanted in their output, which thereby defines the level of aggregation of any sums, etc., of numeric quantities. The "dynamic SQL builder" would be a stored procedure called by .NET, with the column selections and sort order as part of the input parameters.

The main advantage I see for doing this in Dynamic SQL is that it means we don't have 10,000 nearly identical stored procedures, all doing essentially the same thing -- just returning different columns, with different "group by" and "order by" clauses. Instead we have only one or two Dynamic SQL stored procedures, which build the SQL strings for the 10,000 different reports, based on user selections in the User Interface.

We get paid to provide the users with the reports they need. Different situations require different reports. How can you easily let users choose the data they want in their reports, and produce those somewhat-customized reports, without using Dynamic SQL?

|||

However, if this is a web based app, there still may be the opportunity for sQL injection.

It would be much more secure to collect the tables, columns, criteria, and sorting information into parameters, or simulated 'array' strings, and then pass those into a stored procedure and create the dynamic completely in the stored procedure.

For security purposes, I am against application embedded dynamic SQL. The DBA doens't know what's out there, and it is not easy to find and repair when business requirements force changes to the data store.

|||

>>The reports I am discussing ARE for the "OLTP System." The main purpose of the OLTP system is to provide reports to users (people are producing reports more than any other sort of transaction). <<

So are these realtime reports? Like show me exactly what is going on kinds of things? And what is the problem with returning all columns and tossing out the ones that they don't need? Are you returning that many columns with that much data?

Bottom line is that I would provide a reporting database for reporting, especially if these are not real time.

If they are real time needs, and the performance of returning 10 columns is noticably worse than 5, or 2, then dynamic SQL is not a "sin" it is just something to shy away from. I build dynamic SQL stored procedures to support some of the very same sort of things too. Just beware of the issues you can run into, is really all I think any of us are saying.

|||

Arnie,

I am not the .NET programmer, but I am sure he will not be allowing the users to enter any strings -- merely make selections from drop-down lists. So I think we will be safe from SQL Injection. We haven't yet decided on any parameter passing mechanism, or even whether we would provide these reports by a selection from a 10,000 item menu, or by having the user select columns for display, GROUP BY, and sort order.

Louis,

Yes, these are real-time reports, in the sense that a user wants to make edits to the data, and then run a report and see that the edits are reflected in the report. I suppose the user could tolerate some milliseconds of delay -- especially since it takes a while to make the selections for running a report. We are not dealing with anything like a point-of-sale system wherein the up-to-the-millisecond scanning of barcodes at the cash register might be important. Edits in the data tables are a result of numeric entries from the keyboard, so rather slow in terms of computer processing speed.

As for returning all columns and tossing out the ones they don't need, that doesn't really work since the numeric quantities must be summed according to the "GROUP BY" associated with the columns requested in the report.

The main performance issues I've noticed when returning more columns is that temporary tables used in the report procedures contain enough rows to make indexing beneficial, e.g., 200,000 rows. We will implement some way of informing the user that the number of rows returned exceed the limits of an Excel spreadsheet (approx. 65,000 rows), so the user must select a smaller portion of data for the report.

I fully agree with the notion of using Dynamic SQL only when it appears as the most appropriate solution to the problem at hand.

Thanks for your input in this discussion, from both of you.

Dan

sql

Permissions when linking to reports

Hi,

I've adding a link from my web app to reports sitting on another box. However, that box is asking the user to login. How do I set the permissions to avoid it?Would like to help!
What OS are your "boxes" running ?
Are you using Active Directory?
Are your "boxes" on the same intranet ?
What security schema are you using with SQL connections?
Best Regards,

Permissions via ASP.NET web site

I have a website with membership system. I've been through a lot implementing the site and I think I'm on the verge of full implementation. I can't get my registration page or my admin page to add, edit or delete users. I'm assuming that asp does not have proper permissions on SQL to do such.

I'm running the site on a provider that has a SQL 2000 server. I access the database through VS2005 and SQL Server Management Studio Express.

Is there a tutorial out there that could help a newbie to SQL understand how to check and correct my permissions issue (or find out that I'm haveing a different issue entirely.

-Bill

SQL Server 2000 require you to go in and manually create the account before you can run it I have answered this question in the thread below go through it and apply the instructions in the last link and post again if you still need help. Hope this helps.

http://forums.asp.net/thread/1534299.aspx

|||

Thank you for your prompt reply.

Further research indicates that my roles are conflicted also. My registrations are being created, but I can't see the role that's being created for them. Once I figure that out, I'll be able to add that role to the proper table and be able to see all of the users I create. Editing and deleting users is still not possible given the instructions you posted. I still need to change the permissions from my admin page. The create user is working.

Thank you

|||

You are not supposed to edit and delete users so delete the database you have created and start new this time do everything in SQL Server 2000 because Express and 2000 are not the same. Hope this helps.

http://blog.vanslaars.com/archive/2006/05/17/ASP.NET-2.0-Membership-with-SQL-2000.aspx

sql

Friday, March 23, 2012

Permissions Questions

Being new to 2005 reporting services, I have a permissions questions. When users now open up the Report Viewer within their web browser, they are being asked for proper username and password credentials in order to view reports. Right now, the only credentials that seem to be accepted are high level admin accounts - which I obviously do not want to give them.

Where can I change the permissions settings, to allow different users the ability to view reports without the need to enter an admin account username and password - or any credentials at all for that matter?

Thanks for all your help.

http://localhost/reports

Click the properties tab, then click security. Add new role assignments for the users.

|||Authentication should be set to NTLM on IIS

That way, as long as they are logged in to windows, they can be authenticated without needing to sign in.|||Can you explain where I would set this. Would this also override needing credentials to view the reports - not needing credentials to view the data source|||http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1909497&SiteID=1

Tuesday, March 20, 2012

permissions issue with http driven report in web iframe

Hi there,

I need to understand why I am getting the following error when I run my deployed (remote) report embedded in an iframe within a page of my web application.

error:
An

error has occurred during report processing. (rsProcessingAborted)
Query

execution failed for data set 'cnMOOR'. (rsErrorExecutingCommand)For

more information about this error navigate to the report server on the local

server machine, or enable remote error

This happens when I fire the following code from a commandbutton:
AppSettingsReader cfgApp = new AppSettingsReader();

string prefix = Convert.ToString(cfgApp.GetValue("reporturlprefix", typeof(System.String)));

string reporturl = prefix + "Client&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=False&supplierid=" + Session["supplierId"].ToString() + "&clientid=" + ddlClient.SelectedItem.Value + "&startdate=" + txtStartDate.Text + "&enddate=" + txtEndDate.Text + "&ownertype=1";

SpecificClient.Attributes.Add("src", reporturl);

SpecificClient is the ID of the Iframe

on the same page I created a link - which runs the report perfectly - no permission problems.
<a href="http://server2003msrs/reportserver?/moorreports/Client&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=False&supplierid=28&clientid=71&startdate=2007-01-01&enddate=2007-02-16&ownertype=1">Test</a>

I don't understand why these two controls are behaving differently.

I'd appreciate some guidance with this as the deadline looms...

Helen


  • Hi there,

    something that I didn't mention - this error only happened when I changed the connection string properties. Previously both controls had worked fine.

    I eventually fixed it by creating a new report whilst pointing at the new database.

    suddenly all of them worked as before.

    weird, but that's what solved the issue.

    regards Helen

  • permissions issue with http driven report in web iframe

    Hi there,

    I need to understand why I am getting the following error when I run my deployed (remote) report embedded in an iframe within a page of my web application.

    error:
    An

    error has occurred during report processing. (rsProcessingAborted)
    Query

    execution failed for data set 'cnMOOR'. (rsErrorExecutingCommand)For

    more information about this error navigate to the report server on the local

    server machine, or enable remote error

    This happens when I fire the following code from a commandbutton:
    AppSettingsReader cfgApp = new AppSettingsReader();

    string prefix = Convert.ToString(cfgApp.GetValue("reporturlprefix", typeof(System.String)));

    string reporturl = prefix + "Client&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=False&supplierid=" + Session["supplierId"].ToString() + "&clientid=" + ddlClient.SelectedItem.Value + "&startdate=" + txtStartDate.Text + "&enddate=" + txtEndDate.Text + "&ownertype=1";

    SpecificClient.Attributes.Add("src", reporturl);

    SpecificClient is the ID of the Iframe

    on the same page I created a link - which runs the report perfectly - no permission problems.
    <a href="http://server2003msrs/reportserver?/moorreports/Client&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=False&supplierid=28&clientid=71&startdate=2007-01-01&enddate=2007-02-16&ownertype=1">Test</a>

    I don't understand why these two controls are behaving differently.

    I'd appreciate some guidance with this as the deadline looms...

    Helen


  • Hi there,

    something that I didn't mention - this error only happened when I changed the connection string properties. Previously both controls had worked fine.

    I eventually fixed it by creating a new report whilst pointing at the new database.

    suddenly all of them worked as before.

    weird, but that's what solved the issue.

    regards Helen

  • Monday, February 20, 2012

    Permission Denied error

    Windows Pro
    VS.Net
    .Net Framework
    ASP.NET
    My 1st time using Web Forms in .Net
    1st time using SQL
    I am receiving the following error:
    System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in
    database 'master'. Could not attach database 'pubs' to file 'D:\Program
    Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
    I tried the following:
    Reboot 4-5 times
    Share the folder
    Web share the folder
    Here is some advanced help from another SQL forum.
    sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
    isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is not a
    command found on my box.
    Any ideas?
    Thanks for your help,
    THello,
    What are you trying to do here? Can you post the commands
    To create databases you need system administrator rights and dbcreator
    Permissions (from BOL)
    CREATE DATABASE permission defaults to members of the sysadmin and dbcreator
    fixed server roles. Members of the sysadmin and securityadmin fixed server
    roles can grant CREATE DATABASE permissions to other logins. Members of the
    sysadmin and dbcreator fixed server role can add other logins to the
    dbcreator role. The CREATE DATABASE permission must be explicitly granted;
    it is not granted by the GRANT ALL statement.
    CREATE DATABASE permission is usually limited to a few logins to maintain
    control over disk usage on an instance of SQL Server.
    I wouldn't suggest granting the owner of a .NET IIS app either of these
    rights
    I hope this helps
    regards
    Greg O MCSD
    http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe Documentation
    Builder, the quickest way to document your database
    http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server Extended
    Property Extended properties manager for SQL 2000
    http://www.ag-software.com/IconExtractionProgram.aspx. Free icon extraction
    program
    http://www.ag-software.com. Free programming tools
    "Taishi" <taishi_bak@.hotmail.com> wrote in message
    news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
    > Windows Pro
    > VS.Net
    > .Net Framework
    > ASP.NET
    > My 1st time using Web Forms in .Net
    > 1st time using SQL
    > I am receiving the following error:
    > System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in
    > database 'master'. Could not attach database 'pubs' to file 'D:\Program
    > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
    > I tried the following:
    > Reboot 4-5 times
    > Share the folder
    > Web share the folder
    > Here is some advanced help from another SQL forum.
    > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
    > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is not a
    > command found on my box.
    >
    > Any ideas?
    > Thanks for your help,
    > T
    >|||How can I check the permissions/rights?
    How can I grant the correct permissions/rights?
    Thanks,
    T
    "Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
    message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
    > Hello,
    > What are you trying to do here? Can you post the commands
    > To create databases you need system administrator rights and dbcreator
    > Permissions (from BOL)
    > CREATE DATABASE permission defaults to members of the sysadmin and
    dbcreator
    > fixed server roles. Members of the sysadmin and securityadmin fixed server
    > roles can grant CREATE DATABASE permissions to other logins. Members of
    the
    > sysadmin and dbcreator fixed server role can add other logins to the
    > dbcreator role. The CREATE DATABASE permission must be explicitly granted;
    > it is not granted by the GRANT ALL statement.
    > CREATE DATABASE permission is usually limited to a few logins to maintain
    > control over disk usage on an instance of SQL Server.
    > I wouldn't suggest granting the owner of a .NET IIS app either of these
    > rights
    >
    > --
    > I hope this helps
    > regards
    > Greg O MCSD
    > http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
    Documentation
    > Builder, the quickest way to document your database
    > http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server Extended
    > Property Extended properties manager for SQL 2000
    > http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
    extraction
    > program
    > http://www.ag-software.com. Free programming tools
    >
    >
    > "Taishi" <taishi_bak@.hotmail.com> wrote in message
    > news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
    > > Windows Pro
    > > VS.Net
    > > .Net Framework
    > > ASP.NET
    > > My 1st time using Web Forms in .Net
    > > 1st time using SQL
    > > I am receiving the following error:
    > >
    > > System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in
    > > database 'master'. Could not attach database 'pubs' to file 'D:\Program
    > > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
    > >
    > > I tried the following:
    > >
    > > Reboot 4-5 times
    > > Share the folder
    > > Web share the folder
    > >
    > > Here is some advanced help from another SQL forum.
    > > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
    > > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is not
    a
    > > command found on my box.
    > >
    > >
    > > Any ideas?
    > >
    > > Thanks for your help,
    > > T
    > >
    > >
    >|||Hi Tashi!
    You can ue Enterprise manager to set the rights. Locate the table, and right
    click. Select All Tasks, then Manage Permissions. Locate the user that you
    are using in your connection object, and then grant the rights. I agree with
    Greg that the web user should not normally have that level of permission.
    One false move and your server and data could be toast. If you are really
    trying to create a table, or attach a database, you should be doing that
    through Enterprise Manager, and not the web interface.
    Sloan
    "Taishi" <taishi_bak@.hotmail.com> wrote in message
    news:u54GDcN7DHA.1428@.TK2MSFTNGP12.phx.gbl...
    > How can I check the permissions/rights?
    > How can I grant the correct permissions/rights?
    > Thanks,
    > T
    > "Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
    > message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
    > > Hello,
    > > What are you trying to do here? Can you post the commands
    > >
    > > To create databases you need system administrator rights and dbcreator
    > >
    > > Permissions (from BOL)
    > > CREATE DATABASE permission defaults to members of the sysadmin and
    > dbcreator
    > > fixed server roles. Members of the sysadmin and securityadmin fixed
    server
    > > roles can grant CREATE DATABASE permissions to other logins. Members of
    > the
    > > sysadmin and dbcreator fixed server role can add other logins to the
    > > dbcreator role. The CREATE DATABASE permission must be explicitly
    granted;
    > > it is not granted by the GRANT ALL statement.
    > >
    > > CREATE DATABASE permission is usually limited to a few logins to
    maintain
    > > control over disk usage on an instance of SQL Server.
    > >
    > > I wouldn't suggest granting the owner of a .NET IIS app either of these
    > > rights
    > >
    > >
    > > --
    > > I hope this helps
    > > regards
    > > Greg O MCSD
    > > http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
    > Documentation
    > > Builder, the quickest way to document your database
    > > http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server
    Extended
    > > Property Extended properties manager for SQL 2000
    > > http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
    > extraction
    > > program
    > > http://www.ag-software.com. Free programming tools
    > >
    > >
    > >
    > >
    > > "Taishi" <taishi_bak@.hotmail.com> wrote in message
    > > news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
    > > > Windows Pro
    > > > VS.Net
    > > > .Net Framework
    > > > ASP.NET
    > > > My 1st time using Web Forms in .Net
    > > > 1st time using SQL
    > > > I am receiving the following error:
    > > >
    > > > System.Data.SqlClient.SqlException: CREATE DATABASE permission denied
    in
    > > > database 'master'. Could not attach database 'pubs' to file
    'D:\Program
    > > > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
    > > >
    > > > I tried the following:
    > > >
    > > > Reboot 4-5 times
    > > > Share the folder
    > > > Web share the folder
    > > >
    > > > Here is some advanced help from another SQL forum.
    > > > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
    > > > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is
    not
    > a
    > > > command found on my box.
    > > >
    > > >
    > > > Any ideas?
    > > >
    > > > Thanks for your help,
    > > > T
    > > >
    > > >
    > >
    > >
    >|||Sloan,
    I found the following url.
    http://www.aspenterprisemanager.com/
    Is Enterprise Manager free?
    If so, where can I download it?
    Thanks so much for the help,
    T.
    "Sloan Thrasher" <cst2000@.comcast.net> wrote in message
    news:cuQUb.232283$I06.2592550@.attbi_s01...
    > Hi Tashi!
    > You can ue Enterprise manager to set the rights. Locate the table, and
    right
    > click. Select All Tasks, then Manage Permissions. Locate the user that you
    > are using in your connection object, and then grant the rights. I agree
    with
    > Greg that the web user should not normally have that level of permission.
    > One false move and your server and data could be toast. If you are really
    > trying to create a table, or attach a database, you should be doing that
    > through Enterprise Manager, and not the web interface.
    > Sloan
    > "Taishi" <taishi_bak@.hotmail.com> wrote in message
    > news:u54GDcN7DHA.1428@.TK2MSFTNGP12.phx.gbl...
    > > How can I check the permissions/rights?
    > >
    > > How can I grant the correct permissions/rights?
    > >
    > > Thanks,
    > > T
    > >
    > > "Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
    > > message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
    > > > Hello,
    > > > What are you trying to do here? Can you post the commands
    > > >
    > > > To create databases you need system administrator rights and dbcreator
    > > >
    > > > Permissions (from BOL)
    > > > CREATE DATABASE permission defaults to members of the sysadmin and
    > > dbcreator
    > > > fixed server roles. Members of the sysadmin and securityadmin fixed
    > server
    > > > roles can grant CREATE DATABASE permissions to other logins. Members
    of
    > > the
    > > > sysadmin and dbcreator fixed server role can add other logins to the
    > > > dbcreator role. The CREATE DATABASE permission must be explicitly
    > granted;
    > > > it is not granted by the GRANT ALL statement.
    > > >
    > > > CREATE DATABASE permission is usually limited to a few logins to
    > maintain
    > > > control over disk usage on an instance of SQL Server.
    > > >
    > > > I wouldn't suggest granting the owner of a .NET IIS app either of
    these
    > > > rights
    > > >
    > > >
    > > > --
    > > > I hope this helps
    > > > regards
    > > > Greg O MCSD
    > > > http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
    > > Documentation
    > > > Builder, the quickest way to document your database
    > > > http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server
    > Extended
    > > > Property Extended properties manager for SQL 2000
    > > > http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
    > > extraction
    > > > program
    > > > http://www.ag-software.com. Free programming tools
    > > >
    > > >
    > > >
    > > >
    > > > "Taishi" <taishi_bak@.hotmail.com> wrote in message
    > > > news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
    > > > > Windows Pro
    > > > > VS.Net
    > > > > .Net Framework
    > > > > ASP.NET
    > > > > My 1st time using Web Forms in .Net
    > > > > 1st time using SQL
    > > > > I am receiving the following error:
    > > > >
    > > > > System.Data.SqlClient.SqlException: CREATE DATABASE permission
    denied
    > in
    > > > > database 'master'. Could not attach database 'pubs' to file
    > 'D:\Program
    > > > > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
    > > > >
    > > > > I tried the following:
    > > > >
    > > > > Reboot 4-5 times
    > > > > Share the folder
    > > > > Web share the folder
    > > > >
    > > > > Here is some advanced help from another SQL forum.
    > > > > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
    > > > > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is
    > not
    > > a
    > > > > command found on my box.
    > > > >
    > > > >
    > > > > Any ideas?
    > > > >
    > > > > Thanks for your help,
    > > > > T
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >|||You can use MSDE and Access as a backend for a website.
    I am uninitiated but I know this for a fact.
    "Sloan Thrasher" <cst2000@.comcast.net> wrote in message
    news:b3FVb.259176$na.418905@.attbi_s04...
    > Hi Tashi!
    > I haven't installed MSDE, but it should have asked for a sa password
    during
    > installation. If so, and you remember it, you could use asp to connect and
    > add the DBs you need, but definately not something for the uninitiated.
    > Also, I'm not sure, but I don't think you're allowed to use MSDE as a
    > backend for a web site.
    > Since you're new to ASP.net, SQL, etc. you might want to start out with
    > something a bit simplier, like an Access DB (if you have MS Office, you
    have
    > Access) That way you have a GUI to create your database and tables in and
    > you can focus on one thing at a time.
    > If you really want to move forward with MSDE, then look at this link:
    >
    http://msdn.microsoft.com/library/?url=/library/en-us/distsql/distsql_84xl.a
    > sp?frame=true
    > The topic is Customizing MDSE Setup.exe. In there you will see how to
    setup
    > the SA password, the default directory for your data files, and a lot
    more.
    > I found it by D/L the app and the HTML readme file.
    > Sloan
    >
    > "Taishi" <taishi_bak@.hotmail.com> wrote in message
    > news:#zV2Aes7DHA.3804@.tk2msftngp13.phx.gbl...
    > > Sloan,
    > >
    > > I installed the MSDE 2000 from the following web site:
    > >
    > > ww.microsoft.com/downloads
    > >
    > > Featured download
    > > Microsoft SQL Server 2000
    > > Desktop Engine(MSDE 2000) Release A
    > >
    > > I don't have the SQL server disks.
    > >
    > > Any ideas?
    > >
    > > Thanks,
    > > T.
    > >
    > > "Sloan Thrasher" <cst2000@.comcast.net> wrote in message
    > > news:J1EVb.125043$U%5.607067@.attbi_s03...
    > > > Hi Tashi!
    > > >
    > > > Enterprise Manager comes with SQL Server. You should be able to
    install
    > it
    > > > from the MS SQL Server CDs
    > > >
    > > > Sloan
    > > >
    >