Thursday, March 29, 2012
Database Name problem
"My Database" I use php to connect to MSSQL but php dosent see or understand space in Database name... I cant change database name because other sites also uses this database. How can solve this prblem pls help me.Put the database name in brackets. [My Database]
Database Move
I have a web project in VS.NET 2005 on my development computer that uses an ASP.NET database (ASPNETDB.MDF) to manage user roles. Now I would like to move that database to a test computer with IIS. After copying the web project and database I am able to read from it but when I try to update I get the following error:
Failed to update database "C:\INETPUB\WWWROOT\MyWebApp\APP_DATA\ASPNETDB.MDF" because the database is read-only.
I think this is because the user 'Network Service' that IIS uses does not have access to the database. So how do I give 'Network Service' access to the database using SQL commands?
The problem is solved by closing VS.NET 2005 before moving the database and giving the user 'Network Service' full control to the database files.
Saturday, February 25, 2012
Database Mail Works Locally but not from Web
I'm building a web site in Visual Web Developer Express on a SQL Server 2005 Developer Edition database, on XP Pro with IIS 5.1 up and running.
Database Mail is configured and works well from the VWD environment. I can launch the site locally from VWD and the stored procedures that call the database mail functions execute perfectly.
However, when I copy the site from the development folder under VWD to my IIS default web page, nothing is ever generated from database mail. I can open the site in IIS and everything looks like it's responding correctly (data updates, refreshes etc) but the behind-the-scenes processes that should be generating email traffic don't do anything.
Review of the database mail log through SQL Server Management Studio shows no activity at all during the timeframe of the "on line" IIS sessions, so it appears that the process isn't hearing anything calling it (or is ignoring the calls if they are happening).
Why would it work in one environment and not another on the same machine? Is there a setup configuration or permissions issue that I've missed somewhere?
Thanks in advance.
I suggest it is a permissions thing. I suggest this is asked in the development forums, in how to conifgure your website to talk to your database with the correct permissions.|||You were correct, the sp_send_dbmail SPROC used by my stored procedure resides in the MSDB database. The default configuration does not include the ASPNET account with any permissions. Once I found the SPROC and granted Execute permission to ASPNET, everything started working as intended. It's magic!
Friday, February 17, 2012
Database login
Should I create a user account for each client browsing the web site.
They can only access certain data after they have been verified from a
user table. They use a common database login to access the data. This
is planned to be a public free site. So hopefully the client count
will be high.create login that the application uses to get to the DB... instead of
creating a login for each user.|||Ok thats they wey I'm approaching it now.|||Are you using an ODBC or DSN less, either way assuming the users should
have the same permissions then 1 user is created in the db with a certain
level of permissions. You may also have an admin section , therfore the
admin user may have a different set of permissions
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"nathan001" <nathan@.thelosthorizon.com> wrote in message
news:1143477924.849156.7120@.z34g2000cwc.googlegroups.com...
> Ok thats they wey I'm approaching it now.
>|||From what you describe, it sounds like you need ASP.NET Forms
Authentication. At a minimum, you will need to implement a table with one
row for each subscriber.
ASP.NET Forms Authentication Overview
http://msdn2.microsoft.com/en-us/library/7t6b43z4.aspx
As for database (server) logins, you will need to implement one login for
each type of user (admin, subscriber, guest, etc.) and then use SQL Server
role based permissions to restrict each user's access to specific database
objects.
SQL Server 2000 Administrator's Pocket Consultant - Chapter 5: SQL Server
2000 Security
http://www.microsoft.com/technet/pr...s/c05ppcsq.mspx
SQL Server 2000 Operations Guide: Security Administration
http://www.microsoft.com/technet/pr...in/sqlops3.mspx
SQL Server 2000 Resource Kit - Chapter 10: Implementing Security
http://www.microsoft.com/technet/pr...fr=true
If this database is hosted by a 3rd party internet service provider, then
you will need to coordinate with the server administrator to setup the
logins and permissions, becuase these configurations require server admin
rights. If your ISP provides this functionality through their website
management tool, then that's great, but that would be exceptional.
"nathan001" <nathan@.thelosthorizon.com> wrote in message
news:1143473709.083112.37370@.i40g2000cwc.googlegroups.com...
>I have a web based application that could have many clients/users.
> Should I create a user account for each client browsing the web site.
> They can only access certain data after they have been verified from a
> user table. They use a common database login to access the data. This
> is planned to be a public free site. So hopefully the client count
> will be high.
>
Tuesday, February 14, 2012
Database level lock
do data uploads (with etl). During this upload, the users accessing the
website should not be able to read data. This is why I want database lock.
Now the catch here is, the application access the data using user say abc.
Abc is dbo for that database and the etl is also done by abc login. So will
db locking help in this case as the website can also read the data being a
abc user?
What can be done here?How do you do data upload? DTS,Bulk Insert what?
"Tanmaya Kulkarni" <tanmaya_kulkarni@.persistent.co.in> wrote in message
news:elzYtFttGHA.3568@.TK2MSFTNGP05.phx.gbl...
> Actually, the scenario is we have a web application and each week we need
> to do data uploads (with etl). During this upload, the users accessing the
> website should not be able to read data. This is why I want database lock.
> Now the catch here is, the application access the data using user say abc.
> Abc is dbo for that database and the etl is also done by abc login. So
> will db locking help in this case as the website can also read the data
> being a abc user?
> What can be done here?
>|||Tanmaya Kulkarni wrote:
> Actually, the scenario is we have a web application and each week we need to
> do data uploads (with etl). During this upload, the users accessing the
> website should not be able to read data. This is why I want database lock.
> Now the catch here is, the application access the data using user say abc.
> Abc is dbo for that database and the etl is also done by abc login. So will
> db locking help in this case as the website can also read the data being a
> abc user?
> What can be done here?
>
One option would be to have the web app connect as user 'abc', and the
ETL process as user 'xyz'. When starting the ETL process, revoke access
from user 'abc', and restore it after ETL finishes.
Another option would be to create a new database, do the ETL into that
database, then detach/reattach the "new" database as the "live" database.
Tracy McKibben
MCDBA
http://www.realsqlguy.com