显示标签为“connection”的博文。显示所有博文
显示标签为“connection”的博文。显示所有博文

2012年3月25日星期日

Anyone have reports on Reports? (Things that go beyond the samples

Hi all,
I'd like to get a report on the reports that are deployed.
It would tell me things like this:
Report Name
DataSourceName
Connection String
Stored Procedures Called
Views/Tables Used (Probably can't be
shown if its calling a stored procedure)
Modified date
Modified Last by
Folder it is stored under in Report
ManagerFolder it is stored under in Report Manager (this is in the samples)
Last Run By
Last Run Date
Can this be done? Does anyone have it?
Are there any user created updates or changes to the samples that MSFT has
written?
KeithOn Jul 25, 1:32 pm, greenmtnsun
<greenmtn...@.discussions.microsoft.com> wrote:
> Hi all,
> I'd like to get a report on the reports that are deployed.
> It would tell me things like this:
> Report Name
> DataSourceName
> Connection String
> Stored Procedures Called
> Views/Tables Used (Probably can't be
> shown if its calling a stored procedure)
> Modified date
> Modified Last by
> Folder it is stored under in Report
> ManagerFolder it is stored under in Report Manager (this is in the samples)
> Last Run By
> Last Run Date
> Can this be done? Does anyone have it?
> Are there any user created updates or changes to the samples that MSFT has
> written?
> Keith
There are two useful tables under a database named
"ReportServer" (this is where the report server stuff is stored, like
history). Catalog and ExecutionLog are the tables and they can be
joined at reportid (execution log) and itemid (catalog). That way you
can pull the names of the report users, reports, and other fun stuff.
There are also some other valuable tables in that database, but I
don't use them that much.|||You are not supposed to access reporting services' database directly
(although you can with appropriate permission). Reporting services provides
web services to get the information the OP wants. reporting services' report
mamaner is an ggod example of an application consuming the web services to
get that kind of information. I believe the OP does not need to know more
information that report manager can show.
"Ayman" <aymantg@.gmail.com> wrote in message
news:1185386825.627743.70110@.q75g2000hsh.googlegroups.com...
> On Jul 25, 1:32 pm, greenmtnsun
> <greenmtn...@.discussions.microsoft.com> wrote:
>> Hi all,
>> I'd like to get a report on the reports that are deployed.
>> It would tell me things like this:
>> Report Name
>> DataSourceName
>> Connection String
>> Stored Procedures Called
>> Views/Tables Used (Probably can't be
>> shown if its calling a stored procedure)
>> Modified date
>> Modified Last by
>> Folder it is stored under in Report
>> ManagerFolder it is stored under in Report Manager (this is in the
>> samples)
>> Last Run By
>> Last Run Date
>> Can this be done? Does anyone have it?
>> Are there any user created updates or changes to the samples that MSFT
>> has
>> written?
>> Keith
> There are two useful tables under a database named
> "ReportServer" (this is where the report server stuff is stored, like
> history). Catalog and ExecutionLog are the tables and they can be
> joined at reportid (execution log) and itemid (catalog). That way you
> can pull the names of the report users, reports, and other fun stuff.
> There are also some other valuable tables in that database, but I
> don't use them that much.
>|||On Jul 25, 1:32 pm, greenmtnsun
<greenmtn...@.discussions.microsoft.com> wrote:
> Hi all,
> I'd like to get a report on the reports that are deployed.
> It would tell me things like this:
> Report Name
> DataSourceName
> Connection String
> Stored Procedures Called
> Views/Tables Used (Probably can't be
> shown if its calling a stored procedure)
> Modified date
> Modified Last by
> Folder it is stored under in Report
> ManagerFolder it is stored under in Report Manager (this is in the samples)
> Last Run By
> Last Run Date
> Can this be done? Does anyone have it?
> Are there any user created updates or changes to the samples that MSFT has
> written?
> Keith
If you have access to those databases, you can make your own custom
reports to show whatever you want. I have one set up to show
executions per user and which reports they executed. Others include,
most recent executions, total executions per report, etc. There is
much you can do in terms of custom reporting if you use the
ReportServer database that is created by default by SSRS.|||I have all the permissions I could ever need. If not, I'll give me them! :-)
Could you by chance share these reports you spoke of? My e-mail address is
keith underscore m underscore ramsey at yahoo dot com
I don't know if spam bots can get this address so I messed with it. _ is an
underscore. LOL.
I'd really appreciate it. They can show me how to get other peices of
information.
One thing I got frusted about was that at first blush I couldn't get an ID
number for a report to link from the RSExecutionLog to the RS databases. I
think the RSExecutionLog uses its own ID system. I hope I'm wrong. I also
don't know how they break out the connection string from things that are
encrypted.
"Ayman" wrote:
> On Jul 25, 1:32 pm, greenmtnsun
> <greenmtn...@.discussions.microsoft.com> wrote:
> > Hi all,
> >
> > I'd like to get a report on the reports that are deployed.
> >
> > It would tell me things like this:
> >
> > Report Name
> >
> > DataSourceName
> >
> > Connection String
> >
> > Stored Procedures Called
> >
> > Views/Tables Used (Probably can't be
> > shown if its calling a stored procedure)
> >
> > Modified date
> >
> > Modified Last by
> >
> > Folder it is stored under in Report
> > ManagerFolder it is stored under in Report Manager (this is in the samples)
> >
> > Last Run By
> >
> > Last Run Date
> >
> > Can this be done? Does anyone have it?
> >
> > Are there any user created updates or changes to the samples that MSFT has
> > written?
> >
> > Keith
> If you have access to those databases, you can make your own custom
> reports to show whatever you want. I have one set up to show
> executions per user and which reports they executed. Others include,
> most recent executions, total executions per report, etc. There is
> much you can do in terms of custom reporting if you use the
> ReportServer database that is created by default by SSRS.
>|||On Jul 26, 11:54 am, greenmtnsun
<greenmtn...@.discussions.microsoft.com> wrote:
> I have all the permissions I could ever need. If not, I'll give me them! :-)
> Could you by chance share these reports you spoke of? My e-mail address is
> keith underscore m underscore ramsey at yahoo dot com
> I don't know if spam bots can get this address so I messed with it. _ is an
> underscore. LOL.
> I'd really appreciate it. They can show me how to get other peices of
> information.
> One thing I got frusted about was that at first blush I couldn't get an ID
> number for a report to link from the RSExecutionLog to the RS databases. I
> think the RSExecutionLog uses its own ID system. I hope I'm wrong. I also
> don't know how they break out the connection string from things that are
> encrypted."Ayman" wrote:
> > On Jul 25, 1:32 pm, greenmtnsun
> > <greenmtn...@.discussions.microsoft.com> wrote:
> > > Hi all,
> > > I'd like to get a report on the reports that are deployed.
> > > It would tell me things like this:
> > > Report Name
> > > DataSourceName
> > > Connection String
> > > Stored Procedures Called
> > > Views/Tables Used (Probably can't be
> > > shown if its calling a stored procedure)
> > > Modified date
> > > Modified Last by
> > > Folder it is stored under in Report
> > > ManagerFolder it is stored under in Report Manager (this is in the samples)
> > > Last Run By
> > > Last Run Date
> > > Can this be done? Does anyone have it?
> > > Are there any user created updates or changes to the samples that MSFT has
> > > written?
> > > Keith
> > If you have access to those databases, you can make your own custom
> > reports to show whatever you want. I have one set up to show
> > executions per user and which reports they executed. Others include,
> > most recent executions, total executions per report, etc. There is
> > much you can do in terms of custom reporting if you use the
> > ReportServer database that is created by default by SSRS.
Here are the generic ones you can use. I posted them here to everyone
will benefit.
--Detailed
select el.username,c.name,el.timestart,el.timeend
executionlog el join
catalog c on el.reportid=c.itemid
order by timestart desc
--Reports used by user
select el.username,c.name, count(1)
from executionlog el join
catalog c on el.reportid=c.itemid
group by el.username,c.name
order by el.username,c.name
--Usage by Report
select c.name, count(1)
from executionlog el join
catalog c on el.reportid=c.itemid
group by c.name
order by count(1) desc
--Recent usages per user per report
select el.username,c.name,el.timestart,el.timeend
from executionlog el join
catalog c on el.reportid=c.itemid
where username =''INSERT IT HERE'
order by timestart desc
Hope that helps! You can put them in a report if you don't like to
see them in SSMS. By the way, it's a good way to track who has been
using the reports you developed for them! You last name sounds
Egyptian by the way.|||Thank you.
For the record, I am still looking for these to place in a report about
reports...
Connection String
Stored Procedures Called
Views/Tables Used (Probably can't be
shown if its calling a stored procedure)
Modified date
Modified Last by
"Ayman" wrote:
> On Jul 26, 11:54 am, greenmtnsun
> <greenmtn...@.discussions.microsoft.com> wrote:
> > I have all the permissions I could ever need. If not, I'll give me them! :-)
> >
> > Could you by chance share these reports you spoke of? My e-mail address is
> > keith underscore m underscore ramsey at yahoo dot com
> >
> > I don't know if spam bots can get this address so I messed with it. _ is an
> > underscore. LOL.
> >
> > I'd really appreciate it. They can show me how to get other peices of
> > information.
> >
> > One thing I got frusted about was that at first blush I couldn't get an ID
> > number for a report to link from the RSExecutionLog to the RS databases. I
> > think the RSExecutionLog uses its own ID system. I hope I'm wrong. I also
> > don't know how they break out the connection string from things that are
> > encrypted."Ayman" wrote:
> > > On Jul 25, 1:32 pm, greenmtnsun
> > > <greenmtn...@.discussions.microsoft.com> wrote:
> > > > Hi all,
> >
> > > > I'd like to get a report on the reports that are deployed.
> >
> > > > It would tell me things like this:
> >
> > > > Report Name
> >
> > > > DataSourceName
> >
> > > > Connection String
> >
> > > > Stored Procedures Called
> >
> > > > Views/Tables Used (Probably can't be
> > > > shown if its calling a stored procedure)
> >
> > > > Modified date
> >
> > > > Modified Last by
> >
> > > > Folder it is stored under in Report
> > > > ManagerFolder it is stored under in Report Manager (this is in the samples)
> >
> > > > Last Run By
> >
> > > > Last Run Date
> >
> > > > Can this be done? Does anyone have it?
> >
> > > > Are there any user created updates or changes to the samples that MSFT has
> > > > written?
> >
> > > > Keith
> >
> > > If you have access to those databases, you can make your own custom
> > > reports to show whatever you want. I have one set up to show
> > > executions per user and which reports they executed. Others include,
> > > most recent executions, total executions per report, etc. There is
> > > much you can do in terms of custom reporting if you use the
> > > ReportServer database that is created by default by SSRS.
> Here are the generic ones you can use. I posted them here to everyone
> will benefit.
> --Detailed
> select el.username,c.name,el.timestart,el.timeend
> executionlog el join
> catalog c on el.reportid=c.itemid
> order by timestart desc
> --Reports used by user
> select el.username,c.name, count(1)
> from executionlog el join
> catalog c on el.reportid=c.itemid
> group by el.username,c.name
> order by el.username,c.name
> --Usage by Report
> select c.name, count(1)
> from executionlog el join
> catalog c on el.reportid=c.itemid
> group by c.name
> order by count(1) desc
> --Recent usages per user per report
> select el.username,c.name,el.timestart,el.timeend
> from executionlog el join
> catalog c on el.reportid=c.itemid
> where username =''INSERT IT HERE'
> order by timestart desc
>
> Hope that helps! You can put them in a report if you don't like to
> see them in SSMS. By the way, it's a good way to track who has been
> using the reports you developed for them! You last name sounds
> Egyptian by the way.
>|||Since we're already into things you aren't supposed to do -
If you have a lot of reports and report execution records, look at the
indexing on the execution log file - by default, I don't think the
report ID is indexed (which seems odd, since it acts as a foreign key
to the catalog table...)

2012年3月22日星期四

Anyone else have errors when checking out SSIS package from SourceSafe or TFS?

I get errors when I check out an SSIS package from source control (both Source Safe and TFS) relating to the connection objects where I was not the original developer who checked it in. Is there a solution to this other than altering the connection login\password for every connection object in the package before deploying?

Yes, I do have problems as well when updating CVS.

For SSIS the solution is to use configuration files for your connections and Security / Protection Level property set to "DontSaveSensitive".

For Reporting services and cubes I am still a bit confused.

For reports, As soon as I open them in BIDS, I immediately edit the shared data sources to retype in the account and password. If I do not do it and go to the data page, it will loose all stored procedures parameters :-(

For Cubes, I also revisit the data sources as soon as I open the cube. Not doing so will let you work on your cube and deploy it, however you will not be able to browse, aggregate or process it.

Philippe

|||

The critical item here is to not have the Package Protection Level Property set to Encrypt[Sensitive or All]WithUserKey. That uses the developer's Windows login to encrypt information in the package, so no other developer will be able to work with it very easily, unless they log in with the same Windows account.

As Phillippe said, a common workaround is using a ProtectionLevel of "DontSaveSensitive" and configurations, which also makes it easier to deploy the packages in multiple environments. You could also use "EncryptSensitiveWithPassword" which will mean you have to enter a password for the package before running it, but it will be able to store the passwords inside the package, rather than depending on configurations. The best choice depends on your scenario.

Anybody help me !

When i use this connection string
"string myConnection = "Initial Catalog=Northwind;Data Source=localhost;Integrated Security=SSPI;";"
connect to database, i received massage :
----------
Server Error in '/asp_net/WebApplication1' Application.
Login failed for user 'TRANPHUC\ASPNET'.
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.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'TRANPHUC\ASPNET'.

Source Error:

Line 72: SqlCommand mySqlCommand = new SqlCommand(myInsertQuery); Line 73: mySqlCommand.Connection = mySqlClientSrvConn; Line 74: mySqlClientSrvConn.Open(); Line 75: //mySqlCommand.ExecuteNonQuery(); Line 76: mySqlCommand.Connection.Close();
------------
And when i use this string :
"string server_Con="server=localhost;uid=sa;pwd=;database=myData";
SqlConnection conn=new SqlConnection(server_Con);
conn.Open();
"
i received a massage:
-------
Server Error in '/asp_net/WebApplication1' Application.
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.
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.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.

Source Error:

Line 62: string server_Con="server=localhost;uid=sa;pwd=;database=myData"; Line 63: SqlConnection conn=new SqlConnection(server_Con); Line 64: conn.Open(); Line 65: } Line 66: public void InsertRow(string myConnection)

Source File: d:\asp_net\webapplication1\webform1.aspx.cs Line: 64
-------

What seem to be problem ? I can't connect to SQL server ! Help me !!!server=(local)

fyi.

And your sa.. has no password?|||check out www.connectionstrings.com

hth|||First case:
- you use thrusted autentication. This means you are using the same user account the web page runs under, to connect to your database (this is the ASP.NET user account). By default, it has no access to the SQL Server database. If you want it to have access, add it to the database logins

Second case:
- the password is blanc. Probably this is wrong...

2012年3月20日星期二

Any way to force collation/sort-order as part of the ODBC connection?

In the situation where the ODBC client app assumes a specific collation or, more specifically, a specific sort-order (case-sensitive vs. case-insensitive) but the collation/sort-order of the SQL Server Database and/or Table is unknown, is there a way to coerce the ODBC connection to always use a case-sensitive/case-insensitive sort order?

I believe case-sensitivity is a characteristic of the database you're connecting to. I don't know of a client setting for this.|||Collation is specified during server installation or db/table creation time. I don't believe you can change it on the fly via ODBC API.|||

Thanks Warren and Ricky. I suspected as much, just wasn't sure.

Any way to force collation/sort-order as part of the ODBC connection?

In the situation where the ODBC client app assumes a specific collation or, more specifically, a specific sort-order (case-sensitive vs. case-insensitive) but the collation/sort-order of the SQL Server Database and/or Table is unknown, is there a way to coerce the ODBC connection to always use a case-sensitive/case-insensitive sort order?

I believe case-sensitivity is a characteristic of the database you're connecting to. I don't know of a client setting for this.|||Collation is specified during server installation or db/table creation time. I don't believe you can change it on the fly via ODBC API.|||

Thanks Warren and Ricky. I suspected as much, just wasn't sure.

2012年3月6日星期二

Any one used Application Role before?

I'm using vb6 and i'm trying to create a connection string using an
application role.
If this is possible.
I don't know what the string should look like or whether i have put
everything in place.
I'm using Windows Authentication Mode. However I created a Application Role
and password for my app. Should i use this to connect to the db so i don't
have to use a userid? I shouldn't need a windows login to use an application
.
According to my book: "After the application has enabled and application
role, all permissions of the user are suspended, and only the permissions of
the role are enforced." Then it says later: "The best part is that all
activity is still audited with the users' login information."
Microsoft said at
http://msdn.microsoft.com/library/d...
ahx.asp :
"Use the Integrated Security keyword, set to a value of SSPI, to specify
Windows Authentication (recommended),
or
use the User ID and Password connection properties to specify SQL Server
Authentication.
Security Note When possible, use Windows Authentication. If Windows
Authentication is not available, prompt users to enter their credentials at
run time. Avoid storing credentials in a file. If you must persist
credentials, you should encrypt them with the Win32? crypto API. For more
information, see "The Crypto API Function" in the MSDN? Library at this
Microsoft Web site."
I don't can't make sense of both of these statements. How do they work
together or do they contradict? What should i do?
Here is my connection String
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=DatabaseName;Data Source=ServerName
I'm able to get it to work with my login using Windows Authenticity, but
everyone can't use my login name. I can't set permissions for all users
either.
Thanks!You still need both a login (SQL Server or Windows) and a user name in the d
atabase. Then you app
uses sp_setapprole to enter the application role. If you aren't familiar wit
h SQL Server security
architecture, read in Books Online on the topic (so you understand both the
login and the user name
concepts).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"jacob" <jacob@.discussions.microsoft.com> wrote in message
news:68E272F5-7FD8-4D8C-B4B6-F8F2AEC7A70F@.microsoft.com...
> I'm using vb6 and i'm trying to create a connection string using an
> application role.
> If this is possible.
> I don't know what the string should look like or whether i have put
> everything in place.
> I'm using Windows Authentication Mode. However I created a Application Rol
e
> and password for my app. Should i use this to connect to the db so i don't
> have to use a userid? I shouldn't need a windows login to use an applicati
on.
> According to my book: "After the application has enabled and application
> role, all permissions of the user are suspended, and only the permissions
of
> the role are enforced." Then it says later: "The best part is that all
> activity is still audited with the users' login information."
>
> Microsoft said at
> http://msdn.microsoft.com/library/d...r />
_0ahx.asp :
> "Use the Integrated Security keyword, set to a value of SSPI, to specify
> Windows Authentication (recommended),
> or
> use the User ID and Password connection properties to specify SQL Server
> Authentication.
>
> Security Note When possible, use Windows Authentication. If Windows
> Authentication is not available, prompt users to enter their credentials a
t
> run time. Avoid storing credentials in a file. If you must persist
> credentials, you should encrypt them with the Win32? crypto API. For more
> information, see "The Crypto API Function" in the MSDN? Library at this
> Microsoft Web site."
>
> I don't can't make sense of both of these statements. How do they work
> together or do they contradict? What should i do?
> Here is my connection String
> Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
> Info=False;Initial Catalog=DatabaseName;Data Source=ServerName
> I'm able to get it to work with my login using Windows Authenticity, but
> everyone can't use my login name. I can't set permissions for all users
> either.
> Thanks!
>

2012年2月25日星期六

Any limit on number of characters for FLATFILE connection ?

Any one knows for sure if there is any limit on the number of characters/letters that a FLATFILE connection manager can maximally have?

Is the following name (36 letters) valid ?

Code Snippet

<DTS:Property DTS:Name="ObjectName">Load Ready Output Connection Manager</DTS:Property>

Why do you ask?|||

my observation is that FLATFILE connection manager often failed on those long-name connections. I wonder if this is the reason causing packages run unstably. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1860426&SiteID=1

On another observation -- we have some PCs that have only one processor/CPU. SSIS packages run always successfully on those PCs. The unstable issue occur only on dual-processor or 4-processor PCs. I wonder if threading on >1 CPU causing any issue (although not theoretically). This again seems weird enough.

2012年2月16日星期四

any differents and advices about connection manager

first set up data source from solution explorer,then new connection from data source from connection managers

directly new ole db connection or ado.net connection etc by right clicking from connection managers

At the end doesn't matter how you created it; the connection manager will work exactly the same. The only diffrence is that with the first approach you only have to create a connection manager once and then can use it in multiple packages.

Rafael Salas

2012年2月11日星期六

ANSWER: Re: SQLEXPRESS Database Issue - Cannot open database ASPNETDB.MDF requested by the login

Hello Guys

This is my connection string

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>

I tried to research on the internet and i got a solution on changing the permissions for this database to enable user SystemName/ASPNET, but iam not able to access this ASPNETDB.MDF from SqlServer and if i go to server explorer in vs2005, i dint know where to chage the permissions.

Can anyone help me on this.

Thanks a lot

The ASPNET account needs to have access both to the server and to the ASPNETDB database. It seems you have granted server access to the account, but not database access.

To grant database access, connect to SQL Server using Management Studio and execute the following SQL statements:

use ASPNETDB
go
create user [SystemName\ASPNET]
go

Thanks
Laurentiu

|||

hi,

Thanks for your info abt the adding of aspnet account in the ASPNETDB Db.

I have created a website using VS 2005, and my SQL Server 2005 -STD Edition(NOT SQLEXPRESS). When ever i try to connect to the database i get this following error : Cannot open database ASPNETDB.MDF requested by the login, login failed. Login failed for user DOMAIN|USERNAME.

FYI, I have added my DOMAIN\username in the Security - Logins of the Database. I have also done the user mappings. That screen reads as follows :
1. Master Database -

Still I get this error. Please help me understand that whether any other permissions is required in the database for me.

Thanks

krans001

|||

hi,

I get this error when i try to execute a website just having a DEFAULT.aspx in which i have added a webpartsmanager. the personalization property of the webpartmanager is set to TRUE and USER. The following steps I did:

1. Installed the Microsoft SQL Server Management Studio 9.00.1399.00 ( STANDERD EDITION).

2. from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 installed the aspnet_regsql and followed the steps in installing the aspnetdb database.

In the usermappings i have provided permissions to me "DOMAIN\USERNAME" to the following db: 1. master 2. msdb 3. tempdb 4. aspnetdb

3. in the edit global configuration removed the USER INSTANCE=TRUE from the following
Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True

4. edited the machine.config file under the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
as
<add name="LocalSqlServer" connectionString="Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />

After doing this i tried to execute the website that i have created which holds a default.aspx page in which i have the webpartmanager. I just wanted to view this file in the browser. As soon as i do this i get this error.

Cannot open database "aspnetdb.mdf" requested by the login. The login failed. Login failed for user 'DOMAIN\USERNAME'.

Thanks in advance for the solution. Please help.. if anyone has a solution please send it immediately to my email id : sriranga.kr@.gmail.com

|||

hi

all i did was removed the .mdf in the connection string and run the same. It works like a charm..

great...

|||

hi sreeksdave

all you need to do is to change the following :

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>

AS

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; Initial Catalog= ASPNETDB" providerName ="System.Data.SqlClient"/>

and see how it works..

Do let me know..

Regards

scotty

|||I think this should be rather aspnetdb than aspnetdb.mdf, if you use a user instance you have to specify the filename but with attached database you can just type in the name of the database.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de
|||

Remember that both files ASPNETDB.MDF and aspnetdb_log.LDF are in a folder call App_Data in you project solution, just make sure that you give the right access privileges to your local MACHINE\ASPNET account

Hope this will help

|||

Hi all,

Thanks for all your contribution. It has worked for me and i have also helped few people.

Thanks & Regards

Raaj

|||

Hello Ranga,

Thanks a lot yar.

Hats off

ANSWER: Re: SQLEXPRESS Database Issue - Cannot open database ASPNETDB.MDF requested by the login

Hello Guys

This is my connection string

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>

I tried to research on the internet and i got a solution on changing the permissions for this database to enable user SystemName/ASPNET, but iam not able to access this ASPNETDB.MDF from SqlServer and if i go to server explorer in vs2005, i dint know where to chage the permissions.

Can anyone help me on this.

Thanks a lot

The ASPNET account needs to have access both to the server and to the ASPNETDB database. It seems you have granted server access to the account, but not database access.

To grant database access, connect to SQL Server using Management Studio and execute the following SQL statements:

use ASPNETDB
go
create user [SystemName\ASPNET]
go

Thanks
Laurentiu

|||

hi,

Thanks for your info abt the adding of aspnet account in the ASPNETDB Db.

I have created a website using VS 2005, and my SQL Server 2005 -STD Edition(NOT SQLEXPRESS). When ever i try to connect to the database i get this following error : Cannot open database ASPNETDB.MDF requested by the login, login failed. Login failed for user DOMAIN|USERNAME.

FYI, I have added my DOMAIN\username in the Security - Logins of the Database. I have also done the user mappings. That screen reads as follows :
1. Master Database -

Still I get this error. Please help me understand that whether any other permissions is required in the database for me.

Thanks

krans001

|||

hi,

I get this error when i try to execute a website just having a DEFAULT.aspx in which i have added a webpartsmanager. the personalization property of the webpartmanager is set to TRUE and USER. The following steps I did:

1. Installed the Microsoft SQL Server Management Studio 9.00.1399.00 ( STANDERD EDITION).

2. from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 installed the aspnet_regsql and followed the steps in installing the aspnetdb database.

In the usermappings i have provided permissions to me "DOMAIN\USERNAME" to the following db: 1. master 2. msdb 3. tempdb 4. aspnetdb

3. in the edit global configuration removed the USER INSTANCE=TRUE from the following
Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True

4. edited the machine.config file under the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
as
<add name="LocalSqlServer" connectionString="Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />

After doing this i tried to execute the website that i have created which holds a default.aspx page in which i have the webpartmanager. I just wanted to view this file in the browser. As soon as i do this i get this error.

Cannot open database "aspnetdb.mdf" requested by the login. The login failed. Login failed for user 'DOMAIN\USERNAME'.

Thanks in advance for the solution. Please help.. if anyone has a solution please send it immediately to my email id : sriranga.kr@.gmail.com

|||

hi

all i did was removed the .mdf in the connection string and run the same. It works like a charm..

great...

|||

hi sreeksdave

all you need to do is to change the following :

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>

AS

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; Initial Catalog= ASPNETDB" providerName ="System.Data.SqlClient"/>

and see how it works..

Do let me know..

Regards

scotty

|||I think this should be rather aspnetdb than aspnetdb.mdf, if you use a user instance you have to specify the filename but with attached database you can just type in the name of the database.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de|||

Remember that both files ASPNETDB.MDF and aspnetdb_log.LDF are in a folder call App_Data in you project solution, just make sure that you give the right access privileges to your local MACHINE\ASPNET account

Hope this will help

|||

Hi all,

Thanks for all your contribution. It has worked for me and i have also helped few people.

Thanks & Regards

Raaj

|||

Hello Ranga,

Thanks a lot yar.

Hats off

2012年2月9日星期四

ANSI settings on sql connection

I need to disable my ansi defaults, i could set it off on old asp, but i can't find reference or documentation anywhere about how to disable that on the sqlconnection

does anyone have a clue?Use the following statement first in the batch:

SET ANSI_DEFAULTS ON | OFF