Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Thursday, March 29, 2012

attach error in sql server express management studio

tried to attach a database in sse-ms, and for some reason the database name is changing to G:\someFolder\some\Folder\db.mdf, even tho i dont have a drive g:,

during "attach as" screens inside sse-ms, , ie attach>add> then select the database the mdf loction is what it is suppose to be ie C:\inetpub\wwwroot\app_data\chp11\wroxunited.mdf but the database name in the same screen shot is G:\someOtherFolderAndPath\wroxunited.mdf and the attach as is also the G:\someOtherFolderAndPath\wroxunited.mdf.

pretty confused, could use a clue, thanks

my data entry error above, the mdf locattion in the sse-ms attach area/screen is C:\inetpub\wwwroot\chp11\app_data\wroxunited.mdf, the rest of the intial post is ok tho,

anyone know if the log file (ldf) is causing this problem, chp11 came in a download form the wrox book site btw.

|||hmm found a work around, ie just deleted that database from within sse-ms, had a backup of the mdf so wasnt to worried, anyway after deleting the mdf that had the G:\WrongPath\db.mdf, i was able to attach the desired database and the mdf location, the database name and the attach as are now all correct, still kinda interested in what caused that but i am now, thanks people, have a lot to learn about sql and permission tho,

Sunday, March 25, 2012

Attach database

I have a database on a server and want to put it my local laptop that also has sql express. I attached the db, I see it in Management Studio but it does not show up in

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data so my app is not working correctely. How do I get the db to show up in the MSSWL\Data folder. I'm a bit confused.

Attaching a DB to SQL Server does not move the DB file. If you want the DB file to be in a particular directory then you need to move the file to that directory and then attach the DB file to SQL Server.

|||Ok I copied the db to the data folder and then attached it. I can connect but but I get an error "connot find server\instance.|||Then it has nothing to do with the directory of the file. That means that what "MSSWL\Data" is the name of a "named" instance of Sql Server. In that case you will need to configure\modify the application so it can connect to the Sql Server installed on your machine. As it looks now the application is trying to connect to the server from where you got the database file.|||

Need some more info here, when are you getting this error? If you can't find the server, you are not able to connect as you suggest. A few other questions:

What is the name of your instance?
Have you confirmed that it's running in SQL Configuration Manager?
Are you able to connect from the local computer? (i.e. where Sql Express is installed.)

Thanks for the additional informaiton.

Mike

|||

I fugured it out. I put the db and dblog in the data folder and then attached it..it works fine now.

Thanks much

|||

Good to hear it's working.

Mike

Attach an sql express edition database file to Sql Developer Edition instanse

Hi i have two version of SQL server express (with Visual Studio 2005) and developer edition i am trying to access an sql database file -created by the express edition integrated with Visual studio- using a developer edition instance can i just attach it and access it. and can i use BI and reporting services on that fileHi,

files created are by SQL Server Express are full featured data files. You can do everything with them that you do with those created by the othwer editions of SQL Server 2k5.

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de

Thursday, March 22, 2012

Atlernative to SQL Server Management Studio (i.e. garbage) . Any suggestions?

Folks I have recently had the misfortune of moving to SQL Server Managment Studio as per our upgrade to SQL 2005. There is no doubt that SQL Server Management is a major disappoinment compared to Enterprise manager.

The UI is the biggest disaster I have ever seen. Getting rid of the SQL Query analyzer tool was aTERRIBLE idea. The UI is buggy and unfriendly. It is a major POS. I hope someone in the SQL Dev team is listening / reading this post (hellooooo anybody homeee.....)

Now that I have vented my frustration ...

I wanted to know any atlernatives to the SQL Server Management Studio. There are plenty of 3rd Party tools out there I wanted to find out from this forum which popular 3rd Party tools are most developers using

Thanks for bearing with me.

If all you're after is query analyzer type functionality the free SQL Scripter fromhttp://www.sqlscripter.com/ is worth a look.

|||

There's a bunch of them. Some of them free, some paid. Do a google search and you will find them - SQL Edit, Toad etc.

|||

A colleague found this reference on line yesterday. None of us have tried it out, but it looks reasonable.

http://www.albahari.com/queryexpress.html

|||

