How to remove a file from Sharepoint with SQL - sharepoint

YES i know, that you'll never want to use SQL for changing data in Sharepoint.
I have a lot of files in my Sharepoint record center.
I have one corrupted file that i can't delete.
I tried to delete with a solution, with powershell etc, so my last option is delete is from the database.
It's a test envirioment where i want it to use.
SQL is my last chance.......

Have you tried the SPContentDatabase.Repair method?
You haven't stated what you attempted to do in your solution, Powershell script etc. You might get other suggestions that might be less of a threat to your environment.

All your items live in "AllUserData" table. It is, by the way, documented in MSDN: http://msdn.microsoft.com/en-us/library/dd358229(v=prot.13).aspx (surprise for me)
However, you will need the site id and list id of your item.

Related

Microsoft Dynamics CRM 2011 best solution to change entity's field data type

I'm having an issue on changing data type of a field in Dynamics CRM 2011 On Premise deployment.
In my managed solution, name it "Solution 1", I have a custom field in contact entity: "new_usernumber" of type number (int). I want to change it to string as per new client's requirement (for new users they want to add prefix to it).
I can uninstall the solution and deploy the new "fixed" managed solution, but this requires me to delete the value on my custom fields. Is there any better solution for this?
TIA
There is no easy way to do this. If you don't already have data deployed in the instance using the managed solution I recommend deleting it and importing a corrected managed solution file.
There is no supported or unsupported process of changing the data type(or logical name) of a field without data loss. What you will need to do is add the new field and then write a quick update utility to copy the data from the old field to the new field.
Here is a great article on exactly how to pull off deleting a field in a managed solution. Note, if you are trying to preserve data you'll need to run the update after the step "Import devkeydetDeleteExample_1_1_HOLDING.zip"
Have fun...this is a pain, but certainly doable!
A few months ago I recreated fields in a solution (from double to int). That was a huge mistake. I'm still not sure where things went wrong but they did go wrong. Not only did I lose the date. I managed to introduce errors in the meta-layer so our MVP had to sit dear help me get it running again. He wasn't happy. I wasn't happy. The customer wasn't happy (ex-customer today, mostly because of that).
So, my humble advice - don't do that. Declare a new field instead. If you have usernumber, keep it but start using userNumberString (or userString, userName etc.). My guess is you'll keep your hair longer that way.
And if you manage to succeed, please do tell. :)

Export list of Sitecore items as Excel (or other formats)

I noticed that sitecore has the option of exporting users in an Excel format.
I need to have similar functionality for exporting 'participations', (a users can enlist to take part in an 'event', and if their entry is approved via a sitecore workflow, a 'participation' item is created in the content tree)
Since mostly everything in Sitecore is in essence based on items, and I want to export items to Excel, my question is - what are some of the best ways of doing this?
Questions:
Is there a way to re-use this functionality for regular items?
Would it be a good idea to create a custom admin page (any tips on doing this?) which has some custom code that reads the items from the database using the API?
are there sitecore plugins/shared source projects that can help me achieve this?
Or does anyone have a better idea? - would it be better to just store the participations in SQL? I'm mostly doing it this way because I want to make use of the 'free' functionality offers, for example workflow, but if that leads to me using anti-patterns please shoot me ;)
Link is different now: https://marketplace.sitecore.net/en/Modules/Advanced_System_Reporter.aspx
P.S. Couldn't leave a comment to original answer as I don't have enough reputation. Oh well :)
Found a most excellent shared source module which does exactly this (and much more)!
Basically it allows you to configure (and easily extend, if you need to) any kind of table based report on 'items'.
The report module shows up as an application in the sitecore menu (like the user manager tool) and comes with features such as xml,csv, xls export. It's also really easy to set up, once you get the hang of it.
http://trac.sitecore.net/AdvancedSystemReporter

how to store list values to database

How to store list values to Sql server database?
Anybodies have any idea about this?
There are quite a few ways to this, Codeplex has several SSIS ways of doing it here http://sqlsrvintegrationsrv.codeplex.com/
There are products which can do it too. http://www.simego.com/products/Data-Synchronisation-Studio
Depending on the data you could use the access view or export to excel and then import...
I'd almost suggest moving this back to serverfault.com
If you want to program it your self, you will probably need to look at the List web service.
I have some code(c#) that pulled from a wss2 site and pushed it to a wss3 site which I could take sections out to show you -
But I think you need to add a bit more detail to your question.

SharePoint: How can I clean it up, without reinstalling?

I've made a mess of MOSS (well not really, just that I've created some site columns that are now impossible to delete).
Is there any way I can revert to a default installation without reinstalling everything?
Failing that is there a way to force delete site columns?
Update
Basically another "typical day developing around Sharepoint..." moto, with Sharepoint it is 100% probable something will go wrong.
I have Site Columns that can't be deleted, because they're "bound to a content type, that I've already deleted"
If you are created custom columns on Document Library level you just need to delete Document Library
In case you created custom columns at site collection level you should delete your site collection and create a new one. New site collection will not be affected unless you made some non-supported customizations to "12 hive".
In both cases you can solve the problem without reinstallation.
Hope it helps,

"Refresh" SharePoint site column definition on lists that use it?

We deployed a feature that installs a custom site column named "Classification." It is a Choice column type. Now, we need to change the choices. We can update the XML in the feature easily enough, but it doesn't affect any of the lists already used the existing site column; they still see the old choices.
Is there any way to send a refresh signal or something to the lists that use our Classification site column feature to have those lists use the updated choices?
I think the only way to archive this is by iterating each list that uses the column and change the XML there as the column within a list has no reference to the original column any more.
Flo has a point, and I have previously been working with this issue and have made a blog post that might help you out somewhat. Have a look:
http://johanleino.wordpress.com/2009/08/11/propagating-updates-to-content-types/
SharePoint can do this.. Don't change your feature but modify the created site column in each site collection through the web UI. Changes made this way will propagate.
(I hope you don't have 10.000 site collections ;)

Resources