Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Administration Forums - Database Administration
Forum to discuss SQL Server or Oracle database administration related to SalesLogix databases. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Database Administration | New ThreadView:  Search:  
 Author  Thread: Programatically "touch" Connection Manager
Ted Sturr
Posts: 78
 
Programatically "touch" Connection ManagerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Oct 11 6:44 AM
fiogf49gjkf0d

We have developed a DBRestore tool that restores our Produciton SLX database on our development and test servers.  The only step I still have to manually do is open up Connection Manager and "touch" the database after the restore.  Is there a way to programatically accomplish this step?


Thanks.


Ted

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Programatically "touch" Connection ManagerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Oct 11 7:56 AM
fiogf49gjkf0d

What do you mean by "touching" the database?


If you refer to linking it to a different App server, the answer is:


UPDATE SYSTEMINFO SET PINGSERVER = 'MYDEVSLXSERVER'

[Reply][Quote]
Ted Sturr
Posts: 78
 
Re: Programatically "touch" Connection ManagerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Oct 11 8:07 AM
fiogf49gjkf0d

Yes, that is what I needed. 


Thanks.


Ted

[Reply][Quote]
Lane
Posts: 121
 
Re: Programatically "touch" Connection ManagerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Oct 11 8:23 AM
fiogf49gjkf0d

This will reset the connection manager using a COM access. I have needed in high security places where the AttachRemote needs to over riden (it hard code a fixed pwd). We've needed to setup an alternate control seed or based the process on an ever changing key. But this is the core code. It rebuilds the slxoledbconfig.dat in the AppData\SalesLogix folder. You'll need to make an interop.SlxOleDBConfig.dll file as well.


 


 


        private static void ConfigureSLXConnection(string SQLServer)


        {


            try


            {


                interop.SlxOleDBConfig.DBConfigMgr configMgr = new interop.SlxOleDBConfig.DBConfigMgr();


                string svConnStr = GetConnectionString("SalesLogix", "sysdba", "masterkey", SQLServer);


 


                try


                {


                    configMgr.DeleteAlias("SalesLogix");


                }


                catch { }


 


                configMgr.AddAlias("SalesLogix", svConnStr);


                configMgr.SetConnMgrInfo("SalesLogix", 51101, ipInternal);


                configMgr.SetRWPass(svConnStr, "");


                configMgr.SetROPass(svConnStr, "");


            }


            catch { }


        }


 


        private static string GetConnectionString(string dataBase, string userId, string password, string server)


        {


            StringBuilder sb = new StringBuilder();


 


            sb.Append("Provider=SQLNCLI.1");


            sb.Append(";");


            sb.Append("Password=");


            sb.Append(password);


            sb.Append(";");


            sb.Append("Persist SecurityInfo=True");


            sb.Append(";");


            sb.Append("User ID=");


            sb.Append(userId);


            sb.Append(";");


            sb.Append("Initial Catalog=");


            sb.Append(dataBase);


            sb.Append(";");


            sb.Append("Data Source=");


            sb.Append(server);


 


            return sb.ToString();


        }


    }

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 4:22:47 AM