Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Thursday, March 22, 2012

AdventureWorks, invalid object name error

Hi, I will start step by step:

1. a new web site with VS 2005.

2. I added a sqldatasouce and connect with AdventureWorks sample database ,which comes with sql server 2005 developer edition, selected by drop-down list. [ server name:(local) ]

3. Test connection. It is OK.

4. Saved as 'AdventureWorksConnectionString'.

5. Some columns are selected in the 'product' table.

6. At the end while testing query with 'test query' button it gives:

"There was an error executing the query. Please check the syntax of the command and if present, the types and values of parameters and ensure the are correct.

Invalid object name 'Product'. "

7. However when I choice NorthWind database sample I installed externally, there is no problem.Moreover, when I choice AWBuildVersion table in the AdventureWorks, and it's columns, there is also no problem.

8. I compared NorthWind and AdventureWorks security properties in the SQL server managment studio, but can't find any differences.

9. I have been searching all the web since two days.

10. Thanks.

can you paste the SQL command that fails...

|||

There are two problems.

The AdventureWorks database uses a "Schema.Table" naming convention that the SQLDataSource Wizard doesn't pickup.

Table Names are Case-Sensitive in the AdventureWorks database.

Workaround:

Instead of "Specify columns from table or view", select "Specify a custom SQL statement..."

On the next screen, use the "Query Builder" to generate the SQL statement. It will pickup the schema name.

PS: After I post this message, I'm going to move this thread to the SQL database forum. I think it's more appropriate there.

|||

Yeah, it works... Thank you very much... But,I couldn't figure out why this happened to me, because I have started to read"Addison Wesley ASP NET .2.0 Illustrated". In that book, it is theprocedure how to implement AdventureWorks database in Chapter 2, and does normention any info of "Schema.Table" and SQLDataSouce relation. Ihave tried some method to accomplish that with "Specify columns from tableor view" method:

Source Code of"Specify columns from table or view" method which gives error:

<asp:SqlDataSource ID="SqlDataSource3" runat="server"ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString%>"
ProviderName="<%$ConnectionStrings:AdventureWorksConnectionString.ProviderName %>"
SelectCommand="SELECT [ProductID], [Name], [ProductNumber], [ListPrice],[Color], [SafetyStockLevel], [StandardCost], [Size] FROM[Product]">
</asp:SqlDataSource>


Source Code of "Specify a custom SQL statement..."and applying "Query Builder" method which gives NO error:

<asp:SqlDataSource ID="SqlDataSource3" runat="server"ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString%>"
SelectCommand="SELECT ProductID, Name, ProductNumber, ListPrice, Color,SafetyStockLevel, StandardCost, Size FROMProduction.Product">
</asp:SqlDataSource>

What I could try as a beginner to get a validoutput is changing[Product] as Production.Product.Of course, it gives the same 'invalid object name' error.

As I told you before, AWBuildVersion tablegives no error with "Specify columns from table or view" method:

<asp:SqlDataSource ID="SqlDataSource3" runat="server"ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString%>"
ProviderName="<%$ ConnectionStrings:AdventureWorksConnectionString.ProviderName%>"
SelectCommand="SELECT [SystemInformationID], [Database Version] ASDatabase_Version, [VersionDate], [ModifiedDate] FROM [AWBuildVersion]">
</asp:SqlDataSource>

I have understood from your note theonly way to implement "Schema.Table" s is use the "QueryBuilder", right?

And for your consideration here is Stack Trace:
------
SqlException (0x80131904): Invalid object name 'Product'.]

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +177

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199

System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2406

System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31

System.Data.SqlClient.SqlDataReader.get_MetaData() +62

System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +294

System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1038

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +314

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +20

System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +107

System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +10

System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7

System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +140

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83

System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1657

System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +13

System.Web.UI.WebControls.DataBoundControl.PerformSelect() +140

System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +68

System.Web.UI.WebControls.GridView.DataBind() +5

System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +61

System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +67

System.Web.UI.Control.EnsureChildControls() +97

System.Web.UI.Control.PreRenderRecursiveInternal() +50

System.Web.UI.Control.PreRenderRecursiveInternal() +171

System.Web.UI.Control.PreRenderRecursiveInternal() +171

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5731

------
 Again, Thank you very much to help and save my time.

sql

AdventureWorks vs AdventureWorksDW

I am new to SQL Server.
There are 2 databases for AdventureWorks sample application, AdventureWorks and AdventureWorksDW.
Is the AdventureWorksDW database generated from AdventureWorks or it is design manually?
Can anyone explain to me how to produce the AdventureWorksDW database? Thanks.

You can download both databases from this link:

http://www.microsoft.com/downloads/details.aspx?FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en

In this forum, we make use of the Adventure Works OLAP database built off the AdventureWorksDW relational database. When you download the samples from the link above, you will be given a Visual Studio solution that will build the OLAP database for you. Read the README files that come with the download for details.

