No me hago responsable si copiaste mal algún código que sale en las páginas de este sitio.
Ojalá sea de ayuda para más de alguno este sitio.
Se agradece si deja algún comentario.
Mostrando entradas con la etiqueta MOSS2007. Mostrar todas las entradas
Mostrando entradas con la etiqueta MOSS2007. Mostrar todas las entradas

lunes, 29 de noviembre de 2010

Documents becoming "locked for editing" by self, when no other edits are happening

Desde la vista datasheet, cuando intentas editar algún campo en forma masiva, y por esas casualidades, ya lo habías editado antes, pero en algo te equivocaste, y vuelves a desplegar la vista datasheet, para editar el maldito campo nuevamente, te aparece en la barra de estado, un mensaje "locked for editing". Pasa mucho, especialmente con los .doc, .xls, .pdf.

No sabía a qué se debía hasta que encontré estos artículos:
http://social.technet.microsoft.com/Forums/fr-FR/sharepointadmin/thread/7966c35d-b815-4951-8374-d64840ccf16c
http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/4c6f9e85-44cf-4e03-b9c3-626dc4adeb80


"This is because when a document is opened by a client program, Windows SharePoint Services puts a write lock on the document on the server. The write lock times out after 10 minutes. Users cannot modify the document during the time when the document is locked. To work around this behavior, wait 10 minutes before opening the document again.

I think this KB article can help you: http://support.microsoft.com/kb/899709

Let me know the result.

Xue-Mei Chang"


El documento queda bloqueado por 10 minutos...

Que lindo no...

xD

Documents becoming "locked for editing" by self, when no other edits are happening

Desde la vista datasheet, cuando intentas editar algún campo en forma masiva, y por esas casualidades, ya lo habías editado antes, pero en algo te equivocaste, y vuelves a desplegar la vista datasheet, para editar el maldito campo nuevamente, te aparece en la barra de estado, un mensaje "locked for editing". Pasa mucho, especialmente con los .doc, .xls, .pdf.

No sabía a qué se debía hasta que encontré estos artículos:
http://social.technet.microsoft.com/Forums/fr-FR/sharepointadmin/thread/7966c35d-b815-4951-8374-d64840ccf16c
http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/4c6f9e85-44cf-4e03-b9c3-626dc4adeb80


"This is because when a document is opened by a client program, Windows SharePoint Services puts a write lock on the document on the server. The write lock times out after 10 minutes. Users cannot modify the document during the time when the document is locked. To work around this behavior, wait 10 minutes before opening the document again.

I think this KB article can help you: http://support.microsoft.com/kb/899709

Let me know the result.

Xue-Mei Chang"


El documento queda bloqueado por 10 minutos...

Que lindo no...

xD

martes, 26 de octubre de 2010

How to Create a MOSS 2007 VPC Image: The Whole 9 Yards

http://www.pptspaces.com/sharepointreporterblog/Lists/Posts/Post.aspx?List=7537e639-b4e5-48b6-97c0-a75e44ee9be3&ID=28&Source=http://www.pptspaces.com/sharepointreporterblog/Lists/Posts/AllPosts.aspx


martes, 5 de octubre de 2010

Plantillas de sitio nativas MOSS2007

http://blah.winsmarts.com/2007-7-All_you_ever_wanted_to_know_about_SharePoint_2007_Site_Templates.aspx


What are site templates?
Sometimes, you need to create the cutter for sites, so you can create cookie cutter sites easily. SharePoint comes with a few such cookie cutters out of the box. You might have seen this cookie cutter picker when creating a site/site collection etc. as shown below:

Those are usually site definitions (not Site Templates). I have covered the process of registering custom site definitions over here.
The obvious Q here is, How are Site Templates different from Site Definitions?
Site Templates vs. Site Definitions
  1. Site Templates are a LOT easier to create than Site Definitions. You can create a site template using point and click. Creating a site definition requires hand-coding a lot of XML files and other supporting files.
  2. Site templates serve a customized version of pages, i.e. low performance. Site definitions serve uncustomized pages, i.e. high performance. Thus you should choose site definitions over site templates, if a large number of sites will be created based on this cookie cutter.
  3. It is fairly easy to move around a site template. It is a tad bit (but not horribly more) complex to move around site definitions.
How to export a site to a site template?
Pretty darned easy. Go to http://<yoursiteaddress>/_layouts/savetmpl.aspx . Note: There is no  UI point and click that takes you to this URL for a site, so note this URL down.
You are presented with the following form.


Fill it out, and hit "OK". The template file (.stp) gets saved under the Site Template Gallery, which can be accessed by going to the Site Collection, Site Actions --> Site  Settings --> Modify All Site Settings, and clicking on the "Site Templates" link under the "Galleries" section. As you can see, the entire site got squeezed into a single .stp file (which is really a cab file). Quite impressive. :-)
How to register a site template inside a site?
AND
How to restrict certain sites to use only certain site templates?
Okay, so now you have created a cookie cutter for your site. The next obvious question is, "How can I use this cookie cutter?".
EASY!
a) You need to make sure that the site template exists on the site collection. This can be done by uploading an existing site template to the site template gallery. As mentioned above, the site template gallery can be found by going to the top level site in the site collection, then going to Site Actions --> Site  Settings --> Modify All Site Settings, and clicking on the "Site Templates" link under the "Galleries" section. Alternatively, you may also use the stsadm -o addtemplate command.
b) The next step is that you need to make this template uploaded in the gallery available to individual sites. So that is basically saying that Site A can use template X, but Site http://A/B can use only template Y. You would note for instance that out of the box, a publishing site lets you choose only "Publishing site with workflow" definition based sites as child sies. Well you can change that.
1. Just go to http://<yoursiteurl>/_Layouts/AreaTemplateSettings.aspx NOTE: Note down this URL :-), there is no point and click way of getting to at the site level. At a site collection level, you may use Site Settings -> Modify all Site Settings -> Page Layouts and Site Templates to reach the same page.
2. Pick the templates you'd rather have available as shown below:

.. and hit "OK". Now the appropriate site templates will show up in the cookie-cutter-picker. :-) w00t! 
Ummm .. thats about it as far as site templates go. Anything I missed re: Site Templates? Leave a comment or send me a message.

Registrar definición de sitio personalizado en MOSS2007 (site template)

http://blah.winsmarts.com/2006-12-Registering_your_custom_site_definitions_in_SharePoint_2007.aspx


Last night, Carl and I did end up recording the sequel to the first SharePoint 2007 DNRTV show we did earlier. In this episode, I had a chance to talk more about content types, and then I ran through a full-fledged example demonstrating an InfoPath Forms Services based solution solving a real life problem. And then after that I demonstrated creating KPI (key performance indicator) reports based on data collected via infopath forms running in a web browser.
All in all, the show I think, turned out quite well. I will blog about it when it is online.
But, that is not what this blog post is about. When Carl and I were recording, based on a conversation, I had alluded to the fact that you can create your own site definitions and register them within SharePoint 2007. How you ask? It’s a question of twiddling with a bunch of XML files. To which, of course the developer world comes to a screeching halt.
Yes, SharePoint does suffer from XMLITIS, but I have blogged about that as one of the criticisms, and let us get over that.
The real Q is, how can you, register your own site definitions. Well here is how.
1.
First you need a custom site definition. As you may be aware, a custom site definition is nothing but a logical grouping of features, lists, web parts, and a whole bunch of other things, that together make a site. For instance, I could create a custom site definition for a “Blog reader” application. (Speaking of which, in a week or two, the next issue of code-magazine will contain an article from me, demonstrating exactly how to create a blog-reader application a.k.a. bloglines/newsgator etc in SharePoint). All site definitions reside as a bunch of files at the following location.
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates
(Note: I am almost done reviewing Scot Hilier’s upcoming Apress book on SharePoint 2007. He explains this very well in Chapter 11, and I strongly recommend you picking a copy of it – the book is simply excellent, and yes I will post a full review later).
Now in that directory, there are a bunch of site definitions already created. You can create one of your own, but since this blogpost doesn’t talk about that – go ahead and copy paste, “BLANKINTERNET” to a directory called “Sahil”
2.
Now ideally, the directory “Sahil” which contains the details of your site definition, should contain something meaningful in it – so a blogreader site definition will contain the necessary lists, features etc. But ignoring that, let us next look at, how you can register this new Site definition, in SharePoint.
Now at this path –
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\
You would note a curiously named directory called “1033”. 1033 is the culture number for en-us (US English). Under 1033\Xml, there are a bunch of XML files. Strangely enough, many of them are named as “WebTemp*.xml”. That is where you need to put this new site definition’s information, so SharePoint will understand it. Go ahead and copy paste webtempsps.xml and call the new file webtempsahil.xml. The name is important, since SharePoint will look for all files that match “WebTemp*.xml”.
3.
Now go ahead and edit the webtempsahil.xml file to look like as below.
<?xml version="1.0" encoding="utf-8"?>
<!--
 _lcid="1033" _version="12.0.4407" _dal="1" -->
<!--
 _LocalBinding -->
<
Templates xmlns:ows="Microsoft SharePoint">
  <
Template Name="Sahil" ID="10001">
    <
Configuration ID="0" Title="Sahil's site" Hidden="FALSE"                  ImageUrl="/_layouts/1033/images/IPPT.gif"                   Description="This is the custom site I was talking about."                  SubWebOnly="FALSE" DisplayCategory="Winsmarts">    </Configuration>
  </
Template>
</
Templates>
A few things that will jump out at you from the above XML file.
  - ID must be greater than 10000, so your IDs don’t screw up SharePoint’s.
  - You have a whole bunch of other control from the various possible elements, I think the above are self-explanatory.
4.
Now go ahead, and do an iisreset, and try creating a site collection under SCAW (SharePoint Central Web Administration), or a site under a site collection through various means. You should see something like the following in the page that prompts you to create new sites:
Sharepoint 2007 Site Definition 
Note that the text, the image, and everything else has been picked from WebTempSahil.xml.
Now how cool is that J!!? Now you can merrily create your custom site definitions, register them, and create them on a per-demand basis.
In further blog posts, I will cover various other aspects of Site Definitions. Until then, Rock On!!

Filtros y búsqueda personalizada (filtro fecha) operador ><=

http://www.codeproject.com/KB/aspnet/SPCustomSearchResults.aspx
http://geeks.ms/blogs/ciin/archive/2009/11/12/sharepoint-2010-novedades-en-b-250-squedas-i.aspx
http://www.sharepoint911.com/blogs/john/archive/2008/06/14/creating-a-custom-advanced-search-by-building-strings-with-javascript.aspx
http://tqcblog.com/2007/10/creating-a-custom-advanced-search-box-in-moss-2007/?id=6
http://geeks.ms/blogs/ciin/archive/2008/10/15/personalizando-las-b-250-squedas-en-wss-3-0.aspx
http://dattard.blogspot.com/2007/11/sharepoint-2007-creating-custom.html
http://blogs.msdn.com/b/joelo/archive/2007/01/18/powerful-keyword-and-property-search-in-sharepoint-server.aspx
http://www.ba-insight.net/blogs/sharepoint-search-expert/archive/2010/02/04/sharepoint-server-2010-search-the-good-news-and-the-bad-news.aspx
http://blogs.msdn.com/b/sharepointdesigner/archive/2008/02/25/filtering-and-formatting-with-date-values.aspx

problema con los timer job de sharepoint

http://mindsharpblogs.com/ben/archive/2007/09/25/2965.html
http://www.sharepointbuzz.com/archive/2007/01/12/sharepoint-2007-timer-service-and-timer-jobs-owstimerexe.aspx
http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=313

Video Streaming in SharePoint 2007/Media Player in SharePoint 2007

http://csharptalk.blogspot.com/2008/09/video-streaming-in-sharepoint-2007media.html

The idea came that I need to do video streaming in SharePoint 2007, I did small research and found 2 ways to do such a thing:

Method1:

1. Add Content Editor Web Part into your page.
2. Edit the properties of the web part.
3. Click the “Source Editor”
4. Simply copy and paste this code:

<\OBJECT id="VIDEO" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">
<\PARAM NAME="URL" VALUE="http://sitename:42875/Documents/CocaCola-Jump.wmv">
<\PARAM NAME="animationatStart" VALUE="true">
<\PARAM NAME="transparentatStart" VALUE="true">
<\PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<\PARAM NAME="AutoStart" VALUE="false">
<\PARAM name="uiMode" value="mini">
<\PARAM name="AutoRewind" value="true">
<\param name=enableContextMenu value=false>
<\OBJECT>
Explanation: the idea behind this code is simply you create an object with a classid that indicates windows media player version 7. This code will create an embedded instance of windows media player and plays the video you uploaded in your document library.
Method2: Media Player Web Part

It’s a readymade media player web part that runs an instance of windows media player and plays all the type of files the player can play, and the credit for this web part goes to the owner who built it as you will see in the link.

