Source Code Table in sgvault (v6.0.1)

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Chiramisu
Posts: 38
Joined: Tue Oct 23, 2012 12:13 pm
Location: Oregon

Source Code Table in sgvault (v6.0.1)

Post by Chiramisu » Mon Jan 21, 2013 5:45 pm

Which table in the sgvault database contains the actual source code files, and are they text searchable? I would like to construct a query to search all my non-binary files, in all my repositories for a certain keyword. I understand this will be a VERY slow query, but I'm trying to find some VERY old code which I believe to be hiding in one of our hundreds of project folders in our many repositories.

Thanks,
Matthew

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Source Code Table in sgvault (v6.0.1)

Post by lbauer » Tue Jan 22, 2013 10:20 am

Your source code is stored in sgvault.dbo.tblfileinfo. It is stored as BLOBs, binary large objects, which are not searchable.

However, Vault 6 has a Find in Files feature that creates a separate indexed database and allows you to search the code in your repository with the Vault Client.

Find in files, or indexing, needs to be enabled in the Vault Admin Web Client first.

This setting is in the Admin Web Client under Source Control Repositories->(Repository name)->Find in Files.

Once the indexing is complete, you can search that repository in the Vault GUI Client under Tools->Find in Files.
Linda Bauer
SourceGear
Technical Support Manager

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Source Code Table in sgvault (v6.0.1)

Post by lbauer » Tue Jan 22, 2013 1:27 pm

Another option is to use the Command Line Client for the Find in Files search.

The Command Line Client is Vault.exe and is in the Vault GUI Client directory.

Documentation here:

http://download.sourcegear.com/misc/vau ... INDINFILES
Linda Bauer
SourceGear
Technical Support Manager

Chiramisu
Posts: 38
Joined: Tue Oct 23, 2012 12:13 pm
Location: Oregon

Re: Source Code Table in sgvault (v6.0.1)

Post by Chiramisu » Wed Jan 23, 2013 12:21 am

I've tried to enable Indexing, but the setting just won't take. (FYI, my sgvault is ~25GB and sgindex about 3MB).

I remember trying this in the past and having the same issue. The indexing just doesn't want to enable for me. It's not throwing any errors or providing any message either. :(

Here's what I'm trying to do simply to enable the Find in Files feature:
1. Click "Default Repository Settings"
2. Tick "Enable Find In Files"
3. Click "Apply to repositories..." button
4. Click "All" to select all repositories
5. Click "Ok" to apply option to all repositories
6. Click "Save Default Repository Settings" button to apply changes
7. Received message "The settings have been saved."

... then when I click on "Default Repository Settings" to refresh the settings page, "Enable Find In Files" is now un-ticked, and none of the repositories have the setting applied, as all still read "[NOT_INDEXED]."

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Source Code Table in sgvault (v6.0.1)

Post by lbauer » Wed Jan 23, 2013 8:23 am

Since your database is fairly large, I'd suggest trying to enable one repository at a time. Also, be sure you have enough disk space for sgvaultindex to grow. Since sgvaultindex contains the latest version of your code in a searchable form, it can become almost as large as your sgvault database.

You may also need to check the configuration of the index service.

See this troubleshooting guide for help:
http://support.sourcegear.com/viewtopic ... 13&t=21347
Linda Bauer
SourceGear
Technical Support Manager

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Re: Source Code Table in sgvault (v6.0.1)

Post by GregM » Thu Jan 24, 2013 11:28 am

Does the indexing service only search mergeable files? If not, is there a way to exclude specific extensions? Our repository includes a large amount of non-text files where it makes no sense to index them.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Source Code Table in sgvault (v6.0.1)

Post by lbauer » Thu Jan 24, 2013 3:17 pm

Find in Files will only index files it detects as being non-binary.

There is an xml element in in the Find in Files web.config file named "file_ext_exclusions." This is a list of file extensions find in files will not index. You can add additional file extensions to the list of exclusions.
Linda Bauer
SourceGear
Technical Support Manager

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Source Code Table in sgvault (v6.0.1)

Post by lbauer » Thu Jan 24, 2013 3:40 pm

Note: if you add file extensions to the exclusion list after the repository has already been indexed, you must stop the Find in Files index service, purge the index, then re-index for the exclusion to take effect.
Linda Bauer
SourceGear
Technical Support Manager

Chiramisu
Posts: 38
Joined: Tue Oct 23, 2012 12:13 pm
Location: Oregon

Re: Source Code Table in sgvault (v6.0.1)

Post by Chiramisu » Fri Mar 15, 2013 8:21 pm

Hello Linda, I'm sorry for the terribly late reply. I've been incredibly busy and haven't had time to read and troubleshoot this until now. I read through the article you supplied and I have a couple notes. Bottom line is I'm still unable to activate indexing even for a single repository. To answer your earlier concerns, as you can see my index has unrestricted growth, and the file size is only 3MB making it all the more obvious that the indexing is not occurring.

Image
Image

In response to the troubleshooting guide, I cannot find the "Plugins page" referred to in this guide. It wasn't exactly clear where to look but I checked everywhere I could think of, for example in the Admin tab -> Server settings as shown below.

Image

Here is my plugins table (127.0.0.1 is an obfuscation, actually uses the url to my Vault server):

Image

Here are the steps I took to try enabling "Find in Files" from the Admin tab of the Vault admin webpage:
  1. Expand one of my repositories
  2. Click "Find In Files"
  3. Select "On" radio button
  4. Click "Save" button
  5. Received response message "The request to change settings have been sent to the Index Server. It may take a moment before the change is seen. If you encounter a problem saving this setting, please check the Index Server log file for additional information."
However, nothing ever gets enabled and the "vaultindexservice.txt" contains the following after performing this action:

Code: Select all

3/15/2013 7:09:07 PM <generic>: Failed to retrieve the Repository's Last Index values for repository 43. [System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultIndexService.VaultIndexServiceSQL.UpdateRepositoryIndexStatusMessage(Int32 nRepID, Boolean bAddToDBIfRepIDMissing, String strStatusMsg, String& strOldStatusMsg)] Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultIndexService.VaultIndexServiceSQL.UpdateRepositoryIndexStatusMessage(Int32 nRepID, Boolean bAddToDBIfRepIDMissing, String strStatusMsg, String& strOldStatusMsg)

3/15/2013 7:09:07 PM <generic>: [System.Net.WebException: The request failed with HTTP status 404: Not Found.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.ClientService.VaultService.ValidateServiceVersions(Int32[] clientSupportedVersions)
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)] The request failed with HTTP status 404: Not Found.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.ClientService.VaultService.ValidateServiceVersions(Int32[] clientSupportedVersions)
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)

Stack Trace:
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)
   at VaultClientOperationsLib.ClientInstance.Login(String urlbase, String username, String password)
   at VaultClientOperationsLib.PluginRepositoryDepot.GetRepositoryConnectionFromDepot(Int32 nRepID, Int32 nTimeoutMS, Boolean bDownloadTreeIfNotOnDisk, PluginRepositoryConnection& cc, Boolean& bLoadedFromDisk)
   at VaultIndexService.VaultIndexManager.IndexServiceProcessWorkRequestProc()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

3/15/2013 7:09:07 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 43: The server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://127.0.0.1/VaultService.  No server was found at the specified URL.  Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client.  Web Exception: The request failed with HTTP status 404: Not Found.
3/15/2013 7:09:11 PM <generic>: Failed to retrieve the Repository's Last Index values for repository 43. [System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultIndexService.VaultIndexServiceSQL.UpdateRepositoryIndexStatusMessage(Int32 nRepID, Boolean bAddToDBIfRepIDMissing, String strStatusMsg, String& strOldStatusMsg)] Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultIndexService.VaultIndexServiceSQL.UpdateRepositoryIndexStatusMessage(Int32 nRepID, Boolean bAddToDBIfRepIDMissing, String strStatusMsg, String& strOldStatusMsg)

3/15/2013 7:09:11 PM <generic>: [System.Net.WebException: The request failed with HTTP status 404: Not Found.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.ClientService.VaultService.ValidateServiceVersions(Int32[] clientSupportedVersions)
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)] The request failed with HTTP status 404: Not Found.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.ClientService.VaultService.ValidateServiceVersions(Int32[] clientSupportedVersions)
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)

Stack Trace:
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)
   at VaultClientOperationsLib.ClientInstance.Login(String urlbase, String username, String password)
   at VaultClientOperationsLib.PluginRepositoryDepot.GetRepositoryConnectionFromDepot(Int32 nRepID, Int32 nTimeoutMS, Boolean bDownloadTreeIfNotOnDisk, PluginRepositoryConnection& cc, Boolean& bLoadedFromDisk)
   at VaultIndexService.VaultIndexManager.IndexServiceProcessWorkRequestProc()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

3/15/2013 7:09:11 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 43: The server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://127.0.0.1/VaultService.  No server was found at the specified URL.  Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client.  Web Exception: The request failed with HTTP status 404: Not Found.
3/15/2013 7:09:15 PM <generic>: Failed to retrieve the Repository's Last Index values for repository 43. [System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultIndexService.VaultIndexServiceSQL.UpdateRepositoryIndexStatusMessage(Int32 nRepID, Boolean bAddToDBIfRepIDMissing, String strStatusMsg, String& strOldStatusMsg)] Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultIndexService.VaultIndexServiceSQL.UpdateRepositoryIndexStatusMessage(Int32 nRepID, Boolean bAddToDBIfRepIDMissing, String strStatusMsg, String& strOldStatusMsg)

3/15/2013 7:09:15 PM <generic>: [System.Net.WebException: The request failed with HTTP status 404: Not Found.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.ClientService.VaultService.ValidateServiceVersions(Int32[] clientSupportedVersions)
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)] The request failed with HTTP status 404: Not Found.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.ClientService.VaultService.ValidateServiceVersions(Int32[] clientSupportedVersions)
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)

Stack Trace:
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)
   at VaultClientOperationsLib.ClientInstance.Login(String urlbase, String username, String password)
   at VaultClientOperationsLib.PluginRepositoryDepot.GetRepositoryConnectionFromDepot(Int32 nRepID, Int32 nTimeoutMS, Boolean bDownloadTreeIfNotOnDisk, PluginRepositoryConnection& cc, Boolean& bLoadedFromDisk)
   at VaultIndexService.VaultIndexManager.IndexServiceProcessWorkRequestProc()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

3/15/2013 7:09:15 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 43: The server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://127.0.0.1/VaultService.  No server was found at the specified URL.  Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client.  Web Exception: The request failed with HTTP status 404: Not Found.
3/15/2013 7:09:19 PM <generic>: Failed to retrieve the Repository's Last Index values for repository 43. [System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultIndexService.VaultIndexServiceSQL.UpdateRepositoryIndexStatusMessage(Int32 nRepID, Boolean bAddToDBIfRepIDMissing, String strStatusMsg, String& strOldStatusMsg)] Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at VaultIndexService.VaultIndexServiceSQL.UpdateRepositoryIndexStatusMessage(Int32 nRepID, Boolean bAddToDBIfRepIDMissing, String strStatusMsg, String& strOldStatusMsg)

3/15/2013 7:09:19 PM <generic>: [System.Net.WebException: The request failed with HTTP status 404: Not Found.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.ClientService.VaultService.ValidateServiceVersions(Int32[] clientSupportedVersions)
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)] The request failed with HTTP status 404: Not Found.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.ClientService.VaultService.ValidateServiceVersions(Int32[] clientSupportedVersions)
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)

Stack Trace:
   at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword)
   at VaultClientOperationsLib.ClientInstance.Login(String urlbase, String username, String password)
   at VaultClientOperationsLib.PluginRepositoryDepot.GetRepositoryConnectionFromDepot(Int32 nRepID, Int32 nTimeoutMS, Boolean bDownloadTreeIfNotOnDisk, PluginRepositoryConnection& cc, Boolean& bLoadedFromDisk)
   at VaultIndexService.VaultIndexManager.IndexServiceProcessWorkRequestProc()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

3/15/2013 7:09:19 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 43: The server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://127.0.0.1/VaultService.  No server was found at the specified URL.  Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client.  Web Exception: The request failed with HTTP status 404: Not Found.
3/15/2013 7:09:19 PM <generic>: The Find In Files Index Server could not obtain a client connection to the Vault server.  Rep ID 43 will not be indexed.
I would really like our repository code to be searchable. Any help is greatly appreciated. :-D

Regards,
Matthew

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Source Code Table in sgvault (v6.0.1)

Post by lbauer » Sat Mar 16, 2013 11:13 pm

The plugins page was added in Vault 6.1. It will help with your troubleshooting, so you should consider upgrading.

There are two major errors in the Find in Files log. One is a database error:

-- 3/15/2013 7:09:11 PM <generic>: Failed to retrieve the Repository's Last Index values for repository 43. [System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'uniquerepid', table 'sgvaultindex.dbo.indexedrepositories'; column does not allow nulls. INSERT fails.

and the other is an error that states the Find in Files service cannot connect to the Vault Server:
-- 3/15/2013 7:09:07 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 43: The server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://127.0.0.1/VaultService.

Locate the Find in Files web.config file in C:\inetpub\wwwroot\VaultService\VaultIndexService and look for this line:

Code: Select all

<add key="vault_server" value="http://127.0.0.1/VaultService" />
Replace 127.0.0.1 with the correct value for the Vault Server. Check the troubleshooting guide at http://support.sourcegear.com/viewtopic ... 13&t=21347 for more information.

Once the URL is correct, I would suggest stopping the Find in Files indexing and purging the data. Restart IIS, then try starting the Find in Files indexing again. If you continue to get the database base error, we'll consult with our developers.
Linda Bauer
SourceGear
Technical Support Manager

Chiramisu
Posts: 38
Joined: Tue Oct 23, 2012 12:13 pm
Location: Oregon

Re: Source Code Table in sgvault (v6.0.1)

Post by Chiramisu » Sun Mar 17, 2013 7:26 am

Well it took some time, but it looks like updating to 6.1 fixed whatever was broken with indexing. It still isn't setting my web.config properly upon install though as it continues to use 127.0.0.1 and I have to manually change it. You may want to note that for the next update. :)

Anyway, it looks like all my repositories are now indexed. Even did a test search and found what I think I can safely assume to be all files containing the text I searched. Very happy now! :-D

Thanks so much for your ongoing help.

Regards,
Matthew

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Source Code Table in sgvault (v6.0.1)

Post by lbauer » Sun Mar 17, 2013 1:00 pm

Thanks for the update! Glad it's working for you now.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply