Project Web Access, Resources from Databases - project-server

Is there a way to retrieve the resources (names) of a current project? Here at my work we work with the Scrum methodology, so in each sprint we create a new project file.
Each project file is synced with PWA (Project Server Web Access). I have permission on the database to retrieve information.
Is there a way to pull resources names from the database?

Yes you can, but it depends on the version of Project Server you are using.
Project Server 2007
This version introduced the reporting database. It is populated whenever a project is published. (You can query unpublished data by using the drafts database.)
Microsoft have provided a report pack which may already contain the report you need. It also contains many examples on how to use the reporting database.
The complete database schema is available for download in the Project 2007 SDK (look for pj12ReportingDB.chm).
Project Server 2003
As this is an older version there is less information available, however there are example queries from EPM Central that show how to query resources.
The complete database schema is also available from Microsoft.

Related

add custom module to a published dnn site

I have a client site as a published dnn website hosted on a local server in the organization's premises.
I have developed a new module using the source code that fetches data using a stored procedure.
This is what I did to transfer the changes to the live site
1. I created the stored procedure manually on the live sites DB,
2. I published the site and replaced the content of the website folder with my published site.
3. I added the new module in the live site using the "Module Definitions" option found under the "Host" menu
Everything works perfect in the development environment, but When I publish the site and do the update on the live server , the module returns no data as expected.
Can someone guide me through how to moves the stored procedure and my new published site to the live site.
I would recommend creating your module as an installable zip file including SQL for creating the stored prods and any other db changes required.
There are a number of tutorials around that will help with this and the templates build by Charles Nurse are a great help in getting your head around good practice. (http://www.charlesnurse.com)
In the mean time have you checked the permissions on the SP in the live database. That may well be your issue.
James

Transfer TFS Work Item Queries from locally installed TFS to visualstudio.com

Is there any way to move custom queries I've setup in my company's locally hosted TFS server to my instance of TFS on visualstudio.com? I've Googled/Binged/Yahoo'd and even DuckDuckGo'ed around and asked other devs using the service but none of them had any saved queries they wanted to move, so no one had done any researching yet. After a few fruitless searches I've turned to the experts here on SO. Anyone find anything about this they can share?
The usual suspects when it comes to TFS Migration (namely the TFS Integration Platform) does not support moving project or personal queries. Depending on the quantity of queries, a manual recreation is obviously possible. However, if there are a significant number, then another option is to use the TFS SDK (Microsoft.TeamFoundation.Client and Microsoft.TeamFoundation.WorkItemTracking.Client). Within there, you can access the "My Queries" and project queries, including their folder hierarchy.
One example of this is available on Mike Poulson's blog where he shows going from a TFS 2010 -> TFS 2012 server. While this example is targeting on-prem, the same holds true for a move from TFS on-prem to Visual Studio Online.
Some of the queries may need "translation" in the migration process (naming differences, etc), using the SDK can also help in that process. So at the end of the day, it's a tradeoff between a manual recreation vs effort to code/debug/test a solution with the SDK.

Orchard partial deployment to production

I'm currently looking into Orchard CMS to use for my new projects. With other CMS systems that I use, information related to new functionality is sometimes stored in the database (data, configuration, language items). Deploying this functionality to a production site (already running with it's own database ect.) is done using packages which "install" the data in the production database.
How is this done using Orchard? Or is all functionality file-based and can it be easily deployed using XCopy when a site is already running in production?
There is an import/export feature that you can use to transfer data and settings between Orchard instances.

Discovering sqlserver installed on the machine