1. Download the web part from this link:
http://www.sharepointblogs.com/files/folders/ajp/entry3059.aspx
2. Copy the mediaplayerwebpart.dll to the bin folder of your MOSS web site.
3. Open the web.config of your site and add SafeControl entry like this: <\SafeControl Assembly="MediaPlayerWebPart, version=1.0.0.0, Culture=neutral, PublicKeyToken=4907dffeafb11512" Namespace="NFWebParts" TypeName="*" Safe="True" />
4. Inside your site, go to Site Actions > Site Settings > Modify All Site Settings > Gallery > Web Parts
5. Click New > select the media player web part > populate gallery
6. Now your web part is there, you can use it in any page and play videos
Hope this article was useful for all.

SharePoint kill process

En la base de datos master, abrir New query. Ejecutar lo siguiente:

SELECT spid from master..sysprocesses
WHERE blocked = 0
AND spid in (select blocked from master..sysprocesses)

Ver a qué proceso corresponde, ejecutar lo siguiente:

SP_WHO2

Para matar algun proceso, ejecutar kill + SPID. Ejemplo:
kill 189
kill 120

martes, 7 de septiembre de 2010

Detaching Databases in MOSS 2007

Detaching Databases in MOSS 2007

Author: Julian Corlaci | Published: 13th May 2009
While database maintenance is performed, few things have to be considered and executed to keep your Sharepoint environment healthy. If you are detaching databases from a production environment, preparetomove is a must.
Any database attached to MOSS 2007 farm and feeding from an SSP has to have stsadm -o preparetomove executed prior to the actual detach from the farm.
IT WILL break the relationship between shared service provider and database if preparetomove is not used. This relationship can be repaired but it will lose the part of search index that relates to that database.
The full command is below.
stsadm -o preparetomove
               {-ContentDB <DatabaseServer:DatabaseName> |
                -Site <URL>}
               [-OldContentDB <uniqueidentifier>]
               [-undo]
For detaching databases the clean way from the farm follow these two commands:
stsadm -o preparetomove -contentdb SQLSERVER:DBNAME -sitehttp://www.yoursite.com
And remove database from farm:
stsadm -o deletecontentdb -url http://www.yoursite.com -databaseserver SQLSERVER -databasename DBNAME
When you’re ready to reattach your database to the farm follow this only step:
stsadm -o addcontentdb -url http://www.yoursite.com -databasename DBNAME -databaseserver SQLSERVER
What this does? It tells the SSP that you are relocating this database and prepare to get a new database GUID. It tells the system that the current GUID for databaseA is stale and that when this database name is picked up the next time in the crawl to replace its GUID. This way it will shift all of the Site information and indexs for the old database to the new database GUID.
If you fail to use this command prior to the move it will create a stale entry in your SSP and all sites going forward in the database will not be crawled. Additionally it will create a pretty ugly error in your web front end application log that looks similar to the following.
Failure trying to synch web application 01a25da2-4443-4b10-4268-721ava7cga32, ContentDB 37301203-u279-4b4j-ad5a-e8y2544d11en: A duplicate site ID 1b4a4382-we21-4e0h-ba57-2567858g41ua(http://portal/site) was found. This might be caused by restoring a content database from one server farm into a different server farm without first removing the original database and then running stsadm -o preparetomove. If this is the cause, the stsadm -o preparetomove command can be used with the -OldContentDB command line option to resolve this issue.
For more information, see Help and Support Center athttp://go.microsoft.com/fwlink/events.asp
There is much more to this offered resolution.
First you need to find out which databases are currently not in sync, this can be done from a simple stsadm command on your SSP web front end.
stsadm -o sync -listolddatabases 5
This command will list all databases that have not synced up correctly with the SSP in greater than 5 days. Based on your schedule to index your age value may change. You may want to change this value to 10 or 20. The result set returned is a list of database GUID’s and the date/time they were last synchronized. Now that we have determined the list we need to clean them up and get those guys synced. To do this we execute an stsadm command that sets all of those GUID’s as old, then during your next index it will pick up the new GUID’s for your production databases not currently being synced.
stsadm -o preparetomove -contentdb sqlserver:dbname -oldcontentdb <GUID>
where sqlserver is where your content is located, dbname is any database in your child farm, and GUID is a guild from the list of non-syncing databases we generated with the above command.
Based on your crawl schedule wait until the next full crawl. Once it completes go back into your SSP and run the stsadm -o sync -listolddatabases 5 command again. Anything left can likely be removed at this point. You can remove what is left by running the following command.
stsadm -o sync -deleteolddatabases 5
this will delete all GUID entries in the SSP for anything that is out of sync for more than 5 days. You have now successfully cleaned all inconsistencies with syncing in your SSP. All out of sync alerts should now be removed.
Remember! Use stsadm -o preparetomove before detaching any databases!