Good luck,
Bryan

AdventureWorks Samples Not working

I've installed and deployed the AdventureWorks Sample reports to Report
Manager in RS 2005. When I click on any of the reports, the report just
spins away and never returns the report information. I eventually (10
minutes later) just stop the browser. I made sure I have permissions to all
the data sources as well. Has anyone else had this problem or know where I
can look to see where the report(s) are hanging?
System Information:
Windows XP Pro
IIS 5.x
SQL Server 2005 Std.
VS 2005 Pro
Reporting Services 2005Verify that the dataset(s) in a report are actually working.
"Michael" wrote:
> I've installed and deployed the AdventureWorks Sample reports to Report
> Manager in RS 2005. When I click on any of the reports, the report just
> spins away and never returns the report information. I eventually (10
> minutes later) just stop the browser. I made sure I have permissions to all
> the data sources as well. Has anyone else had this problem or know where I
> can look to see where the report(s) are hanging?
> System Information:
> Windows XP Pro
> IIS 5.x
> SQL Server 2005 Std.
> VS 2005 Pro
> Reporting Services 2005
>|||I'm pretty sure the dataset is working since when I preview in VS2005 I can
get the sample to work with no problem. Strangely also, when I use VS2005 to
deploy and open the Samples folder, I can click on a sample report and it
works as expected. Only when I go to http://localhost/reports/home.aspx ->
AdventureWorks Samples -> Sample report does it just spin away.
"Bing Bing Yu" wrote:
> Verify that the dataset(s) in a report are actually working.
>
> "Michael" wrote:
> > I've installed and deployed the AdventureWorks Sample reports to Report
> > Manager in RS 2005. When I click on any of the reports, the report just
> > spins away and never returns the report information. I eventually (10
> > minutes later) just stop the browser. I made sure I have permissions to all
> > the data sources as well. Has anyone else had this problem or know where I
> > can look to see where the report(s) are hanging?
> >
> > System Information:
> > Windows XP Pro
> > IIS 5.x
> > SQL Server 2005 Std.
> > VS 2005 Pro
> > Reporting Services 2005
> >
> >

AdventureWorks Sample Reports

Hi folks,

Newbie question. Anyone knows how to create dropdown selection boxes in a report just like in the Employee Sales Summary report? Cheers!

Moving thread to the Reporting Services Group|||

If you install the sample reports, you can just open them in report designer and investigate the Report - Report Parameter settings in the VS menu. The Employee Sales Summary report uses a query to determine the valid values list of the parameter - which results in the drop down being shown.

Alternatively, this MSDN topic should get you started: http://msdn2.microsoft.com/en-us/library/ms155917.aspx

-- Robert

Adventureworks sample reports

Newbie Q. Can I view Adventureworks sample reports with SSX? Storefront? Thanks.

Sorry - what is SSX?

Regarding Storefront - do you mean these folks: http://www.storefront.com/?

What is it you're trying to do? Do you mean can you deliver reports to be printed using a standard online printing solution? If so then yes it is possible. No we can't do it out of the box, but you can write a delivery extension to send report output to the online service provider if they expose an API for submitting requests programmatically. You can learn about delivery extensions here: http://msdn2.microsoft.com/library/ms154672.aspx

Hope that helps,

-Lukasz


This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi Lukasz,

I have seen other posts refering to SQL Server Express using the acronym SSX.

I have been trying to run Adventureworks samples/reports and keep getting error messages that I don't have the application/version to load/run files with the extension .csproj or .rptproj. I have downloaded/installed SSX, Adventureworks samples, VBX, CSX, Visual Web Developer, SSNSX and the .Net Framework 2.0 SDK.

Storefront is a sample project included in the Adventureworks sample package. It is intended to illustrate a sample web page for the fictitous Adventureworks company.

I wish to be able to view sample reports included in the sample package.

I have been successful at connecting to the database. I can view database stucture/tables/links. I have not been able to view a report, form or any "front-end" views.

Being new to these programs and this level of programing, I don't know if I the programs listed above lack this functionality or if I haven't gone thru the correct procedures to run/view these samples.

Any help would be greatly appreciated.

Thanks in advance,

Randy

|||

Wow - was I ever off the mark .

Ok - here's what you're looking for. I don't know about csproj - I don't think the web developer allows you to compile C# projects. You might need to invest in a full edition of Visual Studio 2005 C# to be able to compile these.

In order to handle rptproj you'll need to download the evaluation edition of reporting services (http://www.microsoft.com/sql/downloads/trial-software.mspx) and install the report designer component.

SQL Server Express (also SSX/SSE, adnausium) doesn't come with Reporting Services yet - we're working on a SKU that provides this functionality as we speak. So you'll need the evaluation edition of reporting services.

Hope that helps,

-Lukasz


This posting is provided "AS IS" with no warranties, and confers no rights.

sql

AdventureWorks Sample Database

Hi guys, I was trying to download the latest version of AdventureWorks database from codeplex website and I got the following error massage during the installation.

The database 'AdventureWorks' cannot be opened because it is version 631. This server supports version 611 and earlier. A downgrade path is not supported.Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)

Does anybody has idea on this

Thx

Never mind. I got the answer from another post. Here is the link: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2183902&SiteID=1&mode=1

peace

AdventureWorks inserting records to JobCandidates example

Hi
re: AdventureWorks example
Are there source code to how the
HumanResources.JobCandidate
table was created?
(I would like to look at the sample code for INSERTing)
thanks
joyceWhat exactly do you want to know about?
Thanks
Michael
PS: I don't think we have sample code for specifically this table...
"joyce chan" <joyceschan@.fastmail.fm> wrote in message
news:1169588888.525240.259000@.j27g2000cwj.googlegroups.com...
> Hi
> re: AdventureWorks example
> Are there source code to how the
> HumanResources.JobCandidate
> table was created?
> (I would like to look at the sample code for INSERTing)
> thanks
> joyce
>|||Actually, what I am really about is namespace...
So I thought I should take a look at how the JobCandidates table was
created in AdventureWorks.
I understand targetnamespace, and
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
I don't really understand default namespace such as
xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume
"
What is the purpose of the def ns?
And also, what is the purpose of the schema collection? And how come a
schema collection can contain multiple schema.
And what is the advantage of typed vs untyped xml in sql server. Also,
does Sql server support any other types of schemas?
I'm still slowly going through the books online material, but it'd be
nice if all these questions are all answered at once.
Thank you, this is a great usenet group,
Joyce
On Jan 24, 8:05 pm, "Michael Rys [MSFT]" <m...@.online.microsoft.com>
wrote:
> What exactly do you want to know about?
> Thanks
> Michael
> PS: I don't think we have sample code for specifically this table...
> "joyce chan" <joycesc...@.fastmail.fm> wrote in messagenews:1169588888.5252
40.259000@.j27g2000cwj.googlegroups.com...
>
>
>
>
>|||See inline below.
Best regards
Michael
"joyce chan" <joyceschan@.fastmail.fm> wrote in message
news:1169736748.697916.238950@.s48g2000cws.googlegroups.com...
> Actually, what I am really about is namespace...
> So I thought I should take a look at how the JobCandidates table was
> created in AdventureWorks.
> I understand targetnamespace, and
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> I don't really understand default namespace such as
> xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resu
me"
> What is the purpose of the def ns?
Default namespaces are just a syntactic convenience in that you do not have
to write a prefix (this is true for XML documents and XQuery, but not XPath
1.0 where no support for default namespace exists, you have to define a
prefix for the query).
Namespaces per se are just scoping mechanisms to scope a name to a space
that can have different semantics associated than the same name in a
different namespace... e.g., river:bank vs finance:bank.

> And also, what is the purpose of the schema collection? And how come a
> schema collection can contain multiple schema.
A schema collection is a meta data object in SQL Server that allows you to
combine multiple schemas in a logical unit to constrain and type an XML data
type instance with. It also introduces a way that allows you to have more
than one version of the same schema within your database. Note that a single
schema defines structural and some semantic constraints for names within a
namespace (including the non-namespace). However not every document having
data with namespaces needs to have a schema.

> And what is the advantage of typed vs untyped xml in sql server. Also,
> does Sql server support any other types of schemas?
Untyped XML gives you the advantage of complete flexibity of your structure
and no additional validation cost.
Typed XML gives you semantical assurances over the structure of the data,
provides error detection at compile time in your queries (using static
typing), and can be used for some storage and query optimizations.
SQL Server has only limited support for DTDs and other wise does not support
other types of schemas.

> I'm still slowly going through the books online material, but it'd be
> nice if all these questions are all answered at once.
> Thank you, this is a great usenet group,
> Joyce
> On Jan 24, 8:05 pm, "Michael Rys [MSFT]" <m...@.online.microsoft.com>
> wrote:
>

AdventureWorks inserting records to JobCandidates example

Hi
re: AdventureWorks example
Are there source code to how the
HumanResources.JobCandidate
table was created?
(I would like to look at the sample code for INSERTing)
thanks
joyce
What exactly do you want to know about?
Thanks
Michael
PS: I don't think we have sample code for specifically this table...
"joyce chan" <joyceschan@.fastmail.fm> wrote in message
news:1169588888.525240.259000@.j27g2000cwj.googlegr oups.com...
> Hi
> re: AdventureWorks example
> Are there source code to how the
> HumanResources.JobCandidate
> table was created?
> (I would like to look at the sample code for INSERTing)
> thanks
> joyce
>
|||Actually, what I am really confused about is namespace...
So I thought I should take a look at how the JobCandidates table was
created in AdventureWorks.
I understand targetnamespace, and
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
I don't really understand default namespace such as
xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"
What is the purpose of the def ns?
And also, what is the purpose of the schema collection? And how come a
schema collection can contain multiple schema.
And what is the advantage of typed vs untyped xml in sql server. Also,
does Sql server support any other types of schemas?
I'm still slowly going through the books online material, but it'd be
nice if all these questions are all answered at once.
Thank you, this is a great usenet group,
Joyce
On Jan 24, 8:05 pm, "Michael Rys [MSFT]" <m...@.online.microsoft.com>
wrote:[vbcol=seagreen]
> What exactly do you want to know about?
> Thanks
> Michael
> PS: I don't think we have sample code for specifically this table...
> "joyce chan" <joycesc...@.fastmail.fm> wrote in messagenews:1169588888.525240.259000@.j27g2000cwj.g ooglegroups.com...
>
>
|||See inline below.
Best regards
Michael
"joyce chan" <joyceschan@.fastmail.fm> wrote in message
news:1169736748.697916.238950@.s48g2000cws.googlegr oups.com...
> Actually, what I am really confused about is namespace...
> So I thought I should take a look at how the JobCandidates table was
> created in AdventureWorks.
> I understand targetnamespace, and
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> I don't really understand default namespace such as
> xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"
> What is the purpose of the def ns?
Default namespaces are just a syntactic convenience in that you do not have
to write a prefix (this is true for XML documents and XQuery, but not XPath
1.0 where no support for default namespace exists, you have to define a
prefix for the query).
Namespaces per se are just scoping mechanisms to scope a name to a space
that can have different semantics associated than the same name in a
different namespace... e.g., river:bank vs finance:bank.

> And also, what is the purpose of the schema collection? And how come a
> schema collection can contain multiple schema.
A schema collection is a meta data object in SQL Server that allows you to
combine multiple schemas in a logical unit to constrain and type an XML data
type instance with. It also introduces a way that allows you to have more
than one version of the same schema within your database. Note that a single
schema defines structural and some semantic constraints for names within a
namespace (including the non-namespace). However not every document having
data with namespaces needs to have a schema.

> And what is the advantage of typed vs untyped xml in sql server. Also,
> does Sql server support any other types of schemas?
Untyped XML gives you the advantage of complete flexibity of your structure
and no additional validation cost.
Typed XML gives you semantical assurances over the structure of the data,
provides error detection at compile time in your queries (using static
typing), and can be used for some storage and query optimizations.
SQL Server has only limited support for DTDs and other wise does not support
other types of schemas.

> I'm still slowly going through the books online material, but it'd be
> nice if all these questions are all answered at once.
> Thank you, this is a great usenet group,
> Joyce
> On Jan 24, 8:05 pm, "Michael Rys [MSFT]" <m...@.online.microsoft.com>
> wrote:
>
sql

AdventureWorks in vwd

Goodday all

I wonder if anyone can help.

I'm trying to work through a tutorial using a sample database , Adventureworks. When I drag a table "Address" onto my page to set up a grid veiw , and start debugging , the error message reads "invalid object name Address"

On the database explorer the table has (Person) next to the name Address. This I think has something to do with the schema. I cannot get it right to change anything , no matter what I try. I have used this data base in a windows application and it works fine. No (Person ) attached to the table name.

Has anyone got any ideas.

Thanks

Rob

That is a known issue.

One workaround is to edit the ASP.Net code in the SQL Datasource similar to this:

 <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString%>" DeleteCommand="DELETE FROM[Person.Address] WHERE [AddressID] = @.AddressID" InsertCommand="INSERT INTO [Person.Address] ([AddressLine1], [AddressLine2], [City], [StateProvinceID], [PostalCode], [rowguid], [ModifiedDate]) VALUES (@.AddressLine1, @.AddressLine2, @.City, @.StateProvinceID, @.PostalCode, @.rowguid, @.ModifiedDate)" SelectCommand="SELECT * FROMPerson.Address" UpdateCommand="UPDATE [Person.Address] SET [AddressLine1] = @.AddressLine1, [AddressLine2] = @.AddressLine2, [City] = @.City, [StateProvinceID] = @.StateProvinceID, [PostalCode] = @.PostalCode, [rowguid] = @.rowguid, [ModifiedDate] = @.ModifiedDate WHERE [AddressID] = @.AddressID">

You can also open up the Configure Datasource window and select "Specify a custom SQL Statement..." instead of a table and edit the text there.

You must also refresh the schema of the Gridview. If that doesn't work, delete the GridView, add another one and connect it to the Datasource you just edited.

|||

Thanks for that . I,v nearly got it to work . I can at least see the data now. However I cannot edit the data or work with it . When I try I get this error message.

Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query.

How can I get around this?

Regards

Rob

|||

Without seeing the code it's hard to say.

AdventureWorks DB sample

OK, I've installed SQL 2k5, and I'm sure I selected Advanced>Samples

however I cannot see the AdventureWorks database attached.

I have tried opening SQL Server manager>right click on databases>Attach>Add but this only brings up a Folder explorer, not a file explorer.

I can navigate to where the AdventureWorks samples are but SQL Server manager is not able to attach them because it is a Folder explore. also, I have the samples in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data but I am only able to browse to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\

How then can I attach the database?

(later on...) Ok I still cant browse to the Data directory, but I copied the contents of this directory into its parent directory which I can browse to. I still could not see the files in the directory because it is a tree view with no way to see files, so I typed in the name of the AdventureWorks database that I wanted to attach.

Then I got a permissions error - I wasnt able to attach the DB even though I had connected using windows permissions.

This is really starting to frustrate me - I have wasted many hours on something that should be straight forward.

You should find the sample Db under the following directory.

C:\Program Files\Microsoft SQL Server\90\Tools\Samples\AdventureWorks OLTP

|||

See the book online section:

SQL Server Setup Help Running Setup to Install AdventureWorks Sample Databases and Samples

It contains detailed steps to get the AdventureWorks DB samples installed.

|||

The sample db is in 90\Tools location ok but I seem not to get the step 9. in the Setup post installation procedure which says

"To install and attach the sample databases, from Sample Databases Setup, select Install and attach sample databases, and then click Next.

The database files are created and stored in the folder <drive>:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data. The database is attached and ready for use."

(there's just a cert in MSSQL.1\MSSQL\Data)

AdventureWorks DB sample

OK, I've installed SQL 2k5, and I'm sure I selected Advanced>Samples

however I cannot see the AdventureWorks database attached.

I have tried opening SQL Server manager>right click on databases>Attach>Add but this only brings up a Folder explorer, not a file explorer.

I can navigate to where the AdventureWorks samples are but SQL Server manager is not able to attach them because it is a Folder explore. also, I have the samples in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data but I am only able to browse to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\

How then can I attach the database?

(later on...) Ok I still cant browse to the Data directory, but I copied the contents of this directory into its parent directory which I can browse to. I still could not see the files in the directory because it is a tree view with no way to see files, so I typed in the name of the AdventureWorks database that I wanted to attach.

Then I got a permissions error - I wasnt able to attach the DB even though I had connected using windows permissions.

This is really starting to frustrate me - I have wasted many hours on something that should be straight forward.

You should find the sample Db under the following directory.

C:\Program Files\Microsoft SQL Server\90\Tools\Samples\AdventureWorks OLTP

|||

See the book online section:

SQL Server Setup Help Running Setup to Install AdventureWorks Sample Databases and Samples

It contains detailed steps to get the AdventureWorks DB samples installed.

|||

The sample db is in 90\Tools location ok but I seem not to get the step 9. in the Setup post installation procedure which says

"To install and attach the sample databases, from Sample Databases Setup, select Install and attach sample databases, and then click Next.

The database files are created and stored in the folder <drive>:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data. The database is attached and ready for use."

(there's just a cert in MSSQL.1\MSSQL\Data)

adventureworks application error

I am using ms sql server 2005 Enterprise Evaluation Edition, and I can use the other sample dtabases, like pubs, northwind, but not adventureworks
I tried diffrent ways,
I am very new to this, and I try before I ask, and I had to give up,
Here is what I did
when I installed adventureworks it was like 166 mb. big
And when I tried to use it with visual studio, every time I want to drag a table from: data connections/adventureworks, and try to veiw it in borwser it gives me an application server error, and invalid object name

with northwind database works fine

then I tried executing instawdb.sql located C:\Progam files\Microsoft SQL Server\90\Tools\Samples\AdventureWorks OLTP, from Sql server management studio,
And it finishes with errors, and is only 122 mb. big

This line in red:
Msg 4861, Level 16, State 1, Line 1
Cannot bulk load because the file "C:\Archivos de programa\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AWDB\Address.csv" could not be opened. Operating system error code 3(error not found).

and at the end this:
DBCC SHRINKDATABASE: File ID 1 of database ID 6 was skipped because the file does not have enough free space to reclaim.

last night I was thinking wether it might be my OS( usning windows xp), or server evalution edition

Does anybody know something about this?
I already google search and only found one person with the same problem, but there was no solution posted

You can download an installer for the AdventureWorks database or the new smaller AdventureWorksLT database here

http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004sql

Adventureworks 2005

I am running sqlserver2005(ctp) and trying to get the sample database adventureworks loaded so that I have some examples of proc, views, etc.

I finally found the database and downloaded it but when I try to attach I get the following message:

"The database 'AdventureWorks' cannot be opened because it is version 611. This server supports version 603 and earlier. A downgrade path is not supported. Sould not open new database 'AdventureWorks'. CREATE DATABASE is aborted. "

I have MS SQL Server management Studio version 9.00.116.00
MS Analysis Services Client Tools 2000.090.1116.00
MS Data Access Components 2000.086.1830.00(srv03_sp1_rtm.050324-1447)
MS MSXML 2.6.3.0.4.0.6.0
MS IE 6.0.3790.1830
MS .NET Framework 2.0.50215.44
Operating System 5.2.3790

I believe all of this is up to date. Can someone tell me if I need an upgrade (and where that would be) or if there is a version of the AdventureWorks I can use with my current configuration(and where that would be)?

dfw

I think when you install the CTP, there should me a menu item that prompts you to install the sample databases and other tutorials. Did you check that out? If you are using the September CTP, its there in the Readme notes on how to do this.|||Many, many thanks.
I should have realized the files would be on the install disk. I check and there they are!

dfw

AdventureWorks

I've download and installed the sample database but the Server can't see it .. it doesn't appear in the User databases. I installed using the defaults. Anyone ha d the same problem and solved it?

Downloadable user database or not installed upon installation. the datafiles /scripts are just copied to the specified directory. if you want to see them as server attached databases, you will have to either go through the GUI and attach them right-clicking on the Databases node and Select attach database, fo through the GUI and specify the path and file name of the database you want to attach. Another option would be to use the sp_attachdb command from TSQL (see more information about that in the BOL)

Jens K. Suessmeyer


http://www.sqlserver2005.de

Tuesday, March 20, 2012

Adventure Works DW.sln Starting to write data of the 'Internet ~1 ~MG' partition. Hangs Foreve

Hello,

I am trying to process the sample solution "Adventure Works DW.sln",

whenever I get to the point

...

Starting to write data of the 'Internet ~1 ~MG' partition.

...

This processing step NEVER finishes.

Does anyone have a 'way' to make this 'finish' processing?

If I Exit out of Visual Studio and try again, sometimes I will get the error.

Error 5 Errors in the OLAP storage engine: An error occurred while processing the '~CaseDetail ~MG' partition of the '~CaseDetail ~MG' measure group for the 'Customer Clusters ~MC' cube from the Adventure Works DW database. 0 0

Does anyone have any ideas?

Thanks,

Andre Mikulec

AIMDBA

Andre_Mikulec@.Hotmail.com

Also,

When I do individual object processing ...

Processing Dimension 'Clustered Customers.'

Processing Dimension 'Attribute Name'

Started reading data for the 'Attribute Name' attribute.

This <Started reading data for the 'Attribute Name' attribute.> hangs forever and never finishes.

Does anyone have any ideas?

Thanks.

AIMDBA

Andre_Mikulec@.Hotmail.com

|||

Moving to DM forum.


Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

I was just going through my solution explorer.

I have noticed thate the cube or mining structure 'Customer Clusters' (the one that hangs and does not finish) does IS NOT SEEN IN MY Solution Explorer.

How can this not be?

Does anyone have any idea on how I could fix.

This problem.

I have installed the SQL Server Developer's Edition using my company's MSDN subscription at work.

I installed and deployed the Analysis Services sample solution "Adventure Works DW" just fine without any problems.

This is weird.

Does anyone have any idea on how to fix this.

I have installed and re-installed the AdventureworksBI.msi on my non-company problem host.

The same problem occurs. My old settings in OLAP seem that they are being kept.

I know that the security in the OLAP directories is strange.

Does anyone have any ideas on how to proceed?

Note, I applied Visual Studio Service Pack 1.

Now, I get the same error, but at a different spot.

Processing Measure Group '~CaseDetail ~MG'.
Start time 5/26/2007 2:14:58 AM
Processing Partition '~CaseDetail ~MG'.
Start time 5/26/2007 2:14:58 AM
SQL queries 1 ( *** BEFORE VISUAL STUDIO SERVICE PACK 1 IT HUNG HERE ***)
SELECT DATAID ( [Adventure Works].[$Customer].[Customer] )
AS [tomer0_0], KEY ( [Adventure Works].[$Customer].[Number of Cars Owned],0 )
AS [tomer0_1], KEY ( [Adventure Works].[$Customer].[Number of Children At Home],0 )
AS [tomer0_2], KEY ( [Adventure Works].[$Customer].[Total Children],0 )
AS [tomer0_3]
FROM [Adventure Works].[$Customer]
GROUP BY [tomer0_0],[tomer0_1],[tomer0_2],[tomer0_3],[tomer0_0]
ORDER BY DATAID ( [Adventure Works].[$Customer].[Customer] )
ASC
Processing Dimension 'Subcategory Basket Analysis'.
Start time 5/26/2007 2:15:02 AM
Processing Dimension Attribute '(All)' completed successfully.
Start time: 5/26/2007 2:15:02 AM; End time: 5/26/2007 2:15:02 AM; Duration: 0:00:00
Processing Dimension Attribute 'Attribute Name'.
Start time 5/26/2007 2:15:02 AM ( *** AFTER VISUAL STUDIO SERVICE PACK 1 IT HANGS HERE ***)

Does anyone have any ideas on how to proceed?

Thank you very much.

AIM

Andre_Mikulec@.Hotmail.com

Adventure Works DB Samples with Express 2005 SQL Server

Downloaded the file for the Adventure Works DB Sample. Which folder do I need to install it in to have show up in SQL Server Express 2005?

You can put it in any folder you want to (normally in the usual data folder you are using, by default this is located somehwere in the programe files , microsoft SQL Server directory. But you have to attach the database using the sp_attachdb procedure or use the GUI to attach the database, right click on the server --> attach database and you are done.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||You can attach DB's in the Management Studio Express then?|||Should be able to, right click on the Databases folder, if it is not listed try All Tasks|||did you get this to work ?I have attached the database and still could not get the report designer towork with the database.

Adventure works databases

I am new to Analysis Services.

In the adventureworks sample, we have the oltp database (AdventureWorks), the datawarehouse (AdventureWorksDW) and the cube (Adventure Works DW). I am a little lost here. I thought the SSIS package updated the cube directly from the OLTP database.

Looks like the datawarehouse is used to convert the OLTP to a star schema and *then* the cube is loaded.

Could you please explain.

Thanks!

The datawarehouse (DW) is an OLAP multidimensional database that uses data from the OLTP relational database to create cubes, dimensions and so on. Whether the data in cubes is being updated automatically from the OLTP database depends on the settings, specifically the storage type of partition aggregations (MOLAP, ROLAP, HOLAP and variations). Those that are used in Adventure Works by default use MOLAP, which is great for analytical processing, reports and so on. Here is some more information on that: http://msdn2.microsoft.com/en-us/library/ms178416.aspx .

Thursday, March 8, 2012

ADS: Sample application cannot access desktop database

The sample application provided with Access Database Synchronizer fires a "A request to send data to the computer running IIS has failed. For more information, see HRESULT." exception on my WinCE 4.2 device.

I debugged it with VS2005 to see what was going on and found that the problem resides in the line:

m_connDesktop.Pull("MSysObjects","SELECT Name FROM MSysObjects WHERE Type=1 and flags=0",accessSysConnectString,RDATrackOption.TrackingOff,"Err_MSysObjects");

It seems that connection m_connDesktop is ok but calling Pull method fails.

I've verified that SSEvAccessSync service is started when ActiveSync detects device connection and that firewall rules are correctly updated.

Also, i verified my System.mdw and i discovered that there is no "MSysObjects" table (only MSysGroupList, MSysGroupMembers, MSysUserList and MSysUserMemberships queries are there).

Do you think the problem is there?

How can i solve it without damaging System.mdw?

I cannot figure out what's the purpose of this line of code, can you help me?

Just a summary of what i've tried so far (unsuccessfully):

1. Once discovered MSysObjects hidden table, i changed "Tools->Security->Users and groups auth" to grant read privileges to the user used for connection

2. I've tried to change connection string to include "User Id=...". Anyway, connection object is created successfully: the error appears on Pull method invocation

3. I've configured SQL Server (SQLEXPRESS) to accept network connections, enabled SQL Server Browser and changed firewall settings accordingly

Feedback from someone that put it to work needed, please...

|||

Hi Fabio,

MSysObjects is not a hidden table inside System.mdw. It is a system table available with every access database.

The error message you are getting indicates desktop is not accepting packets.You can try the following scenario:

1) Before doing the Sync from Given Sample App. Just check if you have written the configuration information like Desktop URL, User Name etc. correctly. Default port Number through which we communicate is 1024. If you have changed the port number by editing registry , then you need to change your firewall setting and Desktop URL accordingly.

2) System.mdw file is located at "C:\Document and setting\<LOGIN ID>\System.mdw". If your Windows installation drive is not C:\ drive. you can change the driver letter by editing config.xml file located in device at "\Program File\AccessSync\Config.xml" under WIN_DIR node.

3) If above information is not helpful, you can open the internet explorer browser at device side and put the desktop URL in the address bar. If you are getting information "Page cannot be found. check the name and try again". It means desktop is not accepting packet at given port. you can try the same URL at desktop side internet explorer. If it is working at desktop side and not working at device side, it means connection from desktop is not proper through active sync. If desktop side also URL is not working, it means service is not started or you are having incorrect port number in URL.

Let me know if it doesn't help.

|||

Thank you pakumar,

it seems a connection through activesync problem (see 3.):

1. Here's my Config.xml:

<?xml version="1.0" encoding="UTF-8"?>

<SystemNode>

<AccessDB>C:\TestDB.mdb</AccessDB>

<DeviceDB>\My Documents\TestDB.sdf</DeviceDB>

<Login>Admin</Login>

<URL>http://PCNAME:1024/</URL>

<WinDir>C:</WinDir>

</SystemNode>

"Admin" is the Windows user logged in during synchronization.

I have opened port 1024 (not changed any registry key and checked it anyway) and granted access to "svcssevas31.exe" application. Anyway from now on i decided to shutdown windows firewall until problem solved.

2. My Windows installation drive is C:\. Debugging the app, i've verified that the connection string points to the correct location of System.mdw. I've found MSysObjects table and granted r/w data and schema access to Admin user.

3. From desktop it DOES work. From device it DOESN'T. I'm confused about this because:

From device's shell, i can successfully ping desktop IP address (seen as 127.0.0.1) and machine name|||

Further tests:

URL http://PCNAME:1024/ is accessible from desktop machines on the same network (also with firewall enabled).|||

Hi Fabio,

1) I can see you have installed both 2.0 and 3.0 device cabs. You can uninstall all 2.0 cabs sql.ppc.wce4.armv4.CAB and sql.dev.ENU.ppc.wce4.armv4.CAB . you should keep only 3.0 cab bits. That should solve the problem.

2) You have installed Wince 5.0 cab of sample application to WinCE 4.2 device. You can build the given sample application for WinCE 4.2 or PPC 2003 SE and copy the exe generated to \Program Files\AccessSync\ folder in device.

3) You can try the sample application on device emulator also if you have it, just to gain confidence in the product.

Let me know if you require more help.

ADS "System timed out waiting for lock" error


I am attempting to modify the ADS sample to work with my own application and am running into a snag. I have a simple sqlce database that has two tables in it. I have everything working up until the point where I try to "Pull" the data. At this point in time this is what happens.

1.) I successfully Drop Table1 from the SQLCE database and then Pull "Table1" from the desktop database

2.) When attempting to Pull Table2. It runs the DoesTableExist Function, identifies that the table does exist and therefore tries to run the "DropTable" routine before Pulling the desktop Table2 data. As soon as the sqlCmd.ExecuteNonQuery of the DropTable routine runs I get the following error....

"The system timed out waiting for a lock. [ Session id = 1,Thread id = 1318094114,Process id = 1318068802,Table name = Table2,Conflict type = x lock (s blocks),Resource = DDL ][Table2]"

Of Note...I converted the sample to VB.NET so it's possible something didn't convert right? My guess is that it probably has something to with my SQLCE Database but I haven't the slightest clue where to go from there. Anyone have any ideas what might be going on?

Thanks,

Mike
I figured out my problem. Just as the error suggests, there was a lock on my database. But what was causing the lock is confusing me. When my main form opens I do a quick query on the database to retrieve some information. I open my connection to the SQLCE database, I execute a ResultSet, retrieve my data, close my ResultSet and close my connection. The datatable that I perform the ResultSet on is now "locked". If I comment out this code, the datatable is no longer locked.

Why is my datatablle still locked? Is there a way that I can let SQLCe know that I'm done with it?

Thanks!|||

Unless you explicitly Dispose the objects you will have the DB locked as Finalize/Dispose may get scheduled any time depending on GC's love on the object.

Thanks,

Laxmi

|||

Laxmi, why if he has explicitly closed the connection is there still a lock on the db?

ADS "System timed out waiting for lock" error


I am attempting to modify the ADS sample to work with my own application and am running into a snag. I have a simple sqlce database that has two tables in it. I have everything working up until the point where I try to "Pull" the data. At this point in time this is what happens.

1.) I successfully Drop Table1 from the SQLCE database and then Pull "Table1" from the desktop database

2.) When attempting to Pull Table2. It runs the DoesTableExist Function, identifies that the table does exist and therefore tries to run the "DropTable" routine before Pulling the desktop Table2 data. As soon as the sqlCmd.ExecuteNonQuery of the DropTable routine runs I get the following error....

"The system timed out waiting for a lock. [ Session id = 1,Thread id = 1318094114,Process id = 1318068802,Table name = Table2,Conflict type = x lock (s blocks),Resource = DDL ][Table2]"

Of Note...I converted the sample to VB.NET so it's possible something didn't convert right? My guess is that it probably has something to with my SQLCE Database but I haven't the slightest clue where to go from there. Anyone have any ideas what might be going on?

Thanks,

Mike
I figured out my problem. Just as the error suggests, there was a lock on my database. But what was causing the lock is confusing me. When my main form opens I do a quick query on the database to retrieve some information. I open my connection to the SQLCE database, I execute a ResultSet, retrieve my data, close my ResultSet and close my connection. The datatable that I perform the ResultSet on is now "locked". If I comment out this code, the datatable is no longer locked.

Why is my datatablle still locked? Is there a way that I can let SQLCe know that I'm done with it?

Thanks!|||

Unless you explicitly Dispose the objects you will have the DB locked as Finalize/Dispose may get scheduled any time depending on GC's love on the object.

Thanks,

Laxmi

|||

Laxmi, why if he has explicitly closed the connection is there still a lock on the db?