I'm going to deploy an application click once and wondered what the best technique for dealing with the database, since the click once install sqlserver to me I was wondering how I determine the sqlserver installed so that when the application is first run, see it and create the sqlserver database.
I would not use the windows install to distribute this application because it will have multiple versions of update, and would be easier with clickonce.
Which flavor of SQLServer are you using? Here's some helpful information.
If it is SQLServer Express, you need to add the database to your project and set the build action to 'content' and set 'copy to output directory' to 'copy if newer'. This will ensure the database is included in the deployment.
Next, go into the prerequisites dialog and select SQLServer Express. When the user runs the setup.exe, it will check and see if it is installed, and if not, will install it.
If you want the newest version of SQLServer Express, you can find how to create a bootstrapper package here -- Microsoft doesn't provide one, but this article provides the XML you need and provides links to the SQLServer Express downloads.
If you are using SQLCE, you need to attach the database (*.sdf) to your project and set the properties as noted above. However, you do not need to publish this as a prerequisite, you can just include the dll's in your project as noted here.
When your publish a new version, if the database has changed, ClickOnce will put the new database in the DataDirectory and put the old one in the \pre subfolder of the DataDirectory, and you have to write code to handle that. This sounds appealing, but I think it's dangerous. If you even so much as open your database to look at the structure, it will change the date/time stamp, and ClickOnce will think it's new and publish it, and you will get calls from your customer about their data missing, unless you handle this.
So I usually recommend you copy the database to LocalApplicationData when the user first installs your application, and handle any updates to the structure programmatically after that. There is an article about how to do that here.

Source control for MS Dynamics CRM

I'm undecided about CRM at the moment. It's a great tool for the business users but so far for development it's been a bit against the grain. The next problem I need to tackle is how to easily source control javascript used within forms. We use TFS for our source control.
Anyone had an experience or have any ideas on how to do this?
Obvious choice would be to copy and paste the JS in to your source control, but it's also an obvious pain in the rear.
A couple of things that we do in our projects:
We use the Web Resource Utility included with the CRM SDK (actually a modified version of it) to deploy JavaScript web resources to a particular solution. Makes it very easy to keep script files checked in to source control as normal and avoid copying and pasting.
We wrote a custom HTTP Module that we use on local deployments. It intercepts requests for JavaScript libraries and redirects them to a location on local disk. That way, we don't have to actually redeploy the web resources as we test, just the JavaScript files to disk. (Note that this would be unsupported in a production environment. We just do it in our development environments to ease the pain of JavaScript deployment).
I answered a very similar question here - Version Control for Visual Studio projects and MS Dynamics CRM (javascript)
My choice for source control is TFS holding each of the 2011 JScript libraries.
We try to mirror the file structure that Dynamics uses for Web resources in a basic Library project. So version control works as normal, we just don't use the output from the project.
You can also try using the new "CRM Solution" project template (installed from the SDK) and have the ability to deploy from the context menu of the project.
I've had some issues with the template but something to check out.
Hope this helps.
You can take a look on my answer on my own question here.
MS Dynamics CRM 2011 SDK has solutionpackager.exe utility what could split all CRM resources into file tree and you can store them either in git or in tfs.
Any web resource in CRM 2011 is a pain to manage. We just end up doing a lot of copy pasting in and out of TFS 2010 (which has actually caused some problems with poor pastes).
Currently out of the box there isn't an easy way to do it.
Only worry about this if you really need the ability to go back to old versions of web resources. I've found that I don't often have to do this. Remember that the web resources are stored in SQL Server just like they would be if you put them in TFS, so as long as your CRM database is being backed up, you won't lose the web resources. In traditional development, it is important to keep the source in TFS because you can't easily get back to it once you compile and release. With CRM development, your web resources are mostly HTML or JavaScript, so you can always get at the source.
If you really need version control, why not build a quick little console app that downloads all customizations every night and stores that zip file in TFS? True, it wouldn't be as easy to get at older versions, but you should gain a lot of productivity by not having to manually keep TFS in sync. This also has the benefit of storing all customizations in TFS, not just web resources.
Silverlight is the obvious exception here - I would definitely store Silverlight web resource source code in TFS, because it is a "compiled" web resource. You are already in Visual Studio, so TFS is a natural fit anyway.
Hope that helps!