Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Thursday, March 22, 2012

Authentication problem - Urgent

During the development of the project I used windows authentication on IIS
and everything was working perfectly. But the user must access the reports
through a web application, so I changed the security to anonymous and set the
rights on RS for the anonymous user and since then, the server has crashed in
a random way (rsProcessingError). If I reapply the security the same thing
happens. Does anyone have any ideas?Possibly - we are using a custom built proxy, and in order to use
System.Net.CredentialCache.DefaultCredentials I had to allow anon access.
When deploying it broke [b/c IUSR_machinename didn't have the correct
priv's]. There is a post on how to allow anon access & be able to deploy
reports [titled "does anonymous access have to be disabled in iis?",
8/10/2004] on how to set it up. Note you do it in reporting services, not
iis. Maybe this will get you on the right path.
Good luck,
John Hennesey
"raph" wrote:
> During the development of the project I used windows authentication on IIS
> and everything was working perfectly. But the user must access the reports
> through a web application, so I changed the security to anonymous and set the
> rights on RS for the anonymous user and since then, the server has crashed in
> a random way (rsProcessingError). If I reapply the security the same thing
> happens. Does anyone have any ideas?|||Thanks for your help.
I already tried to put anonymous user as content manager on RS and PowerUser
on the server. But the problem is the same.The report crashes once
every one hundred times with the same parameters by URL and the same error
message.
The processing of group expression for the table 'table1' cannot be
performed. The comparison failed. Please check the data type returned by
group expression.
Raph
"JohnHennesey" wrote:
> Possibly - we are using a custom built proxy, and in order to use
> System.Net.CredentialCache.DefaultCredentials I had to allow anon access.
> When deploying it broke [b/c IUSR_machinename didn't have the correct
> priv's]. There is a post on how to allow anon access & be able to deploy
> reports [titled "does anonymous access have to be disabled in iis?",
> 8/10/2004] on how to set it up. Note you do it in reporting services, not
> iis. Maybe this will get you on the right path.
> Good luck,
> John Hennesey
> "raph" wrote:
> > During the development of the project I used windows authentication on IIS
> > and everything was working perfectly. But the user must access the reports
> > through a web application, so I changed the security to anonymous and set the
> > rights on RS for the anonymous user and since then, the server has crashed in
> > a random way (rsProcessingError). If I reapply the security the same thing
> > happens. Does anyone have any ideas?

Saturday, February 25, 2012

Attribute- vs. Element-Centric XML

Hi all,
I am working on a project that involves extracting the data from XML files i
nto SQL Server 2000. My dilemma is attribute- vs. element-centric XML files.
When to use one over the other, and why?
References to good websites would be helpfull, too.
Thanks
Goran DjuranovicGoran Djuranovic wrote:
> Hi all,
> I am working on a project that involves extracting the data from XML
> files into SQL Server 2000. My dilemma is attribute- vs. element-centric
> XML files.
> When to use one over the other, and why?
> References to good websites would be helpfull, too.
This is a FAQ: see http://xml.silmaril.ie/developers/attributes/
///Peter|||Hi Goran,
In addition to the faq article Peter has provided, I think whether to
choose Attribute or Element centric XML format also depend on your
application layer's design or requirement. And such XML format is usually
important when we do data exporting from SQL Server, because when exporting
data, the exported XML document will be further used by other application
or data processing component which may have particular requirement on the
XML document. As for importing ,this won't matter much as long as the
format is recognizable by the SQL Server engine.
Regards,
Steven Cheng
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.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Thanks, both.
Goran
"Goran Djuranovic" <goran.djuranovic@.newsgroups.nospam> wrote in message new
s:u4l7QdafGHA.356@.TK2MSFTNGP02.phx.gbl...
Hi all,
I am working on a project that involves extracting the data from XML files i
nto SQL Server 2000. My dilemma is attribute- vs. element-centric XML files.
When to use one over the other, and why?
References to good websites would be helpfull, too.
Thanks
Goran Djuranovic

Attribute Relationships in Project Real

Hi,

I'm just trying to dig a little bit deeper into attribute relationships... The documentation of Project Real is a quite interesting read... So if you have a look at http://www.microsoft.com/technet/prodtechnol/sql/2005/realastd.mspx (the technical drilldown for Analysis Services) or even better http://www.microsoft.com/technet/images/prodtechnol/sql/2005/Images/realastd02_big.gif you find an example how to construct attribute relationships.

But here's my problem: do I have a problem in understanding attribute relationships or doesn't also Microsoft know how to deal with them? Why are Fiscal Year/Qtr/Period listed as attribute relationships for Day? This doesn't make sense to me...

Thomas,

If you know the value of Day (the date) then - by defintion - you will also know the value of Fiscal Year/Qtr/Period, since any given date can only belong to one of these. For instance, with a fiscal year starting july 1 and ending june 30, november 11, 2005 will belong to

Fiscal Year: 2005

Fiscal Quarter: 2

Fiscal Period: 5

Also notice that all the attributes in any dimension will always (directly or indirectly) be related to the key attribute in the dimension (and in this case the key attribute is Day)...

|||

Michael,

I aggree 100%... My question is: Why did Microsoft define i.e. the Fiscal Quarter as a direkt attribute relationship to the day? This should be an indirect relationship through Period as with the calendar dimension (through month)... This would make aggregations on the fiscal hirarchy impossible...

Thanks,

|||

You are right Thomas... The Fiscal Qtr and Fiscal Year attributes are actually redundantly related to the Day attribute. I do not think it means anything though, since the relationships between Fiscal Year, Fiscal Qtr, Fiscal Period have been specified (Fiscal Year is related to Fiscal Qtr is related to Fiscal Period is related to Day).

Now I wonder, however, how Fiscal Period can be related to Fiscal Week, since knowing a week doesn't automatically mean that you know a month (I am assuming that Fiscal Period is actually just a month).

|||Well, that was something I was wondering about, too! In the document they state that with confidence... However I don't understand that, too! A week can belong to two months, everything else doesn't make much sense... I only could think about something like "week of 01-February", so this week belongs to "February", regardless of January, 31 is part of that week or not...|||

Sorry. I left them that way to demonstrate how NOT to specify attribute relationships. The way that the Calendar attributes are setup is the correct way. The guiding best practice that I use is that if an attributes are both directly and indirectly related, then you should drop the direct relationships. Thus for the Fiscal attributes, day should be directly related to period, which is directly related to qtr which is direct related to year. The direct relationships between (day and qtr) and (day and year) should be dropped -- like they are with Calendar.

Hope that helps.

_-_-_ Dave

|||

Dave,

that makes sense... Any comments on the weeks, too?

Thanks,

|||

You have to have a direct relationship to weeks because it is the bottom of the natural hierarchy (immeditately above the key attribute).

_-_-_ Dave

|||Well... I disagree. A week can span two months, which is why I think a relationship cannot be defined between Fiscal Period (Month) and Fiscal Week. |||Doesn't that depend on how an orgination's fiscal month is defined - in some cases, the number of weeks per fiscal month is varied (like 4-4-5) in order to prevent weeks from spanning fiscal month boundaries?|||

Deepak is right. If you look at the dimension, B&N has a very unique way of defining fiscal weeks. It isn't the same as calendar weeks.

_-_-_ Dave

Attribute Relationships in Project Real

Hi,

I'm just trying to dig a little bit deeper into attribute relationships... The documentation of Project Real is a quite interesting read... So if you have a look at http://www.microsoft.com/technet/prodtechnol/sql/2005/realastd.mspx (the technical drilldown for Analysis Services) or even better http://www.microsoft.com/technet/images/prodtechnol/sql/2005/Images/realastd02_big.gif you find an example how to construct attribute relationships.

But here's my problem: do I have a problem in understanding attribute relationships or doesn't also Microsoft know how to deal with them? Why are Fiscal Year/Qtr/Period listed as attribute relationships for Day? This doesn't make sense to me...

Thomas,

If you know the value of Day (the date) then - by defintion - you will also know the value of Fiscal Year/Qtr/Period, since any given date can only belong to one of these. For instance, with a fiscal year starting july 1 and ending june 30, november 11, 2005 will belong to

Fiscal Year: 2005

Fiscal Quarter: 2

Fiscal Period: 5

Also notice that all the attributes in any dimension will always (directly or indirectly) be related to the key attribute in the dimension (and in this case the key attribute is Day)...

|||

Michael,

I aggree 100%... My question is: Why did Microsoft define i.e. the Fiscal Quarter as a direkt attribute relationship to the day? This should be an indirect relationship through Period as with the calendar dimension (through month)... This would make aggregations on the fiscal hirarchy impossible...

Thanks,

|||

You are right Thomas... The Fiscal Qtr and Fiscal Year attributes are actually redundantly related to the Day attribute. I do not think it means anything though, since the relationships between Fiscal Year, Fiscal Qtr, Fiscal Period have been specified (Fiscal Year is related to Fiscal Qtr is related to Fiscal Period is related to Day).

Now I wonder, however, how Fiscal Period can be related to Fiscal Week, since knowing a week doesn't automatically mean that you know a month (I am assuming that Fiscal Period is actually just a month).

|||Well, that was something I was wondering about, too! In the document they state that with confidence... However I don't understand that, too! A week can belong to two months, everything else doesn't make much sense... I only could think about something like "week of 01-February", so this week belongs to "February", regardless of January, 31 is part of that week or not...|||

Sorry. I left them that way to demonstrate how NOT to specify attribute relationships. The way that the Calendar attributes are setup is the correct way. The guiding best practice that I use is that if an attributes are both directly and indirectly related, then you should drop the direct relationships. Thus for the Fiscal attributes, day should be directly related to period, which is directly related to qtr which is direct related to year. The direct relationships between (day and qtr) and (day and year) should be dropped -- like they are with Calendar.

Hope that helps.

_-_-_ Dave

|||

Dave,

that makes sense... Any comments on the weeks, too?

Thanks,

|||

You have to have a direct relationship to weeks because it is the bottom of the natural hierarchy (immeditately above the key attribute).

_-_-_ Dave

|||Well... I disagree. A week can span two months, which is why I think a relationship cannot be defined between Fiscal Period (Month) and Fiscal Week. |||Doesn't that depend on how an orgination's fiscal month is defined - in some cases, the number of weeks per fiscal month is varied (like 4-4-5) in order to prevent weeks from spanning fiscal month boundaries?|||

Deepak is right. If you look at the dimension, B&N has a very unique way of defining fiscal weeks. It isn't the same as calendar weeks.

_-_-_ Dave

Sunday, February 19, 2012

Attachment Error received

Hi all,
I've just started dabbling with SQL Express (I've an up-coming project and
would like to use it). I had no hassles connecting to the db I created in
VS2005 std but now I want to test connectin to it outside of the inetpub. I
copied the MDF and LDF to another folder on my drive and changed the conn
string to reflect this but I get the following error:
The header for file 'w:\temp\Test.mdf' is not a valid database file header.
The PageAudit property is incorrect.
An attempt to attach an auto-named database for file w:\temp\Test.mdf
failed. A database with the same name exists, or specified file cannot be
opened, or it is located on UNC share.
Clearly something's gone wrong here but what would I need to do to fix this
problem (and be able to connect to SQL Express db's from other folders in
future)?
Regards
John.
Moving the database files and then not being able to attach them is usually
a permissions problem but I've never seen this error. You might try the
copy again - this error sounds like a corrupted file.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"John" <a@.b.c> wrote in message news:uhr9aYCOGHA.916@.TK2MSFTNGP10.phx.gbl...
> Hi all,
> I've just started dabbling with SQL Express (I've an up-coming project and
> would like to use it). I had no hassles connecting to the db I created in
> VS2005 std but now I want to test connectin to it outside of the inetpub.
> I
> copied the MDF and LDF to another folder on my drive and changed the conn
> string to reflect this but I get the following error:
> The header for file 'w:\temp\Test.mdf' is not a valid database file
> header.
> The PageAudit property is incorrect.
> An attempt to attach an auto-named database for file w:\temp\Test.mdf
> failed. A database with the same name exists, or specified file cannot be
> opened, or it is located on UNC share.
> Clearly something's gone wrong here but what would I need to do to fix
> this
> problem (and be able to connect to SQL Express db's from other folders in
> future)?
> Regards
> John.
>
>