That's quite odd actually, I use it every day, and have yet to really stumble across a major issue with it. It's nice having one single app to be able to do all the functionality of the old enterprise manager (Yuck!), query analyzer, and (insert some database project tool that wasn't shipped with 2000). It is however pretty memory hungry, so I feel sorry for those trying to develop on really low end machines.

Really, the only complaint I have with it, is that I wish it's "script to..." functionality for insert/update/delete would default to placing parameters in the placeholders, or even better generate a VB.NET/C# SqlCommand for it (including creating the parameters, with datatypes). Obviously a minor complaint considering that it isn't part of the VB.NET/C# programming tools.

Or perhaps you've overlooked that you can right click any database, choose "New query", and it opens a new tab that acts very similiar to the old query analyzer?

|||

Motley:

That's quite odd actually, I use it every day, and have yet to really stumble across a major issue with it. It's nice having one single app to be able to do all the functionality of the old enterprise manager (Yuck!), query analyzer, and (insert some database project tool that wasn't shipped with 2000). It is however pretty memory hungry, so I feel sorry for those trying to develop on really low end machines.

Really, the only complaint I have with it, is that I wish it's "script to..." functionality for insert/update/delete would default to placing parameters in the placeholders, or even better generate a VB.NET/C# SqlCommand for it (including creating the parameters, with datatypes). Obviously a minor complaint considering that it isn't part of the VB.NET/C# programming tools.

Or perhaps you've overlooked that you can right click any database, choose "New query", and it opens a new tab that acts very similiar to the old query analyzer?

Well after using enterprise manager for a very long time I liked the fact that Query Analyzer open by itself. I realize now that it simply is intergated into the application via tabbed windows. Some how I just do not like that structure of UI design. But that this the least of my issues. In addition to the issue you mentioned there are several other issues.

When I try to open 2 or more db connection in my object explorer items not appear in my summary window. For example if i click on stored procs under programmability it shows me there are x number of items on the top right by the main screen is blank.

Frequently I get invalid errors when trying to browse items in the object explorer (error says invalid index)

When I ask it to remember my password for object explorer or for a new query it does not remember the password the next time

Additionally the UI is poorly designed and does not flow very well from a usability standpoint. (I wish the SQL team would pay more attention to this and not take UI so lightly. UI it is an after thought for developers BUT it is the first impression you make on the user, and that IMO is crucial)

I thought that I was the only person on my team not liking SQL Mgmt studio but 4/5 develpers including our DBA are not at all happy with the product...

|||

Well it seems to me that you are using portions of the studio, that I don't think I've ever used. I don't think I've had the Object Explorer Details window open for more than 2 seconds ever.

As for the UI design, it's probably a matter of taste. The paned view (Objects on left, middle as a work area, right is properties, etc) is used by a number of differing products (Visual Studio, Dreamweaver, Photoshop, etc etc). I'd hardly call it a poorly designed UI, but it's a matter of opinion and what you are trying to accomplish with the tool.

|||

Motley:

Well it seems to me that you are using portions of the studio, that I don't think I've ever used. I don't think I've had the Object Explorer Details window open for more than 2 seconds ever.

As for the UI design, it's probably a matter of taste. The paned view (Objects on left, middle as a work area, right is properties, etc) is used by a number of differing products (Visual Studio, Dreamweaver, Photoshop, etc etc). I'd hardly call it a poorly designed UI, but it's a matter of opinion and what you are trying to accomplish with the tool.

Most of my problems are with SQL Mgmt Studio UI whose is very different from the Visual Studio's UI (I find VS2005 to be quite good actually). I did intially think it was a matter of personal taste but what can I can when 4/5 folks on my team have the same complains.

Believe you me I did not give up on this after a day of working with it. I have been using it for the last 2 months.

Tuesday, March 20, 2012

Association algorithm - Importance of a rule

Can anyone tell me, how the Business íntelligence Studio calculates the importance of a rule. I can't find the formula. I know some formulas, but the result in SQL Server is completly different.

Thanks!

For rules, the importance is calculated using the following formula:

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

An importance of 0 means there is no association between A and B. A positive

importance score means that the probability of B goes up when A is true. A

negative importance score means that the probability of B goes down when A

is true.

Below is an example of the correlation counts of donut and muffin derived

from a purchase database. Each cell value represents the number of

transactions. For example, 15 out of 100 transactions include a customer

purchasing both donuts and muffins.

Donut Not Donut Total

Muffin 15 5 20

Not muffin 75 5 80

Total 90 10 100

The support, probability, and importance of related itemsets and rules for

donut and muffin:

Support({Donut}) = 90

Support({Muffin}) = 20

Support ({Donut, Muffin}) = 15

Probability({Donut}) = 90/100 = 0.9

Probability({Muffin}) = 20/100 = 0.2

Probability({Donut, Muffin}) = 15/100 = 0.15

Probability(Donut|Muffin) = 15/20 = 0.75

Probability(Muffin|Donut) = 15/90 = 0.167

Importance({Donut, Muffin}) = 0.15/(0.2*0.9) = 0.833

Importance (Donut=>Muffin) = ln(Probability(Donut|Muffin)

/Probability(Donult|Not Muffin))= ln(0.8) = -0.223

Importance(Muffin=>Donut) = ln(Probability(Muffin|Donut)

/Probability(Muffin| Not Donut)) = ln(0.33) = -1.100

From the importance of the itemset {Donut, Muffin}, we can see Donut and

Muffin are negatively correlated; it is rather unlikely for someone who buys

a Muffin to also buy a Donut.

The Importance score is also known as Weight of Evidence (WOE).

|||

Hi,thanks a lot for your answer!

I recalculated the importance with your formulas and compared this with the results of the microsoft association algorithm.

Your formula for the importance is almost right, but it calculates the importance for

Muffin =>Donut and not Donut => Muffin

and it must be "log" and not "ln" !!

So at the end, this must be the right formula:

Importance(Muffin =>Donut) = log(Probability(Donut|Muffin) / Probability(Donut|Not Muffin) )

and for

Importance(Donut=> Muffin) = log(Probability(Muffin|Donut) / Probability(Muffin|Not Donut) )

UllaH

|||

Acutually at the beginning of Jamie's answer, the formular has been already there correctly:

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

Regards,

|||

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

It makes more sense to me if a and b are switched in the log function

Can some one point me to a Microsoft Research Paper "With all due respect to all" not just odiscussion Onions that discusses the theoretical background for calculating Rule importance?

Musa

|||Dear all,

I try to run the "donuts and muffins" example by using SQL 2005 BI but I didnot have the results as the formula you instruct (Importance (A=>B) = log ( p(a|b) / p(a|not b) ) ). Please explain me more detail.

probability importance
0.938 0.105302438 F3 = NotMuffin -> F2 = Donut








0.833 0.218055761 F2 = Donut -> F3 = NotMuffin


0.75 -0.105302438 F3 = Muffin -> F2 = Donut


0.5 -0.218055761 F2 = NotDonut -> F3 = NotMuffin


0.5 0.458637849 F2 = NotDonut -> F3 = Muffin

Thank you very much.
Your truthly,

Association algorithm - Importance of a rule

Can anyone tell me, how the Business íntelligence Studio calculates the importance of a rule. I can't find the formula. I know some formulas, but the result in SQL Server is completly different.

Thanks!

For rules, the importance is calculated using the following formula:

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

An importance of 0 means there is no association between A and B. A positive

importance score means that the probability of B goes up when A is true. A

negative importance score means that the probability of B goes down when A

is true.

Below is an example of the correlation counts of donut and muffin derived

from a purchase database. Each cell value represents the number of

transactions. For example, 15 out of 100 transactions include a customer

purchasing both donuts and muffins.

Donut Not Donut Total

Muffin 15 5 20

Not muffin 75 5 80

Total 90 10 100

The support, probability, and importance of related itemsets and rules for

donut and muffin:

Support({Donut}) = 90

Support({Muffin}) = 20

Support ({Donut, Muffin}) = 15

Probability({Donut}) = 90/100 = 0.9

Probability({Muffin}) = 20/100 = 0.2

Probability({Donut, Muffin}) = 15/100 = 0.15

Probability(Donut|Muffin) = 15/20 = 0.75

Probability(Muffin|Donut) = 15/90 = 0.167

Importance({Donut, Muffin}) = 0.15/(0.2*0.9) = 0.833

Importance (Donut=>Muffin) = ln(Probability(Donut|Muffin)

/Probability(Donult|Not Muffin))= ln(0.8) = -0.223

Importance(Muffin=>Donut) = ln(Probability(Muffin|Donut)

/Probability(Muffin| Not Donut)) = ln(0.33) = -1.100

From the importance of the itemset {Donut, Muffin}, we can see Donut and

Muffin are negatively correlated; it is rather unlikely for someone who buys

a Muffin to also buy a Donut.

The Importance score is also known as Weight of Evidence (WOE).

|||

Hi,thanks a lot for your answer!

I recalculated the importance with your formulas and compared this with the results of the microsoft association algorithm.

Your formula for the importance is almost right, but it calculates the importance for

Muffin =>Donut and not Donut => Muffin

and it must be "log" and not "ln" !!

So at the end, this must be the right formula:

Importance(Muffin =>Donut) = log(Probability(Donut|Muffin) / Probability(Donut|Not Muffin) )

and for

Importance(Donut=> Muffin) = log(Probability(Muffin|Donut) / Probability(Muffin|Not Donut) )

UllaH

|||

Acutually at the beginning of Jamie's answer, the formular has been already there correctly:

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

Regards,

|||

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

It makes more sense to me if a and b are switched in the log function

Can some one point me to a Microsoft Research Paper "With all due respect to all" not just odiscussion Onions that discusses the theoretical background for calculating Rule importance?

Musa

|||Dear all,

I try to run the "donuts and muffins" example by using SQL 2005 BI but I didnot have the results as the formula you instruct (Importance (A=>B) = log ( p(a|b) / p(a|not b) ) ). Please explain me more detail.

probability importance
0.938 0.105302438 F3 = NotMuffin -> F2 = Donut








0.833 0.218055761 F2 = Donut -> F3 = NotMuffin


0.75 -0.105302438 F3 = Muffin -> F2 = Donut


0.5 -0.218055761 F2 = NotDonut -> F3 = NotMuffin


0.5 0.458637849 F2 = NotDonut -> F3 = Muffin

Thank you very much.
Your truthly,

Association algorithm - Importance of a rule

Can anyone tell me, how the Business íntelligence Studio calculates the importance of a rule. I can't find the formula. I know some formulas, but the result in SQL Server is completly different.

Thanks!

For rules, the importance is calculated using the following formula:

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

An importance of 0 means there is no association between A and B. A positive

importance score means that the probability of B goes up when A is true. A

negative importance score means that the probability of B goes down when A

is true.

Below is an example of the correlation counts of donut and muffin derived

from a purchase database. Each cell value represents the number of

transactions. For example, 15 out of 100 transactions include a customer

purchasing both donuts and muffins.

Donut Not Donut Total

Muffin 15 5 20

Not muffin 75 5 80

Total 90 10 100

The support, probability, and importance of related itemsets and rules for

donut and muffin:

Support({Donut}) = 90

Support({Muffin}) = 20

Support ({Donut, Muffin}) = 15

Probability({Donut}) = 90/100 = 0.9

Probability({Muffin}) = 20/100 = 0.2

Probability({Donut, Muffin}) = 15/100 = 0.15

Probability(Donut|Muffin) = 15/20 = 0.75

Probability(Muffin|Donut) = 15/90 = 0.167

Importance({Donut, Muffin}) = 0.15/(0.2*0.9) = 0.833

Importance (Donut=>Muffin) = ln(Probability(Donut|Muffin)

/Probability(Donult|Not Muffin))= ln(0.8) = -0.223

Importance(Muffin=>Donut) = ln(Probability(Muffin|Donut)

/Probability(Muffin| Not Donut)) = ln(0.33) = -1.100

From the importance of the itemset {Donut, Muffin}, we can see Donut and

Muffin are negatively correlated; it is rather unlikely for someone who buys

a Muffin to also buy a Donut.

The Importance score is also known as Weight of Evidence (WOE).

|||

Hi,thanks a lot for your answer!

I recalculated the importance with your formulas and compared this with the results of the microsoft association algorithm.

Your formula for the importance is almost right, but it calculates the importance for

Muffin =>Donut and not Donut => Muffin

and it must be "log" and not "ln" !!

So at the end, this must be the right formula:

Importance(Muffin =>Donut) = log(Probability(Donut|Muffin) / Probability(Donut|Not Muffin) )

and for

Importance(Donut=> Muffin) = log(Probability(Muffin|Donut) / Probability(Muffin|Not Donut) )

UllaH

|||

Acutually at the beginning of Jamie's answer, the formular has been already there correctly:

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

Regards,

|||

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

It makes more sense to me if a and b are switched in the log function

Can some one point me to a Microsoft Research Paper "With all due respect to all" not just odiscussion Onions that discusses the theoretical background for calculating Rule importance?

Musa

|||Dear all,

I try to run the "donuts and muffins" example by using SQL 2005 BI but I didnot have the results as the formula you instruct (Importance (A=>B) = log ( p(a|b) / p(a|not b) ) ). Please explain me more detail.

probability

importance


0.938

0.105302438

F3 = NotMuffin -> F2 = Donut










0.833

0.218055761

F2 = Donut -> F3 = NotMuffin




0.75

-0.105302438

F3 = Muffin -> F2 = Donut




0.5

-0.218055761

F2 = NotDonut -> F3 = NotMuffin




0.5

0.458637849

F2 = NotDonut -> F3 = Muffin

Thank you very much.
Your truthly,

Association algorithm - Importance of a rule

Can anyone tell me, how the Business íntelligence Studio calculates the importance of a rule. I can't find the formula. I know some formulas, but the result in SQL Server is completly different.

Thanks!

For rules, the importance is calculated using the following formula:

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

An importance of 0 means there is no association between A and B. A positive

importance score means that the probability of B goes up when A is true. A

negative importance score means that the probability of B goes down when A

is true.

Below is an example of the correlation counts of donut and muffin derived

from a purchase database. Each cell value represents the number of

transactions. For example, 15 out of 100 transactions include a customer

purchasing both donuts and muffins.

Donut Not Donut Total

Muffin 15 5 20

Not muffin 75 5 80

Total 90 10 100

The support, probability, and importance of related itemsets and rules for

donut and muffin:

Support({Donut}) = 90

Support({Muffin}) = 20

Support ({Donut, Muffin}) = 15

Probability({Donut}) = 90/100 = 0.9

Probability({Muffin}) = 20/100 = 0.2

Probability({Donut, Muffin}) = 15/100 = 0.15

Probability(Donut|Muffin) = 15/20 = 0.75

Probability(Muffin|Donut) = 15/90 = 0.167

Importance({Donut, Muffin}) = 0.15/(0.2*0.9) = 0.833

Importance (Donut=>Muffin) = ln(Probability(Donut|Muffin)

/Probability(Donult|Not Muffin))= ln(0.8) = -0.223

Importance(Muffin=>Donut) = ln(Probability(Muffin|Donut)

/Probability(Muffin| Not Donut)) = ln(0.33) = -1.100

From the importance of the itemset {Donut, Muffin}, we can see Donut and

Muffin are negatively correlated; it is rather unlikely for someone who buys

a Muffin to also buy a Donut.

The Importance score is also known as Weight of Evidence (WOE).

|||

Hi,thanks a lot for your answer!

I recalculated the importance with your formulas and compared this with the results of the microsoft association algorithm.

Your formula for the importance is almost right, but it calculates the importance for

Muffin =>Donut and not Donut => Muffin

and it must be "log" and not "ln" !!

So at the end, this must be the right formula:

Importance(Muffin =>Donut) = log(Probability(Donut|Muffin) / Probability(Donut|Not Muffin) )

and for

Importance(Donut=> Muffin) = log(Probability(Muffin|Donut) / Probability(Muffin|Not Donut) )

UllaH

|||

Acutually at the beginning of Jamie's answer, the formular has been already there correctly:

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

Regards,

|||

Importance (A=>B) = log ( p(a|b) / p(a|not b) )

It makes more sense to me if a and b are switched in the log function

Can some one point me to a Microsoft Research Paper "With all due respect to all" not just odiscussion Onions that discusses the theoretical background for calculating Rule importance?

Musa

|||Dear all,

I try to run the "donuts and muffins" example by using SQL 2005 BI but I didnot have the results as the formula you instruct (Importance (A=>B) = log ( p(a|b) / p(a|not b) ) ). Please explain me more detail.

probability importance
0.938 0.105302438 F3 = NotMuffin -> F2 = Donut








0.833 0.218055761 F2 = Donut -> F3 = NotMuffin


0.75 -0.105302438 F3 = Muffin -> F2 = Donut


0.5 -0.218055761 F2 = NotDonut -> F3 = NotMuffin


0.5 0.458637849 F2 = NotDonut -> F3 = Muffin

Thank you very much.
Your truthly,
sql

Monday, March 19, 2012

Assisted Editor for stored procedures

I have been using SQL server management studio beta to manage my SQL server 2000 and to develop stored procedures. I was very happy with Assisted Editor, but it seems to be missing from final SQL server 2005 products (developer's version) Sad.

In object browser when I right-click on stored procedure and chose modify I used to get Assisted editor (described in http://msdn.microsoft.com/sql/learn/prog/tsql/default.aspx?pull=/library/en-us/dnsql90/html/tsqlqueries.asp). Now I get full Alter procedure statement (like in old Query analyzer) that can be edited and executed but not "real time" edited.

Is there any setting to get my beloved Assisted Editor back or Microsoft decided to get us rid of this user friendly addition?

Thanks and regards, Danko Jevtovic

The assisted editors functionality was cut from SQL Server 2005.

We had a lot of work left to make the feature correctly handle all the scenarios it needed to handle, and we ran out of time to fix it.

Saturday, February 25, 2012

AspX Page Connection Error using sqlserver

Dear i am using visual studio.net........ when i connect database (in sqlserver) using sqldataAdapter with datagrid in visual basic.net every thing work properly......... but when i use the same in asp.net then i get an error message on the resultant explorer page give below.

Server Error in '/studentData' Application.
------------------------

Login failed for user 'RAMIZSARDAR\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 'RAMIZSARDAR\ASPNET'.

Source Error:

Line 85: 'Put user code to initialize the page here
Line 86: Dim ds As New DataSet()
Line 87: SqlDataAdapter1.Fill(ds)
Line 88: DataGrid1.DataSource = ds.Tables(0)
Line 89: DataGrid1.DataBind()

Source File: c:\inetpub\wwwroot\studentData\WebForm1.aspx.vb Line: 87

Stack Trace:

[SqlException: Login failed for user 'RAMIZSARDAR\ASPNET'.]
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
studentData.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\studentData\WebForm1.aspx.vb:87
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0

Plz solve my problem and Reply me on ramiz_ch@.hotmail.com
Plz solve my problem and Reply me on ramiz_ch@.hotmail.com
Plz solve my problem and Reply me on ramiz_ch@.hotmail.com

Ramizwell, yes. if you use the same code in VB.NET/WIndows forms it'll run under the security context of the currently logged-in user. i.e. YOU.

under ASP.NET it runs by default as the ASP.NET guest account, MACHINENAME\ASPNET

you need to add ASPNET to the SQL Server permissions list, OR run ASP.NET as a different user, OR specify a SQL Server auth account in your connection string.

this question has been covered over and over in these forums. try the FAQ, if it's not in there I'll be shocked and amazed.

Friday, February 24, 2012

ASPNETDB.MDF in Visual Studio 2005 > ISP-hosted MS SQL

I am using (and making some enhancements to) the auto-generated ASPNETDB database in Visual Studio 2005. Now, I would like to deploy the application I have built (together with the data it contains and uses) to my ISP's ASP.NET 2.0 server and my freshly-purchased MS SQL database.

I haven't a clue how to do the above. Some other posts mention Entreprise Manager and Data Transformation Tools, but I really don't know where to start. I wonder if someone would be kind enough to go through each step in detail? Don't worry about sounding condescending... I really am a novice!

I apologise for the naivety of this message...!

Any and all help hugely appreciated!

Josh Ord-Hume

ANy response to your problem with ASPNETDB. I've got a similar problem and at this time it appears that you can't use the login controls in a remote-hosted environment. I'm starting to wish I had used ColdFusion.

Thanks,

Will

|||

In general, you can deploy the database by simply copying the mdf and ldf files. Shut down SQL Server and copy out the files.

Then the ISP can "attach" these to a new instance of SQL Server. This works as long as both versions of SQL Server are the same version.

Another common alternative is to backup the SQL Server database and then give the backup to the ISP and they can restore it to a new database on the SQL Server. To backup the database you can use Enterprise Manager GUI to do this, read the help topics on backup. You can use the BACKUP TSQL command to automate this as well (single TSQL command will create a backup of your database to a file). If you want to automate this and you do not care to understand the TSQL, you can turn on SQL Server Profiler, then backup the database using the GUI, then in SQL Profiler the TSQL command to backup the database will be logged and you can copy and paste this to backup the database again later using TSQL.

Most ISPs who host SQL Server will know how to restore a database from backup.

The only other issue you will have is setting up the proper connection string in your ASP.NET code. Ensure you use a configuration file for the connection string and this way the ISP can easily point the connection string to the proper SQL Server database.

ASPNETDB.MDF in Visual Studio 2005 > ISP-hosted MS SQL

I am using (and making some enhancements to) the auto-generated ASPNETDB database in Visual Studio 2005. Now, I would like to deploy the application I have built (together with the data it contains and uses) to my ISP's ASP.NET 2.0 server and my freshly-purchased MS SQL database.

I haven't a clue how to do the above. Some other posts mention Entreprise Manager and Data Transformation Tools, but I really don't know where to start. I wonder if someone would be kind enough to go through each step in detail? Don't worry about sounding condescending... I really am a novice!

I apologise for the naivety of this message...!

Any and all help hugely appreciated!

Josh Ord-Hume

ANy response to your problem with ASPNETDB. I've got a similar problem and at this time it appears that you can't use the login controls in a remote-hosted environment. I'm starting to wish I had used ColdFusion.

Thanks,

Will

|||

In general, you can deploy the database by simply copying the mdf and ldf files. Shut down SQL Server and copy out the files.

Then the ISP can "attach" these to a new instance of SQL Server. This works as long as both versions of SQL Server are the same version.

Another common alternative is to backup the SQL Server database and then give the backup to the ISP and they can restore it to a new database on the SQL Server. To backup the database you can use Enterprise Manager GUI to do this, read the help topics on backup. You can use the BACKUP TSQL command to automate this as well (single TSQL command will create a backup of your database to a file). If you want to automate this and you do not care to understand the TSQL, you can turn on SQL Server Profiler, then backup the database using the GUI, then in SQL Profiler the TSQL command to backup the database will be logged and you can copy and paste this to backup the database again later using TSQL.

Most ISPs who host SQL Server will know how to restore a database from backup.

The only other issue you will have is setting up the proper connection string in your ASP.NET code. Ensure you use a configuration file for the connection string and this way the ISP can easily point the connection string to the proper SQL Server database.

Sunday, February 19, 2012

ASPNET as db owner

Using Management Studio in SS 2005 on XP when I'm adding a user to a
database and I browse for objects (logins) I see MACHINENAME\ASPNET as a
choice and I am allowed to make ASPNET a user.
But in Server2003, MACHINENAME\ASPNET does not show up as a user.
Why? Can't aspnet be a user on server2003?
Regards,
Gary Blakely
Hello
Yes, I think you can't use machine\aspnet in windows 2003. And you may not
need it. aspnet process may run as network-services account, anonymous, or
something another according to your environment. It depends on that the
connection is remote or not, and the existence of active directory.
Why not first check the asp.net process's account executing arbitrary
asp.net file on your server? If you know it, you can grant the account. Or
alternatively you can impersonate the asp.net process first and grant the
impersonated account.
"GaryDean" <GaryDean@.newsgroups.nospam> wrote in message
news:ep3vihSMHHA.4928@.TK2MSFTNGP06.phx.gbl...
> Using Management Studio in SS 2005 on XP when I'm adding a user to a
> database and I browse for objects (logins) I see MACHINENAME\ASPNET as a
> choice and I am allowed to make ASPNET a user.
> But in Server2003, MACHINENAME\ASPNET does not show up as a user.
> Why? Can't aspnet be a user on server2003?
> --
> Regards,
> Gary Blakely
>
|||Hi Gary,
I know that you could not see MACHINENAME\ASPNET on your Windows Server
2003.
If I have misunderstood, please let me know.
Per my test, ASPNET is still existed as a user on Windows Server 2003.
Please check if the ASP.NET component had been installed on your computer.
In SQL Server Management Studio, I also can add it as a SQL Server login.
I would like to provide some links here for your reference:
How to configure the process identity for the ASPNET account in ASP.NET 1.1
when you use IIS 5 Isolation mode in IIS 6.0 on Windows Server 2003
http://support.microsoft.com/kb/895967/
Process and request identity in ASP.NET
http://support.microsoft.com/kb/317012/
FIX: ASP.NET does not work with the default ASPNET account on a domain
controller
http://support.microsoft.com/kb/315158
This should be related to IIS. If this issue perstis, it is recommended
that you have a new post at ASP.NET community for wider audience.
Please feel free to let me know if you have any other questions or concerns.
Charles Wang
Microsoft Online Community Support
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||Hi Gary,
Just check with you to see if you need further assistance on this issue. If
you have any other questions or concerns, please feel free to contact us.
We are always very glad for further assistance.
Have a good day!
Sincerely yours,
Charles Wang
Microsoft Online Community Support

ASPNET as db owner

Using Management Studio in SS 2005 on XP when I'm adding a user to a
database and I browse for objects (logins) I see MACHINENAME\ASPNET as a
choice and I am allowed to make ASPNET a user.
But in Server2003, MACHINENAME\ASPNET does not show up as a user.
Why? Can't aspnet be a user on server2003?
Regards,
Gary BlakelyHello
Yes, I think you can't use machine\aspnet in windows 2003. And you may not
need it. aspnet process may run as network-services account, anonymous, or
something another according to your environment. It depends on that the
connection is remote or not, and the existence of active directory.
Why not first check the asp.net process's account executing arbitrary
asp.net file on your server? If you know it, you can grant the account. Or
alternatively you can impersonate the asp.net process first and grant the
impersonated account.
"GaryDean" <GaryDean@.newsgroups.nospam> wrote in message
news:ep3vihSMHHA.4928@.TK2MSFTNGP06.phx.gbl...
> Using Management Studio in SS 2005 on XP when I'm adding a user to a
> database and I browse for objects (logins) I see MACHINENAME\ASPNET as a
> choice and I am allowed to make ASPNET a user.
> But in Server2003, MACHINENAME\ASPNET does not show up as a user.
> Why? Can't aspnet be a user on server2003?
> --
> Regards,
> Gary Blakely
>|||Hi Gary,
I know that you could not see MACHINENAME\ASPNET on your Windows Server
2003.
If I have misunderstood, please let me know.
Per my test, ASPNET is still existed as a user on Windows Server 2003.
Please check if the ASP.NET component had been installed on your computer.
In SQL Server Management Studio, I also can add it as a SQL Server login.
I would like to provide some links here for your reference:
How to configure the process identity for the ASPNET account in ASP.NET 1.1
when you use IIS 5 Isolation mode in IIS 6.0 on Windows Server 2003
http://support.microsoft.com/kb/895967/
Process and request identity in ASP.NET
http://support.microsoft.com/kb/317012/
FIX: ASP.NET does not work with the default ASPNET account on a domain
controller
http://support.microsoft.com/kb/315158
This should be related to IIS. If this issue perstis, it is recommended
that you have a new post at ASP.NET community for wider audience.
Please feel free to let me know if you have any other questions or concerns.
Charles Wang
Microsoft Online Community Support
========================================
==============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||Hi Gary,
Just check with you to see if you need further assistance on this issue. If
you have any other questions or concerns, please feel free to contact us.
We are always very glad for further assistance.
Have a good day!
Sincerely yours,
Charles Wang
Microsoft Online Community Support

ASPNET as db owner

Using Management Studio in SS 2005 on XP when I'm adding a user to a
database and I browse for objects (logins) I see MACHINENAME\ASPNET as a
choice and I am allowed to make ASPNET a user.
But in Server2003, MACHINENAME\ASPNET does not show up as a user.
Why? Can't aspnet be a user on server2003?
--
Regards,
Gary BlakelyHello
Yes, I think you can't use machine\aspnet in windows 2003. And you may not
need it. aspnet process may run as network-services account, anonymous, or
something another according to your environment. It depends on that the
connection is remote or not, and the existence of active directory.
Why not first check the asp.net process's account executing arbitrary
asp.net file on your server? If you know it, you can grant the account. Or
alternatively you can impersonate the asp.net process first and grant the
impersonated account.
"GaryDean" <GaryDean@.newsgroups.nospam> wrote in message
news:ep3vihSMHHA.4928@.TK2MSFTNGP06.phx.gbl...
> Using Management Studio in SS 2005 on XP when I'm adding a user to a
> database and I browse for objects (logins) I see MACHINENAME\ASPNET as a
> choice and I am allowed to make ASPNET a user.
> But in Server2003, MACHINENAME\ASPNET does not show up as a user.
> Why? Can't aspnet be a user on server2003?
> --
> Regards,
> Gary Blakely
>|||Hi Gary,
I know that you could not see MACHINENAME\ASPNET on your Windows Server
2003.
If I have misunderstood, please let me know.
Per my test, ASPNET is still existed as a user on Windows Server 2003.
Please check if the ASP.NET component had been installed on your computer.
In SQL Server Management Studio, I also can add it as a SQL Server login.
I would like to provide some links here for your reference:
How to configure the process identity for the ASPNET account in ASP.NET 1.1
when you use IIS 5 Isolation mode in IIS 6.0 on Windows Server 2003
http://support.microsoft.com/kb/895967/
Process and request identity in ASP.NET
http://support.microsoft.com/kb/317012/
FIX: ASP.NET does not work with the default ASPNET account on a domain
controller
http://support.microsoft.com/kb/315158
This should be related to IIS. If this issue perstis, it is recommended
that you have a new post at ASP.NET community for wider audience.
Please feel free to let me know if you have any other questions or concerns.
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi Gary,
Just check with you to see if you need further assistance on this issue. If
you have any other questions or concerns, please feel free to contact us.
We are always very glad for further assistance.
Have a good day!
Sincerely yours,
Charles Wang
Microsoft Online Community Support

Monday, February 13, 2012

Asp.net session has expired

Hi

I have designed reports using SQL Server Business Intelligence Development Studio tool (Sql Server reporting service). I have uploaded these reports to report manager.

I am displaying list of reports in tree view control, in my application. I am viewing report in Report Viewer control as per the report selection in tree view control, in same page. I am getting

Server Error in '/Application_name' Application or

  • ASP.NET session has expired error frequently while switching between various reports. Kindly provide me solution

  • .

  • Regards

    Sagayaraj Rayappan

    Are you reseting the Report Path each time they click on an item or are you saving the ExecutionID off? You will need to set the report path each time and not try and use the existed execution ID unless you can keep the session alive yourself.|||

    Thanks for the information. I am resetting Report Path each time when we clicked on an item. How to keep the session alive myself?. What is ExecutionID and how to use it?. Kindly give more details on this.

    |||

    You do not want to use the ExecutionID, I just wanted to rule that out first.

    Is the error occuring from within the report viewer or the entire page?

    |||This error occurs for entire page.|||Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.|||

    Hi i am also getting the same error.In my web page i refer the reportviewer and showing different reports.While navigate to different reports randomly i am getting this error.

    Can anyone suggest how to solve this?

    Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    [AspNetSessionExpiredException: ASP.NET session has expired]
    Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683
    Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553
    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Thanks in advance,Tom

    |||

    Daniel Reib wrote:

    Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.

    Hi I'm getting this error from with the ReportViewer control... I've tried to change the session timeout with the following code but it still times out earlier then the timeout value stated...? Is there some other attribute that needs to be changed also?

    rs -i sessionTimeout.rss -s http://localhost/reportserver -v timeout="6000"

    Many thanks in advance,

    Rob.

    |||

    Did you get a solution to this? The setting you have changed is on the reportserver, your problem is on the app that contains the reportviewer. Look at my post here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371287&SiteID=1&PageID=2

    |||

    Hi Mark,

    My issue was slightly different. Because of the nature of our reporting system, users may leave a report open for a long period of time (maybe hours) and then come back to it and attempt to run a drillthrouhgh report from where they left off.

    My solution to this was to increase the session timeout in the application pool which has worked well. I'm lucky I guess that the user base for the system is very small, i.e. no more than twenty users, so we should run into any resource issues (finger crossed).

    Regards,

    Rob.

  • Asp.net session has expired

    Hi

    I have designed reports using SQL Server Business Intelligence Development Studio tool (Sql Server reporting service). I have uploaded these reports to report manager.

    I am displaying list of reports in tree view control, in my application. I am viewing report in Report Viewer control as per the report selection in tree view control, in same page. I am getting

    Server Error in '/Application_name' Application or

  • ASP.NET session has expired error frequently while switching between various reports. Kindly provide me solution

  • .

  • Regards

    Sagayaraj Rayappan

    Are you reseting the Report Path each time they click on an item or are you saving the ExecutionID off? You will need to set the report path each time and not try and use the existed execution ID unless you can keep the session alive yourself.|||

    Thanks for the information. I am resetting Report Path each time when we clicked on an item. How to keep the session alive myself?. What is ExecutionID and how to use it?. Kindly give more details on this.

    |||

    You do not want to use the ExecutionID, I just wanted to rule that out first.

    Is the error occuring from within the report viewer or the entire page?

    |||This error occurs for entire page.|||Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.|||

    Hi i am also getting the same error.In my web page i refer the reportviewer and showing different reports.While navigate to different reports randomly i am getting this error.

    Can anyone suggest how to solve this?

    Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    [AspNetSessionExpiredException: ASP.NET session has expired]
    Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683
    Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553
    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Thanks in advance,Tom

    |||

    Daniel Reib wrote:

    Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.

    Hi I'm getting this error from with the ReportViewer control... I've tried to change the session timeout with the following code but it still times out earlier then the timeout value stated...? Is there some other attribute that needs to be changed also?

    rs -i sessionTimeout.rss -s http://localhost/reportserver -v timeout="6000"

    Many thanks in advance,

    Rob.

    |||

    Did you get a solution to this? The setting you have changed is on the reportserver, your problem is on the app that contains the reportviewer. Look at my post here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371287&SiteID=1&PageID=2

    |||

    Hi Mark,

    My issue was slightly different. Because of the nature of our reporting system, users may leave a report open for a long period of time (maybe hours) and then come back to it and attempt to run a drillthrouhgh report from where they left off.

    My solution to this was to increase the session timeout in the application pool which has worked well. I'm lucky I guess that the user base for the system is very small, i.e. no more than twenty users, so we should run into any resource issues (finger crossed).

    Regards,

    Rob.

  • Asp.net session has expired

    Hi

    I have designed reports using SQL Server Business Intelligence Development Studio tool (Sql Server reporting service). I have uploaded these reports to report manager.

    I am displaying list of reports in tree view control, in my application. I am viewing report in Report Viewer control as per the report selection in tree view control, in same page. I am getting

    Server Error in '/Application_name' Application or

  • ASP.NET session has expired error frequently while switching between various reports. Kindly provide me solution

  • .

  • Regards

    Sagayaraj Rayappan

    Are you reseting the Report Path each time they click on an item or are you saving the ExecutionID off? You will need to set the report path each time and not try and use the existed execution ID unless you can keep the session alive yourself.|||

    Thanks for the information. I am resetting Report Path each time when we clicked on an item. How to keep the session alive myself?. What is ExecutionID and how to use it?. Kindly give more details on this.

    |||

    You do not want to use the ExecutionID, I just wanted to rule that out first.

    Is the error occuring from within the report viewer or the entire page?

    |||This error occurs for entire page.|||Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.|||

    Hi i am also getting the same error.In my web page i refer the reportviewer and showing different reports.While navigate to different reports randomly i am getting this error.

    Can anyone suggest how to solve this?

    Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    [AspNetSessionExpiredException: ASP.NET session has expired]
    Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683
    Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553
    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Thanks in advance,Tom

    |||

    Daniel Reib wrote:

    Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.

    Hi I'm getting this error from with the ReportViewer control... I've tried to change the session timeout with the following code but it still times out earlier then the timeout value stated...? Is there some other attribute that needs to be changed also?

    rs -i sessionTimeout.rss -s http://localhost/reportserver -v timeout="6000"

    Many thanks in advance,

    Rob.

    |||

    Did you get a solution to this? The setting you have changed is on the reportserver, your problem is on the app that contains the reportviewer. Look at my post here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371287&SiteID=1&PageID=2

    |||

    Hi Mark,

    My issue was slightly different. Because of the nature of our reporting system, users may leave a report open for a long period of time (maybe hours) and then come back to it and attempt to run a drillthrouhgh report from where they left off.

    My solution to this was to increase the session timeout in the application pool which has worked well. I'm lucky I guess that the user base for the system is very small, i.e. no more than twenty users, so we should run into any resource issues (finger crossed).

    Regards,

    Rob.

  • ASP.NET ReportViewer Problems

    Hi,
    I am using the web version of the ReportViewer control in a Visual
    Studio 2005 Beta 2 project. We have an Oracle database, and SQL
    Reporting Services. I have been using the ReportViewer in local mode
    therefore.
    But I have a problem with printing/output of reports. At the moment
    the ReportViewer will only export to Excel, which is the only way to
    get a report to print.
    Is there a way to get a report to output all pages of a report at once
    using the viewer. Then users could simply print the web page to print
    out the report without having to export to Excel.
    Is there something I am doing wrong? Is there a way to export a report
    programmatically somehow? (Remembering I am using local mode. Should I
    really be using the SQL Reporting Services server? If so can I using
    the SQL 2005 Express tool?).
    Thanks for any help,
    Regards,
    RichardSorry, I meant to say we have an Oracle database and *no* SQL Reporting
    services.
    Thanks,
    Richard|||Now some time has passed, it would be worth trying the release version as it
    has lots of improvements over the beta 2 version.

    ASP.Net on Window server 2000 - database access

    Hi

    I have problem in configuring my web project on Window server 2000. I have created the web application using Visual Studio 2005 tools. I have configured Window server 2000 with the .Net Framework Version 2.0. I can access the page which doesn't have database access.

    The connection string in the web config file is giving me the problem that connection string can't be found. Does any one have any idea?

    My database connection string looks like this.

    <

    connectionStrings>

    <

    addname="etzAusBldConnectionString"connectionString="Data Source=CASCADE;Initial Catalog=etzAusBldBaseData1;User ID=sa1;Password=****"providerName="System.Data.SqlClient" />

    </

    connectionStrings>

    Moe

    Well, how are you looking for it?