Tuesday, March 27, 2012
attach Database Error -very URGENT
I got a probelm with attaching the database. I hv Database Name called "ABC". it is working fine. (contain MDF,LDF files)
I got new BackFiles from CLient. They sent MDF and LDF Files. But i could't able to attach the database i got the following error while attaching the databse.
Server: Msg 5173, Level 16, State 2, Line 1
Cannot associate files with different databases.
I tried with the following query
EXEC sp_attach_db @.dbname = N'ABC',
@.filename1 = N'C:\DataBase\ABC.mdf',
@.filename2 = N'C:\DataBase\ABC_log.ldf'
i Tried with EnterPrise Manager also i got the same error. you can see the attachment file to view the ERROR.
Please Help me .Urgently...http://support.microsoft.com/default.aspx?scid=kb;EN-US;281122 to resolve the issue.
Tuesday, March 20, 2012
associated xsl file will not format working xml template
format (--> HTML) a simple xml query specified in a template file.
I do not get any message in the browser (except: page not found) or in
the Windows event viewer.
I am able to execute a URL query with no problems.
I am able to execute the template query.
When I specifiy the xsl file, no information appears.
I would like to know where/how this type of problem can be debugged.
I would be happy to post the short xml and xsl file here if that could
illuminate this problem.
TIA.
Regards..
"Relishguy" <dbsearch04@.yahoo.com> wrote in message
news:84e6fe3d.0406140716.15af040a@.posting.google.c om...
[snip]
> I would like to know where/how this type of problem can be debugged.
The best way to debug this type of problem is to debug the xsl since that is
usually where the problem is. You can post it here if you want and I would
also suggest saving an XML file that has the results from your query and
then linking the stylesheet to it and opening it in IE.
Bryant
sql
Monday, March 19, 2012
Assistance on implementing Data Mining
Hi,
I'm new to SQL Server and data mining, so please forgive my ignorance...
I'm working on a project which requires me to use the datamining provided by SQL Server 2005. I've a table for which i want to predict the values in a table (Encyclopedia)
The table contains the following fields:
Component
Major Attribute
Minor Attributes(which is basically a list of CSV for attributes in no particular order)
I want to predict the component if i enter the attributes ..... my questions:
1. Should i change the table structure in any way to assist in data mining?
2. What model would be preferrable?
3. If i'm using the model will it extend to the data added to the table automatically or do i have to update it regularily.
I need to submit the project by 20th... and i'm not even started. I tried a lot on my own..... but couldn't get anywhere without definitive assistance from anyone.
Please help
Thanks and Regards,
Sundeep Singh
You should probably use a nested table which contains multiple rows for each of the Minor Attributes associated with a Component - so your mining model might look something like this:
CREATE MINING MODEL CompPredict(
CaseID LONG KEY,
Component TEXT DISCRETE PREDICT,
MajorAttribute TEXT DISCRETE,
MinorAttributes TABLE(
MinorAttribute TEXT KEY
)
)
USING Microsoft_Decision_Trees
If you add data to the source database that you process your model from, you will need to reprocess the model either manually or using scheduled job or Integration Service package.
|||Hi Raman
Thankx for ur answer..................
I converted the tables as you said
TableComponent(ComponentID, BodyPart,MajorAttribute,ComponentName)
TableMinor(ComponentID,MinorAttribute)
Used TableComponent as Case(ComponentID as Key), and TableMinor as Nested(MinorAttribute as key)
I tried predicting Component Name using BodyPart, MajorAttribute and Minor Attribute as Input.....
I tried it using Microsoft Decision trees and it generated only single node for it.........
What do you think can be the problem....................
Moreover i need to generate the association rules from the data but again it is generating no rules from the given data...........
Thanks
Sundeep Singh
|||How big is your data set? Have you tried tweaking the algorithm parameters (lower COMPLEXITY_PENALTY, MINIMUM_LEAF_CASES, MINIMUM_SUPPORT)?|||Hi,
I tried to reduce the parameters and got some rules... but there is a problem. the association rules that are being generated use a single minorAtt at a time.
I mean that in the entire collection there is not one that uses two MinorAttributes to Predict the column.
And can you please help me with the query... assuming that i have a major symptom and some minor symptoms and i want to predict what Components they can be for along with the probability of correctness..
Thanks
Sundeep Singh
|||Hi,
played with the algo params and it worked.. i don't know how as yet.. but i got some rules with more than one minor symptom.
But the problem with the query remains... somebody please help!!!!!!!! only four days left for submission....
Thanks
Sundeep Singh
|||You can do a SELECT COUNT(*) FROM TableMinor and SELECT COUNT(DISTINCT ComponentID) FROM TableMinor. If these numbers are the same, than you have one minor/component, otherwise you do have multiple minors/component and everything's OK (except maybe your data).
If you don't have multiple minors/component, you don't need a nested table. From the initial description it seemed like there were.
|||The number of minor are more than one, but the query that i asked for was to predict the component when i enter the minor and major attributes along with the probability of match...
Supposing that i have named my model as Encyclopedia.
Thanks
|||Try this to get the top 3 predictions for component:SELECT FLATTENED
TopCount(PredictHistogram(Component), $AdjustedProbability, 3)
FROM [ComponentPredictModel]
NATURAL PREDICTION JOIN
(SELECT 'xxx' as MajorAttribute,
(SELECT ( SELECT 'x' AS Minor UNION
SELECT 'y' AS Minor )
AS [MinorAttributes])
) AS t
Sunday, March 11, 2012
Assigning extra information to all database table fields
I'm an experienced desktop app programmer, but fairly new to database programming. I'm working with C#/SQL right now. I understand the concept of a lookup table, as in storing a two-character state (such as CA) in a field in one table, and then being able to get the full state name (such as California) from a second table:
Table: Address
AddressID int <PK>
StateCode char(2) <FK>
...
Table: State
StateCode char(2) <PK>
StateName varchar(25)
My question: is there some similar way to be able to provide just about every field of every table with a means of holding common, extra information? For instance, let's say I wanted to store, say, an extended name and some special code with every field in three tables. As in this simplistic example:
Table: A
Field1 int
Field2 varchar(20)
Table: B
Field1 bit
Field2 int
Table: C
Field1 int
Table: ExtraInfo
LongName varchar(50)
TypeCode int
If I wanted to be able to have the information in the ExtraInfo table associated with each field in Table A, Table B and Table C, how would I do that?
Thanks!
I'm not sure that I understand exactly what you are trying to do.
Might you want a table "ExtraInfo" with columns
Table_Name varchar(50),
Column_Name varchar(50),
Extra_Info varchar(50),
TypeCode int
Maybe Extra_Info could be something like a column description?
Is that the right idea?
Dan
|||I'm not totally clear about the concept. Perhaps looking in Books Online for 'Extended Properties' would prove to be helpful.|||Just to add my 3 cents worth to the interrogation, are you wanting to store metadata? Or are you trying to store information for use by other users? That would make a big difference.
Also, if you are trying to be generic, like having a base class, it is seldom a good idea, even if it seems like a good idea at this point. SQL is centered around implementing a specific design, not genericness (genericism, genericisticy?)
|||Louis -
Yes, metadata. No user-entered information.
And no, I'm not looking to be generic.
The information would be very specific. As in, say, being able to provide every field of any (or all) tables with a string title (that differs from the field's column name). Or any other bit of information that might be useful for all fields. For the sake of a solution, ignore the exact type of information (metadata) that's to be tracked. It could be anything. Let's say I want to assign one of three colors (red, yellow or green) to every field of every table. The data can be anything. I just want to know how I could store some common, non-generic data to every field. To, in a sense, make every field of any table a structure (to put it in app programming terms). It seems like there should be some standard way of doing this. It's probably my desktop app programming background limiting my explanation.
Thanks!
|||
DanR1 -
I think this might be a solution. I'll look into it. If the one table had TableName and ColumnName fields as you suggest, then it could have any other fields for the metadata, and the TableName and ColumnName fields provide a way back to each particular field of any table. That might work. I'm not sure if that's a "legitimate" solution as far as database design goes (as mentioned, I'm not a big DB programmer), but it is certainly on the right track for what I'm trying to do.
Thanks
|||Arnie -
I've googled, searched Safari Online, everything. Nothing.
From a programming perspective (which I think in terms of), this is easy. For instance, in OOP there could be a base class Animal that keeps track of an animal's color. Then, any classes of particular animals could inherit the Animal class (and thus each animal could hold color information) as well as keep track of information particular to that animal:
class Animal
{
int color;
}
class Dog : Animal
{
bool chasesCars;
}
class Pig : Animal
{
bool likesMud;
}
The above, in DB terms, would be a table Dog with one bit field and a table Pig that also had a bit field. Besides that one piece of information though, each of these fields could also keep track of a color. That's the kind of "extra" information I'm trying to tie to each field.
Thanks
|||It sounds like you just need to add additional columns to the tables. Such as [DescriptiveTitle], [DefaultValue], [MyMetaData], etc.
It is very common for additional metadata columns to be added to tables. For example, in databases I create, all tables have columns [InsertedBy], InsertedDate], [ChangeBy], [ChangeDate]. These columns are rarely used by applications, but are for administrative and auditing purposes. You have different needs, but the solution is similar.
Creating a 'metadata' table seems overly cumbersome and frought with peril.
|||Dan Parks,
I'd have to agree with Arnie that it sounds like the database solution for what you are wanting to do would be to add columns to the table, and allow them to have NULL entries for cases where you did not set a value (such as the COLOR of your DOG or PIG).
Although it would be possible to use the Binary column type (I don't remember the exact name for it, but it is what allows JPG, BMP, etc., data to be stored in a table -- almost always by storing a LINK to the place where the database actually stores the large binary data values -- almost never in the row of data in the table) and store therein a Structure such as you might use in C++, you would then have to write your own procedures to unpack that structure if you want to search it for certain values, or if you want to change certain values. That seems to be avoiding many of the benefits of having a database with your ability to add columns as needed, and to JOIN tables on columns, and search for values in columns, etc.
Before I became involved with SQL and databases most of my programming had been in FORTRAN. Our data were stored in sorted fixed-record-length data files. We would have to perform binary searches to find the records we needed to perform a computation. We would have to create our own accumulator variables to sum quantities. If a coworker wanted to find all entries wherein a data column had a certain value, we would have to write a special program to search the entire file for that value, and display the records where it was found. If he wanted to search for multiple potential values in that column, we would have to write the program to allow for multiple entries. Now it is so much easier:
select *
from TABLE
where COLUMN1 in (value1, value2, value3)
order by 1,2,3,4,5
SQL has made much of my earlier programming rather trivial in terms of the SQL necessary to perform the same tasks. And because of the simpler SQL code (simpler to write, simpler to maintain) we were able easily to improve the computations to deal with nuances in the data that seemed awfully ugly in the FORTRAN solution. (Imagine a complex WHERE clause, relying on a number of subqueries of the same data -- easy in SQL, rather ugly in FORTRAN.)
Dan
Thursday, March 8, 2012
Assigning DATEADD results to variable
several DATEADD calculations to variables. The problem I am having is
illustrated by the following code:
----
declare @.LastOfRecMo datetime
declare @.FirstOfNextMo datetime
declare @.LastOfNextMo datetime
declare @.AprilFirst datetime
select @.AprilFirst = '4/1/2005'
select @.LastOfRecMo = '3/31/2005'
select @.FirstOfNextMo = DATEADD(d, 1, @.LastOfRecMo)
select @.LastOfNextMo = DATEADD(d, -1, DATEADD(m, 1, @.AprilFirst))
select LastOfRecMo = @.LastOfRecMo,
FirstOfNextMo = @.FirstOfNextMo,
FirstOfNextMo2 = DATEADD(d, 1, @.LastOfRecMo),
LastOfNextMo = @.LastOfNextMo
----
I would expect the @.FirstOfNextMo variable to be set to '4/1/2005', but as
you can see by running the above code, the result, returned as FirstOfNextMo
,
is always NULL, although FirstOfNextMo2 returns the correct date using the
identical calculation. Interestingly, @.LastOfNextMo works correctly with a
much more complex DATEADD calculation.
What's going on here?Sheldon Penner wrote:
> I am working on a stored procedure that requires saving the results of
> several DATEADD calculations to variables. The problem I am having is
> illustrated by the following code:
> ----
> declare @.LastOfRecMo datetime
> declare @.FirstOfNextMo datetime
> declare @.LastOfNextMo datetime
> declare @.AprilFirst datetime
> select @.AprilFirst = '4/1/2005'
> select @.LastOfRecMo = '3/31/2005'
> select @.FirstOfNextMo = DATEADD(d, 1, @.LastOfRecMo)
> select @.LastOfNextMo = DATEADD(d, -1, DATEADD(m, 1, @.AprilFirst))
> select LastOfRecMo = @.LastOfRecMo,
> FirstOfNextMo = @.FirstOfNextMo,
> FirstOfNextMo2 = DATEADD(d, 1, @.LastOfRecMo),
> LastOfNextMo = @.LastOfNextMo
> ----
> I would expect the @.FirstOfNextMo variable to be set to '4/1/2005',
> but as you can see by running the above code, the result, returned as
> FirstOfNextMo, is always NULL, although FirstOfNextMo2 returns the
> correct date using the identical calculation. Interestingly,
> @.LastOfNextMo works correctly with a much more complex DATEADD
> calculation.
> What's going on here?
First thing is the date format you are using is not portable. The only
portable formats are:
yyyymmdd
yyyy-mm-ddThh:mm:ss.mmm(no spaces)
But your code works fine for me with the bad date format. Try changing
the date format and see what you get.
David Gugick
Imceda Software
www.imceda.com|||I'm baffled! I worked on this problem for hours yesterday, restarted the SQ
L
server, rebooted the computer, and could not get the code to run properly.
This morning, after reading your post, I tried again and the problem has gon
e
away. Thank you for your response.
"David Gugick" wrote:
> Sheldon Penner wrote:
> First thing is the date format you are using is not portable. The only
> portable formats are:
> yyyymmdd
> yyyy-mm-ddThh:mm:ss.mmm(no spaces)
> But your code works fine for me with the bad date format. Try changing
> the date format and see what you get.
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||I thought the problem was solved, but it's not. DATEADD behaves erratically
when given a variable as an argument. The code I sent you yesterday
inexplicably runs correctly now, but the following example, closer to what I
am actually using, does not:
----
declare @.ReceiverDate datetime
declare @.FirstOfRecMo datetime
declare @.LastOfRecMo datetime
declare @.FirstOfNextMo datetime
declare @.LastOfNextMo datetime
-- Receiver Date is 3/27/2005
set @.ReceiverDate = '20050327'
-- First Day of Receiver Month
select @.FirstOfRecMo = cast(cast(Year(@.ReceiverDate) as char(4)) + right('0'
+ cast(Month(@.ReceiverDate) as varchar(2)), 2) + '01' as datetime)
select myVar = @.FirstOfRecMo,
calc = cast(cast(Year(@.ReceiverDate) as char(4)) + right('0' +
cast(Month(@.ReceiverDate) as varchar(2)), 2) + '01' as datetime)
-- First Day of Month after Receiver Month
select @.FirstOfNextMo = DATEADD(m, 1, @.FirstOfRecMo)
select myVar = @.FirstOfNextMo,
calc = DATEADD(m, 1, @.FirstOfRecMo)
-- First Day of Receiver Month
select @.LastOfRecMo = DATEADD(d, -1, @.FirstOfNextMo)
select myVar = @.LastOfRecMo,
calc = DATEADD(d, -1, @.FirstOfNextMo)
-- Last Day of Month after Receiver Month
select @.LastOfNextMo = DATEADD(d, -1, DATEADD(m, 1, @.FirstOfNextMo))
select myVar = @.LastOfNextMo,
calc = DATEADD(d, -1, DATEADD(m, 1, @.FirstOfNextMo))
----
I entered the Receiver Date in the format you recommended, although in the
actual application, the date is pulled from the database.
The first calculation correctly returns '3/1/2005' in both the myVar and
calc columns, indicating that '3/1/2005' was successfully assigned to the
variable @.FirstOfRecMo.
The second calculation, however, fails to assign the results of the DATEADD
function to @.FirstOfNextMo. It returns NULL in the myVar column, although
the calc column correctly returns '4/1/2005'.
The other two calculations return NULL in both columns.
Is the problem with my SQL Server, perhaps? Does the code run correctly on
your computer?
Your help is very much appreciated.
"David Gugick" wrote:
> Sheldon Penner wrote:
> First thing is the date format you are using is not portable. The only
> portable formats are:
> yyyymmdd
> yyyy-mm-ddThh:mm:ss.mmm(no spaces)
> But your code works fine for me with the bad date format. Try changing
> the date format and see what you get.
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||This is very creepy!
When I type the code into Query Analyzer, it produces the errors I described
in my previous messages. However, if I copy the code to this newsgroup, pos
t
it, then copy the code from the post and paste it into Query Analyzer, it
runs properly.
Evidently, SQL Server is messing with my code. Any thoughts?
"Sheldon Penner" wrote:
> I thought the problem was solved, but it's not. DATEADD behaves erratical
ly
> when given a variable as an argument. The code I sent you yesterday
> inexplicably runs correctly now, but the following example, closer to what
I
> am actually using, does not:
> ----
> declare @.ReceiverDate datetime
> declare @.FirstOfRecMo datetime
> declare @.LastOfRecMo datetime
> declare @.FirstOfNextMo datetime
> declare @.LastOfNextMo datetime
> -- Receiver Date is 3/27/2005
> set @.ReceiverDate = '20050327'
> -- First Day of Receiver Month
> select @.FirstOfRecMo = cast(cast(Year(@.ReceiverDate) as char(4)) + right('
0'
> + cast(Month(@.ReceiverDate) as varchar(2)), 2) + '01' as datetime)
> select myVar = @.FirstOfRecMo,
> calc = cast(cast(Year(@.ReceiverDate) as char(4)) + right('0' +
> cast(Month(@.ReceiverDate) as varchar(2)), 2) + '01' as datetime)
> -- First Day of Month after Receiver Month
> select @.FirstOfNextMo = DATEADD(m, 1, @.FirstOfRecMo)
> select myVar = @.FirstOfNextMo,
> calc = DATEADD(m, 1, @.FirstOfRecMo)
> -- First Day of Receiver Month
> select @.LastOfRecMo = DATEADD(d, -1, @.FirstOfNextMo)
> select myVar = @.LastOfRecMo,
> calc = DATEADD(d, -1, @.FirstOfNextMo)
> -- Last Day of Month after Receiver Month
> select @.LastOfNextMo = DATEADD(d, -1, DATEADD(m, 1, @.FirstOfNextMo))
> select myVar = @.LastOfNextMo,
> calc = DATEADD(d, -1, DATEADD(m, 1, @.FirstOfNextMo))
> ----
> I entered the Receiver Date in the format you recommended, although in the
> actual application, the date is pulled from the database.
> The first calculation correctly returns '3/1/2005' in both the myVar and
> calc columns, indicating that '3/1/2005' was successfully assigned to the
> variable @.FirstOfRecMo.
> The second calculation, however, fails to assign the results of the DATEAD
D
> function to @.FirstOfNextMo. It returns NULL in the myVar column, although
> the calc column correctly returns '4/1/2005'.
> The other two calculations return NULL in both columns.
> Is the problem with my SQL Server, perhaps? Does the code run correctly o
n
> your computer?
> Your help is very much appreciated.
> "David Gugick" wrote:
>
Saturday, February 25, 2012
AspNetHostingPermission and subscriptions
Since a week the subsriptions are not working anymore.
I'm getting following status error in the subscription page:
Error: Request for the permission of type
System.Web.AspNetHostingPermission, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed
The reportserver is using forms authentication.
The report is working fine.
The subscription in datadriven and gives input for a parameter(the data
query is working fine).
There is a subscription for file export (pdf), email and print. All 3
subscriptions gives the same error.
There is no event about this error.
Thanks for any help
BartHi Bart,
Thank you for your post.
Would you please try to download the following config file and replace your
original file?
http://download.microsoft.com/download/9/8/C/98CEED6D-3489-4504-BBB5-586B630
01CE0/887787.exe
To replace the .config files with new versions that are available from the
Microsoft Download Center, follow these steps:
Important When you replace your .config files, you return to a default
installation. Any changes that you have made to the configuration files
will be lost.
1. Locate the following two files on the computer that is running Microsoft
Internet Information Services (IIS) and the Reporting Services components:
? %ProgramFiles%\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\rssrvpolicy.config
? %ProgramFiles%\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager\rsmgrpolicy.config
2. Rename the files in step 1 to Rssrvpolicy.old and Rsmgrpolicy.old.
3. Download the .config files from the following link:
http://download.microsoft.com/download/9/8/C/98CEED6D-3489-4504-BBB5-586B630
01CE0/887787.exe
4. Expand the files from the package to your local drive.
5. Replace your current .config files with the .config files from the
package.
6. Restart the IIS services by using IIS Manager.
Here is the article for your reference.
887787 You may receive error messages from Reporting Services after you
install the ASP.NET ValidatePath Module
http://support.microsoft.com/default.aspx?scid=kb;EN-US;887787
Hope this will be helpful.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Wei,
Thanks for your help.
I've got the same error message.
What else can I try?
Thanks
Bart
"Wei Lu" wrote:
> Hi Bart,
> Thank you for your post.
> Would you please try to download the following config file and replace your
> original file?
> http://download.microsoft.com/download/9/8/C/98CEED6D-3489-4504-BBB5-586B630
> 01CE0/887787.exe
> To replace the .config files with new versions that are available from the
> Microsoft Download Center, follow these steps:
> Important When you replace your .config files, you return to a default
> installation. Any changes that you have made to the configuration files
> will be lost.
> 1. Locate the following two files on the computer that is running Microsoft
> Internet Information Services (IIS) and the Reporting Services components:
> ? %ProgramFiles%\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer\rssrvpolicy.config
> ? %ProgramFiles%\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportManager\rsmgrpolicy.config
> 2. Rename the files in step 1 to Rssrvpolicy.old and Rsmgrpolicy.old.
> 3. Download the .config files from the following link:
> http://download.microsoft.com/download/9/8/C/98CEED6D-3489-4504-BBB5-586B630
> 01CE0/887787.exe
> 4. Expand the files from the package to your local drive.
> 5. Replace your current .config files with the .config files from the
> package.
> 6. Restart the IIS services by using IIS Manager.
> Here is the article for your reference.
> 887787 You may receive error messages from Reporting Services after you
> install the ASP.NET ValidatePath Module
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;887787
> Hope this will be helpful.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Bart,
Thank you for the update.
Would you please change the following setting in the web.config file of
Report Manager and the Report Server:
<system.web>
<trust level="RosettaMgr" originUrl="" />
</system.web>
Please change the level attribut of the trust element to "Full" and have a
try again?
If this issue still appeared again, would you please send the report log
file to me? By default, the log file is located at \Microsoft SQL
Server\<SQL Server Instance>\Reporting Services\LogFiles. Also, please send
these two web.config files. You may zip the folder with logfiles and
include these two web.config files and send to me directly. I understand
the information may be sensitive to you, my direct email address is
weilu@.ONLINE.microsoft.com (Please remove ONLINE. before you send the
email. ), you may
send the file to me directly and I will keep secure.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Bart,
Thank you for coming back. I researched your log file and searched in out
internal database. I found a similar issue and here is the solution:
1. Save the following string in an XML file.
<IPermission class="System.Web.AspNetHostingPermission, System,
Version=1.0.5000.0, Culture=neutral, publicKeyToken=b77a5c561934e089"
version="1" Level="Unrestricted" />
2. Then open Microsoft .NET Framework 1.1 Configuration Console and expand
till:
Runtime Security Policy >> Machine >> Code Groups >> All_Code.>>
My_Computer_Zone.
3. Right click the My_Computer_Zone and select New..
4. Give a proper name for new code group and click Next.
5. Choose All Code from the only dropdown list and click next.
6. Select Create a new permission set option and click next.
7. Give a proper name to new permission set. And click next.
8. In the middle of the window, down bottom, click Import.. Button.
Locate the xml file in which we have saved the permission set string.
9. Click next and then finish.
10. Repeat the same with LocalIntranet_Zone and Internet_Zone if this
doesn't resolves the problem.
11. Restart the IIS by using IISRESET from command prompt or through the
GUI.
Here are a few good MSDN articles for your records:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/htm
l/secmod82.asp>
<http://msdn.microsoft.com/msdnmag/issues/01/02/CAS/default.aspx>
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/h
tml/THCMCh09.asp>
Hope this information will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi Lu,
I've created the permissionset in the 3 zones.
The result is the same.
One change is that the error is not logged in the logfile:
<Header>
<Product>Microsoft SQL Server Reporting Services Version
8.00.1042.00</Product>
<Locale>en-US</Locale>
<TimeZone>Romance Daylight Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\LogFiles\ReportServer__08_08_2006_12_10_17.log</Path>
<SystemName>SERVER</SystemName>
<OSName>Microsoft Windows NT 5.2.3790.0</OSName>
<OSVersion>5.2.3790.0</OSVersion>
</Header>
w3wp!webserver!1930!8/08/2006-12:10:17:: i INFO: Reporting Web Server started
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing ConnectionType
to '1' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
IsSchedulingService to 'True' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
IsNotificationService to 'True' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing IsEventService
to 'True' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing PollingInterval
to '10' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing MemoryLimit to
'60' percent as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing RecycleTime to
'720' minute(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
MaximumMemoryLimit to '80' percent as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing MaxQueueThreads
to '0' thread(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing MaxScheduleWait
to '5' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing InstanceName to
'MSSQLSERVER' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
ProcessRecycleOptions to '0' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration
file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
RunningRequestsAge to '30' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
SecureConnectionLevel to '0' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing DisplayErrorLink
to 'True' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
WebServiceUseFileShareStorage to default value of 'False' because it was not
specified in Configuration file.
w3wp!resourceutilities!1930!8/08/2006-12:10:17:: i INFO: Running on 1
physical processors, 1 logical processors
w3wp!resourceutilities!1930!8/08/2006-12:10:17:: i INFO: Reporting Services
starting SKU: Developer
w3wp!runningjobs!1930!8/08/2006-12:10:17:: i INFO: Database Cleanup (Web
Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds
w3wp!runningjobs!1930!8/08/2006-12:10:17:: i INFO: Running Requests
Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!1930!8/08/2006-12:10:17:: i INFO: Running Requests DB timer
enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!1930!8/08/2006-12:10:17:: i INFO: Memory stats update timer
enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!library!1930!08/08/2006-12:10:28:: i INFO: Call to GetSystemPermissions
w3wp!crypto!1930!08/08/2006-12:10:28:: i INFO: Initializing crypto as user:
NT AUTHORITY\NETWORK SERVICE
w3wp!crypto!1930!08/08/2006-12:10:28:: i INFO: Exporting public key
w3wp!crypto!1930!08/08/2006-12:10:28:: i INFO: Performing sku validation
w3wp!crypto!1930!08/08/2006-12:10:28:: i INFO: Importing existing encryption
key
w3wp!library!1004!08/08/2006-12:10:31:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:10:41:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:10:44:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:10:45:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1004!08/08/2006-12:10:45:: i INFO: Initializing
EnableIntegratedSecurity to 'True' as specified in Server system properties.
w3wp!library!1d40!08/08/2006-12:10:46:: i INFO: Call to GetSystemPermissions
w3wp!library!1d40!08/08/2006-12:10:46:: i INFO: Initializing
ResponseBufferSizeKb to default value of '64' KB because it was not specified
in Server system properties.
w3wp!library!1d40!08/08/2006-12:10:46:: i INFO: Initializing
UseSessionCookies to 'True' as specified in Server system properties.
w3wp!library!1930!08/08/2006-12:10:47:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1930!08/08/2006-12:10:47:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:12:24:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1930!08/08/2006-12:12:24:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:12:27:: i INFO: Initializing SessionTimeout
to '600' second(s) as specified in Server system properties.
w3wp!library!1004!08/08/2006-12:12:27:: i INFO: Initializing
EnableClientPrinting to default value of 'True' because it was not specified
in Server system properties.
w3wp!library!1004!08/08/2006-12:12:28:: i INFO: Call to RenderFirst(
'/Opdrachten/Betaalherinneringen' )
w3wp!library!1004!8/8/2006-12:12:33:: i INFO: Initializing
SqlStreamingBufferSize to default value of '64640' Bytes because it was not
specified in Server system properties.
w3wp!library!1004!8/8/2006-12:12:33:: i INFO: Initializing
SnapshotCompression to 'SQL' as specified in Server system properties.
w3wp!library!1004!08/08/2006-12:12:33:: Using folder C:\Program
Files\Microsoft SQL Server\MSSQL\Reporting Services\RSTempFiles for temporary
files.
w3wp!library!1004!08/08/2006-12:12:34:: i INFO: Initializing
EnableExecutionLogging to 'True' as specified in Server system properties.
w3wp!webserver!1004!08/08/2006-12:12:34:: i INFO: Processed report.
Report='/Opdrachten/Betaalherinneringen', Stream=''
w3wp!library!1930!08/08/2006-12:12:56:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:12:56:: i INFO: Call to ListRoles
w3wp!library!1004!08/08/2006-12:13:02:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:13:04:: i INFO: Call to GetSystemPermissions
w3wp!library!1d40!08/08/2006-12:13:10:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:13:10:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:13:49:: i INFO: Call to GetSystemPermissions
w3wp!library!1d40!08/08/2006-12:14:00:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:14:04:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:14:09:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:14:12:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:14:19:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:14:21:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:14:22:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1004!08/08/2006-12:14:22:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:14:23:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1004!08/08/2006-12:14:24:: i INFO: Call to GetSystemPermissions
Any idea?
Thanks
Bart
"Wei Lu [MSFT]" wrote:
> Hi Bart,
> Thank you for coming back. I researched your log file and searched in out
> internal database. I found a similar issue and here is the solution:
> 1. Save the following string in an XML file.
> <IPermission class="System.Web.AspNetHostingPermission, System,
> Version=1.0.5000.0, Culture=neutral, publicKeyToken=b77a5c561934e089"
> version="1" Level="Unrestricted" />
>
> 2. Then open Microsoft .NET Framework 1.1 Configuration Console and expand
> till:
> Runtime Security Policy >> Machine >> Code Groups >> All_Code.>>
> My_Computer_Zone.
> 3. Right click the My_Computer_Zone and select New..
> 4. Give a proper name for new code group and click Next.
> 5. Choose All Code from the only dropdown list and click next.
> 6. Select Create a new permission set option and click next.
> 7. Give a proper name to new permission set. And click next.
> 8. In the middle of the window, down bottom, click Import.. Button.
> Locate the xml file in which we have saved the permission set string.
> 9. Click next and then finish.
> 10. Repeat the same with LocalIntranet_Zone and Internet_Zone if this
> doesn't resolves the problem.
> 11. Restart the IIS by using IISRESET from command prompt or through the
> GUI.
> Here are a few good MSDN articles for your records:
> <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/htm
> l/secmod82.asp>
> <http://msdn.microsoft.com/msdnmag/issues/01/02/CAS/default.aspx>
> <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/h
> tml/THCMCh09.asp>
> Hope this information will be helpful!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>|||Hi Bart,
Please try to re-create the subscription first to check whether this issue
appeared or not.
If you try to access the Report manager, does any issue appear?
Please let me know the result. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support|||Hi Lu,
Re-created the subscription, same issue.
Via the report manager, no problem.
Bart
"Wei Lu [MSFT]" wrote:
> Hi Bart,
> Please try to re-create the subscription first to check whether this issue
> appeared or not.
> If you try to access the Report manager, does any issue appear?
> Please let me know the result. Thank you!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
>|||Hi Bart,
From your description, we need to use the Filemon tool to monitor the file
access and try to figure out are there any permission issue.
Please try to download the Filemon from the following web site. Run it and
try to create a subsciption and then stop and save the result.
http://www.sysinternals.com/Utilities/Filemon.html
Please send the result to me. my direct email address is
weilu@.ONLINE.microsoft.com ( Please remove ONLINE when you send the email
), you may send the file to me directly and I will keep it secure.
Sincerely,
Wei Lu
Microsoft Online Community Support|||Hi Wei,
Have you received my email last week?
Send on 22/8
Thanks
Bart
"Wei Lu [MSFT]" wrote:
> Hi Bart,
> From your description, we need to use the Filemon tool to monitor the file
> access and try to figure out are there any permission issue.
> Please try to download the Filemon from the following web site. Run it and
> try to create a subsciption and then stop and save the result.
> http://www.sysinternals.com/Utilities/Filemon.html
> Please send the result to me. my direct email address is
> weilu@.ONLINE.microsoft.com ( Please remove ONLINE when you send the email
> ), you may send the file to me directly and I will keep it secure.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
>|||Hello Bart,
Unfortunately, I do not get the email.
Would you please send it again? Thanks!
Sincerely,
Wei Lu
Microsoft Online Community Support|||Hi Wei,
It seems to be that you are not getting my emails:
About your last email with the caspol trick, it didn't bring any solution.
Have you any idea?
Thanks
Bart
"Wei Lu [MSFT]" wrote:
> Hello Bart,
> Unfortunately, I do not get the email.
> Would you please send it again? Thanks!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
>|||Hello Bart,
Unforunately, I do not get the email from you.
You mean that if you turn off the CAS, you still could not send the
subscriptions.
Would you please let me know if you remove the Form authenticatioin, does
this issue appear?
Also, if you remove the content of the element
<UnattendedExecutionAccount></UnattendedExecutionAccount> in the
RSReportServer.config file, does this issue still appear?
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello bart,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Friday, February 24, 2012
ASPNETDB Connection Problems - Please Please Help!
Hi I am working on my final year project and after over coming one major problem with sql server I have encountered another.
It feels as if I have tried everthing to solve it but cant get my head around it. I really do not have much time left to finish my project and am very worried in case I cant get the app / db fixed in time.
The problem started when I was showing my friend the website over the internet. There was a space in the address / folder name so I decided to create a new folder and copy the contents of the code from the old folder to the new one. This included the app_data directory that holds the databases for my system.
After setting up a virtual directory in IIS v 5.1 i ran the website only to be confronted with not being able to log in.
I have three connections ..... aspnetdb.mdf, x.mdf, y.mdf.
x.mdf and y.mdf are both being read from ok when I run the app but it doesnt seem to be reading from the aspnetdb.mdf database.
I have tried all sorts of things and had all sorts of error messages including:
cant write to database as its read only
cant access database because its already there.
It seems to me that there is more than one aspnetdb.mdf file attached therefore the app is reading from the new one and not the one i want it to.
I will paste the web.config file below. Please note that before i copied and pasted code to a different location this web.config was working fine. Also note that when I hit ctrl+alt+del it shows up 3 sqlservr processes -
sqlServr.exe - Network Service
sqlServr.exe - Rodney (my log on name)
sqlServr.exe - ASPNET
<connectionStrings>
<add name="Classes" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Classes.mdf"
providerName="System.Data.SqlClient" />
<add name="Iftams" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Iftams.mdf"
providerName="System.Data.SqlClient" />
<remove name="UsersDB" />
<add name="UsersDB" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
I have tried reinstalling sqlserver, creating a new website from the vs2005 ide and also creating a virtual directory first and then copying files to it.
I have also tried attaching to management studio, changing user settings etc
I really dont know what to do next. My head is fried. Please help.
I would really appreciate your help on this one.
Regards in hope
Rodney
The ASP.net forum is a better place to ask questions about ASP.net and Visual Web Developer. You can find all the forums at http://forums.asp.net/ and the forum that is specifically about SQL Express in VWD at http://forums.asp.net/54/ShowForum.aspx.
Regards,
Mike Wachal
SQL Express team
-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1
Sunday, February 12, 2012
ASP.NET and SQL Server Help
Public Function doInsertPrimary(ByVal iState As String)
Dim sqlConnect As String
sqlConnect = "server = mySRVR; database = myDB; uid = sa; password = somepass"
Dim oConnection As New SqlClient.SqlConnection _
(sqlConnect)
Dim sqlString As String
sqlString = "INSERT INTO myTable VALUES (" & iState & ")"
Dim oCommand As New SqlClient.SqlCommand(sqlString, oConnection)
oConnection.Open()
Try
oCommand.ExecuteNonQuery()
Finally
oConnection.Close()
End Try
End Function
Today, when I do the insert on a new SQL Server, it is inserting the same values 5 times. I am not sure whether the problem is in my code or on the server. Can someone let me know where they think the problem is at?It's not your function. That's pretty basic. Somehow, it's getting called 5 times. Since it's not a stored procedure, there's no way there's some goofy T-SQL. I've found it's usually something with your page processing order. Button click calls a sub, but it's called in the page load, but that fires another one and you end up with multiple calls when you want one. Enable tracing, put a trace statement in yor function and see how many times it's called. Then try to figure out what's calling it multiple times.|||Here is something interesting that I forgot to mention:
I am running Virtual PC on the same laptop as .NET with Windows 2003 and Sql Server 2000 on it. Here at work, I have a second laptop as well. When I execute the same code on the remote laptop, everything executes perfectly. Hence, the code is fine. I enabled tracing, and the code is only being called once. Anyone know anything about this?
Thursday, February 9, 2012
Asp.net - SQL Server remote connection falied
Hi, I have an issue with ASP.NET 2.0 and SQL Server 2005
My project when hosted in a machine its working, but in case of some other machine it is throwing the following error
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I have turned off my firewall and network configuration for sql server and its also done as tcp/ip and named pipes…though it is not working …The surprise is if I run using IDE its running , in the same machine after hosting it is not running, where the db is in another machine. What could be the problem? Any suggestions would be highly appreciated. Regards,Naveen
Regards,
Naveen
This is usually issue with user name, password and permissions.
First did you check your connection string? You need to change server name.
Second, are you using Windows authentication or mixed mode in your SQL Server?
|||Thanks millet, it worked when I changed the permission
|||Hi Naveen,
Can u pls. post the changes you made. because i'm also getting this error.