Showing posts with label manager. Show all posts
Showing posts with label manager. Show all posts

Friday, March 23, 2012

Help with a SQL Server 2000 issue

Hi,

I signed up with a hosting service (brinkster.com) – they support SQL Server 2000.

I connected to the remote database using Enterprise Manager without any issues.

I also found an article by Scott Guthrie on how to change the providers to use SQL 2000 instead of SQL Express,(http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx),

but when I got to the part where I have to select a sever and a database (step 3 of the wizard), I got the following message

"Query database list failed"

"Failed to query a list of databse name from the SQL server.

Invalid object name 'sysdatabases'."

I ran the wizard on a local SQL Server and it worked fine!

Is there a workaround?

Please help… Thanks.

When using the wizard, make sure the account used to connect to the SQL2000 has select permission on the sysdatabases, and the default database of the account is master.|||

Thanks, I have been trying to figure out how to make sure the account has select permission on the sysdatabases, and that the default database is master.

I tried connecting to the master database and query the users table, I got an error message saying "Login failed for user 'user'"

It would be great if you can help out some more - point to more documentations/articles.

Again, Thaks.

|||

samirayes:

I tried connecting to the master database and query the users table, I got an error message saying "Login failed for user 'user'"

OK it seems to be a permission issue. What are you using to connect? You can easily check the permissions in Enterprise Manager: connect to the SQL instance-> go to Security->Logins->check the property of the 'user' login (if it is not there, create it)

|||

Brilliant - lori_jay you are fantastic. Thank you.

On the user's properties, I changed the default database to master (it was set to the database set up by the hosting service for the account)

I ran the wizard and voila - it worked like it should.

Do I have to change the default database to what it was, or should I keep it set to Master?

Again, thank you very much.

|||

samirayes:

Do I have to change the default database to what it was, or should I keep it set to Master?

In most scenarios, we can just set the default database to any database we need for the login--this option is just a part of security (login) setting. So there is no need to keep default database as Master, in this case we just set it to master to get the aspnet_regsql utility workSmile Actually the aspnet_regsql could be better: if it retrieve database information from 'master..sysdatabases' not just 'sysdatabases', we do not have to change the default database for the login used in the wizard.

Friday, March 9, 2012

Help w/ SQL Newbie Student

Hi,

I am working on a school project ...

I have the following schema:
<b>
DIVISION (dvname, manager)
DEPT (dname, parent-dname/parent-dvname, manager, floor#)
EMP (ename, salary, dname/dvname)
ITEM (iname, color, price, type)
SELL (dname, iname)
SUPPLY (sname, iname, dname)
</b>
Each of the first fields is the PKey.

I have to figure out the SQL for the following statement:

<b>List the items supplied by all companies that supply all items of type A.</b>

I have gotten this far, but do not understand division in SQL well enough .. I have a relational algebra solution that works ... but am having a hell of a time with a SQL solution ... Please help,

This is what I have in SQL:
SELECT SE.iname FROM SUPPLY SE WHERE NOT EXISTS
(SELECT I.iname FROM ITEM I WHERE I.type='A' AND NOT EXISTS
(SELECT S.iname FROM SUPPLY S WHERE S.iname=I.iname AND S.dname=SE.dname))

I have not work with SQL much so please help out ... I am using SQL Server if that matters ... Thanks

... I have done the frist 49 of the queries ... and they all made sense ... but this one is just bugging me ... PLEASE HELPDon't feel bad. This is not a simple task.

Some questions:
Does this have to be done in a single SELECT statement, or can it be done using a stored procedure or user-defined function that contains multiple SQL statements?

You need to list items supplied by companies, but all I see in your structure are departments and divisions. Please clarify.

Your DIVISION and DEPT tables are kind of a goofy schema, but I suppose you have no control over that?

What is the purpose of the SELL table vs the SUPPLY table? Can we ignore the SELL table?

Is a company considered to be a supplier of all type "A" items if its departments and divisions collectively supply all the items, or does it have to supply the items itself directly?

Can we ignore the EMP table? It appears to have nothing to do with the problem.

blindman|||Originally posted by blindman
Don't feel bad. This is not a simple task.

Some questions:
Does this have to be done in a single SELECT statement, or can it be done using a stored procedure or user-defined function that contains multiple SQL statements?

You need to list items supplied by companies, but all I see in your structure are departments and divisions. Please clarify.

Your DIVISION and DEPT tables are kind of a goofy schema, but I suppose you have no control over that?

What is the purpose of the SELL table vs the SUPPLY table? Can we ignore the SELL table?

Is a company considered to be a supplier of all type "A" items if its departments and divisions collectively supply all the items, or does it have to supply the items itself directly?

Can we ignore the EMP table? It appears to have nothing to do with the problem.

blindman

The assignment had 50 queries ... of all different kinds.

We have to do it in a single SELECT statement (with subqueries of course)

I do not think that an table except the SUPPLY and ITEM are needed but I dont know exactly how they interact ...|||If your answer must be a single select statement, then that eliminates any possibility of searching the departmental hierarchy, and so actually makes the problem easier.

Break your problem into parts.

If you had a list of companies (departments?) then it would be trivial to list all the products they sell, right?

So your task is to create a subquery that lists all the departments that sell all type "A" products. How do you determine if a department sells all of the type "A" products?

The most direct method would be to find Departments where the number of distinct type "A" products they sell equals the number of type "A" products that exist.

The more subtle method (which your code seems to be attempting) is to create a list of departments that DON'T sell all the type "A" items, and then find all the departments that AREN'T on that list. This is certainly a more confusing method than the product count technique, but it may have some efficient advantages for extremely large tables. I don't know. But I do know you can get a list of departments that don't sell a full line of type "A" products by using a FULL OUTER JOIN between DEPARTMENT and a list of type "A" suppliers.

blindman

Help w/ parameter(s)

Trying to add a parameter to filter data by production manager. Problem: the choices for the parameter are (i.e. Mark, John, John, Tony, Mark, Mark, Mark, Lee, etc). How do you make it so the choices are only (Mark, John, Tony, Lee, etc)?

Create a second data set in the report with SQL code similar to below. Then in Reporting Services parameters, set the parameter for mulit-value and the data source to the second data source you just created.

Select Distinct Production_Manager

From ManagerDatabaseTableName

Order by Production_Manager

|||Thanks for the help Chuck

Sunday, February 19, 2012

Help referencing Report Path in SharePoint Report Viewer

I put in a Report Viewer in one one my webpart buckets. I'm trying to set the properties now. I set the Report manager URL to:

http://myservername/Reports

The problem comes when trying to specify the report path. I'm not sure where this is stored...I just tried taking it from my URL when I ran the report but this doesn't work:

Pages/Report.aspx?ItemPath=%2fa_dashboard%2fa_dashboard

Where exactly is the directory or path I need to poitn to and how do I figure out how it should be formed?

screen shot: http://www.webfound.net/reportpath.jpg

Report Manager URL

http://myserver/reports/

Report Path

/myfolder/myreport

|||I understand this but I tried that. /myfolder/myreport where does this stem from? I tried pasting in the foldername that shows in Report manager for my report (the yellow folder you see) but that's not working.|||You know what, thanks it worked. I was missing the other half..the report name!