Monday, February 13, 2012

Attaching data at differnet levels in a heirchy

I don't think this is too complex, but I can't figure out what what the correct solution is.

I have 6 tables: Customer, Project, Rate, Hours, EquipmentType, Equipment

All projects belong to a customer, so customers have a PK CustomerId and Project has a PK {CustomerId, ProjectId} where CustomerId is a FK to Customer.

A rate can be defined as being at a project level or a Customer level. A project must specify if it is using the customer level rates or its own rates.

So what I wanted to do at first was creat the key in Rate as {CustomerId, ProjectId NULLABLE, EquipmentTypeId}. The idea being that a NULL ProjectId would mean that the Rate was Customer level since it didn't point to a project.

But of course that won't work. In addition to SQL Server not allowing a PK with a NULLABLE it would also mess up my relationship between Rate and Hours.

I wanted to specify in Hours the Rate, Project (and Customer), and Equipment and Equipment type.

I didn't want to create 2 rate tables, one for Customer level rates and one for Project level rates, but is that what I should have done?

I hope this is a clear explanation.

Does anyone have a better idea how to create what I want.It is hard to give you advice without seeing any data.
But I don't think Project table should have CustormerID at all.
Usually people create Customer table with CustormerID PK and
Project table with ProjectID PK and in between for multi-to-multi relationships you should have CustomerProgect table with CustomerID, ProjectID PK and CustomerID FK and ProjectID FK.
The same is with a Rate. Just create Rate table with column RateType where you can store C or P meaning Customer or Project type rate.
And in between just create Customer_Rate table with CustormerID, RateID PK and corresponding foreign keys.

Hope it helps.

attaching a ms access project file to SQL Server 2005 Express

I have some sample files from the Access Inside OUt 2003 book I want to
attach to my server. I can't figure out how to be able to connect to them
from the Server?
I can't connect to them from the SQL Server at all So I am trying to attach
them with this batch script.
I run this from the document window in SQL Server Management Studio :
sp_attach_db "ContactsSQL",
"C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
"C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
and I get this error message:
sg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
I changed the user account control to on so how can I read this access
project file from the SQL Server?
thanks
Hi
Have you checked that there is not a typing mistake in the batch file and
that you have the correct name for the log file? Check the file permissions
on each of these files. Alternatively you can rename the log file you have
and try sp_attach_single_file_db
John
"Janis" wrote:

> I have some sample files from the Access Inside OUt 2003 book I want to
> attach to my server. I can't figure out how to be able to connect to them
> from the Server?
> I can't connect to them from the SQL Server at all So I am trying to attach
> them with this batch script.
> I run this from the document window in SQL Server Management Studio :
> sp_attach_db "ContactsSQL",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> and I get this error message:
> sg 5120, Level 16, State 101, Line 1
> Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> I changed the user account control to on so how can I read this access
> project file from the SQL Server?
> thanks
|||Thanks for your answer. I tried some connections and then I ran the batch
and I get another response.
Msg 1801, Level 16, State 3, Line 1
Database 'ContactsSQL' already exists. Choose a different database name.
I don't understand what is going on here. So I have the contactsSQL
database supposed connected. I don't see any contact tables listed in the
database engine. I registered the connection. I have the Contacts access
project file open and the connection tested okay. I don't understand how
they are connected because there are no dbo.tables in the Access objects. I
am using Access 2008 and Vista.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Have you checked that there is not a typing mistake in the batch file and
> that you have the correct name for the log file? Check the file permissions
> on each of these files. Alternatively you can rename the log file you have
> and try sp_attach_single_file_db
> John
> "Janis" wrote:
|||One possibility:
Since you copied the *.mdf/*.ldf file from CD coming with the book, the
files are read-only. You need to clear the "Read ONly" bit first
(rigth-click the files and select "Properties").
"Janis" <Janis@.discussions.microsoft.com> wrote in message
news:5FA5913E-2B03-4756-88CB-FFC8AC8F27AB@.microsoft.com...
>I have some sample files from the Access Inside OUt 2003 book I want to
> attach to my server. I can't figure out how to be able to connect to them
> from the Server?
> I can't connect to them from the SQL Server at all So I am trying to
> attach
> them with this batch script.
> I run this from the document window in SQL Server Management Studio :
> sp_attach_db "ContactsSQL",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> and I get this error message:
> sg 5120, Level 16, State 101, Line 1
> Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is
> denied.)".
> I changed the user account control to on so how can I read this access
> project file from the SQL Server?
> thanks
|||When I try to Use the database then I get this message:
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'contacts'. No entry
found with that name. Make sure that the name is entered correctly.
So it appears I haven't really connected to the database even though it
passed the connection test.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Have you checked that there is not a typing mistake in the batch file and
> that you have the correct name for the log file? Check the file permissions
> on each of these files. Alternatively you can rename the log file you have
> and try sp_attach_single_file_db
> John
> "Janis" wrote:
|||Hi Janis
In one post you call the database contacts and the other contactsSQL.
John
"Janis" wrote:
[vbcol=seagreen]
> When I try to Use the database then I get this message:
> Msg 911, Level 16, State 1, Line 1
> Could not locate entry in sysdatabases for database 'contacts'. No entry
> found with that name. Make sure that the name is entered correctly.
> So it appears I haven't really connected to the database even though it
> passed the connection test.
> "John Bell" wrote:
|||You are right again. thanks, I thought they were all access files. I just
looked at the extensions and it is a SQL Server file which I attached to. I
still haven't gotten connected to the adp file yet but I thought I did.
Thanks for noticing it.
"John Bell" wrote:
[vbcol=seagreen]
> Hi Janis
> In one post you call the database contacts and the other contactsSQL.
> John
> "Janis" wrote:

attaching a ms access project file to SQL Server 2005 Express

I have some sample files from the Access Inside OUt 2003 book I want to
attach to my server. I can't figure out how to be able to connect to them
from the Server?
I can't connect to them from the SQL Server at all So I am trying to attach
them with this batch script.
I run this from the document window in SQL Server Management Studio :
sp_attach_db "ContactsSQL",
"C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
"C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
and I get this error message:
sg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
I changed the user account control to on so how can I read this access
project file from the SQL Server?
thanksHi
Have you checked that there is not a typing mistake in the batch file and
that you have the correct name for the log file? Check the file permissions
on each of these files. Alternatively you can rename the log file you have
and try sp_attach_single_file_db
John
"Janis" wrote:
> I have some sample files from the Access Inside OUt 2003 book I want to
> attach to my server. I can't figure out how to be able to connect to them
> from the Server?
> I can't connect to them from the SQL Server at all So I am trying to attach
> them with this batch script.
> I run this from the document window in SQL Server Management Studio :
> sp_attach_db "ContactsSQL",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> and I get this error message:
> sg 5120, Level 16, State 101, Line 1
> Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> I changed the user account control to on so how can I read this access
> project file from the SQL Server?
> thanks|||Thanks for your answer. I tried some connections and then I ran the batch
and I get another response.
Msg 1801, Level 16, State 3, Line 1
Database 'ContactsSQL' already exists. Choose a different database name.
I don't understand what is going on here. So I have the contactsSQL
database supposed connected. I don't see any contact tables listed in the
database engine. I registered the connection. I have the Contacts access
project file open and the connection tested okay. I don't understand how
they are connected because there are no dbo.tables in the Access objects. I
am using Access 2008 and Vista.
"John Bell" wrote:
> Hi
> Have you checked that there is not a typing mistake in the batch file and
> that you have the correct name for the log file? Check the file permissions
> on each of these files. Alternatively you can rename the log file you have
> and try sp_attach_single_file_db
> John
> "Janis" wrote:
> > I have some sample files from the Access Inside OUt 2003 book I want to
> > attach to my server. I can't figure out how to be able to connect to them
> > from the Server?
> > I can't connect to them from the SQL Server at all So I am trying to attach
> > them with this batch script.
> >
> > I run this from the document window in SQL Server Management Studio :
> > sp_attach_db "ContactsSQL",
> > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> >
> > and I get this error message:
> > sg 5120, Level 16, State 101, Line 1
> > Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> > Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> >
> > I changed the user account control to on so how can I read this access
> > project file from the SQL Server?
> > thanks|||One possibility:
Since you copied the *.mdf/*.ldf file from CD coming with the book, the
files are read-only. You need to clear the "Read ONly" bit first
(rigth-click the files and select "Properties").
"Janis" <Janis@.discussions.microsoft.com> wrote in message
news:5FA5913E-2B03-4756-88CB-FFC8AC8F27AB@.microsoft.com...
>I have some sample files from the Access Inside OUt 2003 book I want to
> attach to my server. I can't figure out how to be able to connect to them
> from the Server?
> I can't connect to them from the SQL Server at all So I am trying to
> attach
> them with this batch script.
> I run this from the document window in SQL Server Management Studio :
> sp_attach_db "ContactsSQL",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> and I get this error message:
> sg 5120, Level 16, State 101, Line 1
> Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is
> denied.)".
> I changed the user account control to on so how can I read this access
> project file from the SQL Server?
> thanks|||When I try to Use the database then I get this message:
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'contacts'. No entry
found with that name. Make sure that the name is entered correctly.
So it appears I haven't really connected to the database even though it
passed the connection test.
"John Bell" wrote:
> Hi
> Have you checked that there is not a typing mistake in the batch file and
> that you have the correct name for the log file? Check the file permissions
> on each of these files. Alternatively you can rename the log file you have
> and try sp_attach_single_file_db
> John
> "Janis" wrote:
> > I have some sample files from the Access Inside OUt 2003 book I want to
> > attach to my server. I can't figure out how to be able to connect to them
> > from the Server?
> > I can't connect to them from the SQL Server at all So I am trying to attach
> > them with this batch script.
> >
> > I run this from the document window in SQL Server Management Studio :
> > sp_attach_db "ContactsSQL",
> > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> >
> > and I get this error message:
> > sg 5120, Level 16, State 101, Line 1
> > Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> > Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> >
> > I changed the user account control to on so how can I read this access
> > project file from the SQL Server?
> > thanks|||Hi Janis
In one post you call the database contacts and the other contactsSQL.
John
"Janis" wrote:
> When I try to Use the database then I get this message:
> Msg 911, Level 16, State 1, Line 1
> Could not locate entry in sysdatabases for database 'contacts'. No entry
> found with that name. Make sure that the name is entered correctly.
> So it appears I haven't really connected to the database even though it
> passed the connection test.
> "John Bell" wrote:
> > Hi
> >
> > Have you checked that there is not a typing mistake in the batch file and
> > that you have the correct name for the log file? Check the file permissions
> > on each of these files. Alternatively you can rename the log file you have
> > and try sp_attach_single_file_db
> >
> > John
> >
> > "Janis" wrote:
> >
> > > I have some sample files from the Access Inside OUt 2003 book I want to
> > > attach to my server. I can't figure out how to be able to connect to them
> > > from the Server?
> > > I can't connect to them from the SQL Server at all So I am trying to attach
> > > them with this batch script.
> > >
> > > I run this from the document window in SQL Server Management Studio :
> > > sp_attach_db "ContactsSQL",
> > > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> > > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> > >
> > > and I get this error message:
> > > sg 5120, Level 16, State 101, Line 1
> > > Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> > > Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> > >
> > > I changed the user account control to on so how can I read this access
> > > project file from the SQL Server?
> > > thanks|||You are right again. thanks, I thought they were all access files. I just
looked at the extensions and it is a SQL Server file which I attached to. I
still haven't gotten connected to the adp file yet but I thought I did.
Thanks for noticing it.
"John Bell" wrote:
> Hi Janis
> In one post you call the database contacts and the other contactsSQL.
> John
> "Janis" wrote:
> > When I try to Use the database then I get this message:
> > Msg 911, Level 16, State 1, Line 1
> > Could not locate entry in sysdatabases for database 'contacts'. No entry
> > found with that name. Make sure that the name is entered correctly.
> >
> > So it appears I haven't really connected to the database even though it
> > passed the connection test.
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > Have you checked that there is not a typing mistake in the batch file and
> > > that you have the correct name for the log file? Check the file permissions
> > > on each of these files. Alternatively you can rename the log file you have
> > > and try sp_attach_single_file_db
> > >
> > > John
> > >
> > > "Janis" wrote:
> > >
> > > > I have some sample files from the Access Inside OUt 2003 book I want to
> > > > attach to my server. I can't figure out how to be able to connect to them
> > > > from the Server?
> > > > I can't connect to them from the SQL Server at all So I am trying to attach
> > > > them with this batch script.
> > > >
> > > > I run this from the document window in SQL Server Management Studio :
> > > > sp_attach_db "ContactsSQL",
> > > > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> > > > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> > > >
> > > > and I get this error message:
> > > > sg 5120, Level 16, State 101, Line 1
> > > > Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> > > > Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> > > >
> > > > I changed the user account control to on so how can I read this access
> > > > project file from the SQL Server?
> > > > thanksJoh

attaching a DB in express 2005

I am having trouble attaching a db to ms sql express 2005.

I have the db in a folder deep down in my drive, within an asp.net website project. For some wierd reason i can't drill down more than two levels to get to the DB

Anyone have any ideas why?

Ilan

Hey,

Yes, there are security problems for the account that can access it (the SQL Server internal account). I've experienced this as well, and it is weird, but if you copy the DB to c:\program files\microsoft SQL Server\90\, and then into one of the data folders, it can access it there (probably can access from that root folder too).

|||

So you recommend that i copy the DB in the microsft SQL folder and once i have linked to it in express move it to the data folder for my project?

|||

Hey,

It's a minor annoyance, but it's not too bad. Yes, I have found no other thing to do in that situation... The alternatives are to attach the database to the database server, or use straight-up T-SQL to do everything you want. You can use T-SQL to manage your database, as you can use T-SQL for everything you do in the editor.

Thursday, February 9, 2012

Attach to SQL Server 2K5 Express Problem

I am building a web app using VS 2K5 with SQL Server Express as the backend.
The project and database are stored in the default location: My
Documents\Visual Studio 2005\WebSites\MyWebSiteName. I also downloaded and
installed the SQL Server Management Studio Express to be able to manage the
database. The problem I have is that I am unable to attach the database. I
go through the process but the SSMSE won't allow me to navigate to where my
database is. I'm needing to import a table with a lot of data. Is this a
bug? Do I need to temporarily move my database file? Thanks.
hi Phill,
Phill wrote:
> I am building a web app using VS 2K5 with SQL Server Express as the
> backend. The project and database are stored in the default location:
> My Documents\Visual Studio 2005\WebSites\MyWebSiteName. I also
> downloaded and installed the SQL Server Management Studio Express to
> be able to manage the database. The problem I have is that I am
> unable to attach the database. I go through the process but the
> SSMSE won't allow me to navigate to where my database is. I'm
> needing to import a table with a lot of data. Is this a bug? Do I
> need to temporarily move my database file? Thanks.
I do not currently have VS2005 installed, but with SSMSE I was able to
navigate to My Documents\Visual Studio 2005\WebSites\MyWebSiteName (the
\WebSites\MyWebSiteName folders have been actually created by me as, again,
I do not have VS2005 installed on that machine) both with a windows
administrator member (trusted connections) and the "traditional" "sa" SQL
Server login (mixed mode security)
I do not think VS2005 sets some sort of particular ACLs for that folder,
but I can be wrong here..
the account running my SQLExpress instance is LocalSystem..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.16.0 - DbaMgr ver 0.61.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||When you created the database in that location, you probably did it as a
user instance because that's the Visual Studio default. The user running
Visual Studio has permissions to that directory because he created it. You
are now trying to attach it to the main SQL Server instance instead of the
user instance, The main SQL Express instance is running as Network Service
and more than likely does not have permissions to open files in you
application directory. You can get around this by giving Network Service
read-write permission on the database and log files. Be aware that while
the files are attached to the main instance, your application using the user
instance connection will not be able to access them.
Check this article for an explanation of user instances:
http://msdn.microsoft.com/sql/expres...xpuserinst.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Phill" <Phill@.discussions.microsoft.com> wrote in message
news:1CF63F8E-902B-4AD7-A2F8-B7DA7233D7AE@.microsoft.com...
>I am building a web app using VS 2K5 with SQL Server Express as the
>backend.
> The project and database are stored in the default location: My
> Documents\Visual Studio 2005\WebSites\MyWebSiteName. I also downloaded
> and
> installed the SQL Server Management Studio Express to be able to manage
> the
> database. The problem I have is that I am unable to attach the database.
> I
> go through the process but the SSMSE won't allow me to navigate to where
> my
> database is. I'm needing to import a table with a lot of data. Is this a
> bug? Do I need to temporarily move my database file? Thanks.
|||Thanks, I am now able to connect to the database. It didn't really do me any
good though. I want to import an Access table into it but there aren't any
tools to do so. No ODBC drivers, nothing. So how are we supposed to import
data into SSE2K? Thanks.
"Roger Wolter[MSFT]" wrote:

> When you created the database in that location, you probably did it as a
> user instance because that's the Visual Studio default. The user running
> Visual Studio has permissions to that directory because he created it. You
> are now trying to attach it to the main SQL Server instance instead of the
> user instance, The main SQL Express instance is running as Network Service
> and more than likely does not have permissions to open files in you
> application directory. You can get around this by giving Network Service
> read-write permission on the database and log files. Be aware that while
> the files are attached to the main instance, your application using the user
> instance connection will not be able to access them.
> Check this article for an explanation of user instances:
> http://msdn.microsoft.com/sql/expres...xpuserinst.asp
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Phill" <Phill@.discussions.microsoft.com> wrote in message
> news:1CF63F8E-902B-4AD7-A2F8-B7DA7233D7AE@.microsoft.com...
>
>
|||Use the upsizing Wizard in access to push the data into SSE
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Phill" <Phill@.discussions.microsoft.com> wrote in message
news:F00DFB95-4D36-47CC-9A46-41A5A3577D60@.microsoft.com...[vbcol=seagreen]
> Thanks, I am now able to connect to the database. It didn't really do me
> any
> good though. I want to import an Access table into it but there aren't
> any
> tools to do so. No ODBC drivers, nothing. So how are we supposed to
> import
> data into SSE2K? Thanks.
> "Roger Wolter[MSFT]" wrote: