Open hoang-minhhieu opened 5 years ago
Hey there, depending on the version of Pivet you are running you should be able to run it with "pivet.exe -b" to enter a config builder mode, this is a guided mode for building out a config.json, it will ask you questions, and you answer and at the end you'll have a config.json next to your pivet executable.
Hey thank you for reply me back, I ran it on Visual Studio and it went straight to this error. I don't usually work with .NET so do i have to use CLI to run "dotnet build" "pivet.exe -b" or i can still use VS to compile?
Hello again, So i figured it out how to run it. But there are multiples questions that i really don't know how to answer. In the end i have Unhandle exception: SQL command not properly ended Do you have any tuto/document how to use the program? Have a nice day and thank you for any help you can offer
If you could provide me the questions you aren't sure about I'd be happy to explain them in further detail
I have a lot of questions:
Hello, I know you have been busy but if you have some free times i appreciate your help
Hi Tim @tslater2006, Thank you for this project.
I downloaded this project, installed dotnet-sdk-3.0.100-win-x64.exe built it, via: dotnet restore dotnet build -c Release -f netcoreapp3.0
added a TNS_ADMIN system environmental variable (windows) C:\app\client\artisd\product\12.2.0\client_64bit\network\admin
I'm trying to utilize this project but I'm having a problem connecting to the db.
What is the correct db url/connection format for an oracle db?
I used pivet.exe -b to build the following information into my config.json file
C:\Users\artisd\Documents\work\pivet\Pivet\Pivet\bin\Release\netcoreapp3.0>pivet.exe -b No configuration file found, would you like to create a new one? (y/n) [y]: y There are currently no environments defined. Making a new one. Please enter a name for the environment: CS92U008 Please select the connection type: 1.) Bootstrap Select a choice [1]: 1 Enter the path to TNS_ADMIN: C:\app\client\artisd\product\12.2.0\client_64bit\network\admin Enter the TNS connection name: CS92U008 Enter the schema name: SYSADM Enter the username: SYSADM Enter the password: MyPassword Would you like to modify an existing environment? (y/n) [n]: n Would you like to create a new environment? (y/n) [n]: n There are currently no profiles defined. Making a new one. Please give this profile a name: CS92U008 Select which data providers you would like: 1.) RawDataProcessor 2.) HTMLProcessor 3.) MessageCatalogProcessor 4.) PeopleCodeProcessor 5.) RegistryProcessor 6.) SQLProcessor 7.) StylesheetProcessor 8.) TranslateValueProcessor 9.) All Select one or more Data Providers (comma separated) [9]: 9 Please enter any project prefixes that should be used: Please enter any item prefixes that should be used: Please enter any Operator IDs that should be included: Please enter any Operator IDs that should be excluded: Would you like to add a message catalog range? (y/n) [y]: n [MSG] [10/24/2019 12:28:45] Pivet supports the concept of Raw Data, which allows for arbitrary tools tables to be included in the version control where builtin support does not exist. Would you like to configure Raw Data entries? (y/n) [y]: n Would you like to modify an existing profile? (y/n) [n]: n Would you like to create a new profile? (y/n) [n]: n [MSG] [10/24/2019 12:28:53] Config loaded. 1 Environment(s) found, 1 Profile(s) found. [MSG] [10/24/2019 12:28:53] All done!
Then I added a job, in what I think is the correct format for JSON.
{ "Environments": [ { "Name": "CS92U008", "Connection": { "Provider": "Bootstrap", "TNS": "CS92U008", "TNS_ADMIN": "C:\app\client\artisd\product\12.2.0\client_64bit\network\admin", "Schema": "SYSADM", "BootstrapParameters": { "User": "SYSADM", "EncryptedPassword": "MyEncryptedPassword" } } } ], "Profiles": [ { "Name": "CS92U008", "DataProviders": [ "RawDataProcessor", "HTMLProcessor", "MessageCatalogProcessor", "PeopleCodeProcessor", "RegistryProcessor", "SQLProcessor", "StylesheetProcessor", "TranslateValueProcessor" ], "Filters": { "Projects": [], "Prefixes": [], "IncludeOprids": [], "ExcludeOprids": [], "MessageCatalogs": [], "RawData": [] } } ], "Jobs": [ { "Name": "job1", "OutputFolder": "pivet_output_folder", "EnvironmentName": "CS92U008", "ProfileName": "CS92U008", "Repository": { "CommitByOprid": true, "Url": "CS92U008", "User": "SYSADM", "EncryptedPassword": "MyEncryptedPassword" } } ] }
[MSG] [10/24/2019 12:35:03] Getting database connection... [MSG] [10/24/2019 12:35:04] Error connecting to database: Failed to get oracle connection: ORA-12154 [MSG] [10/24/2019 12:35:04] All done!
@alexei2001 this is an oversight on my part, the -b flag hasn't been properly updated to match the correct format of the config.json. There has been some refactoring of the config file and the builder isn't in sync with it yet.
For the time being please grab a copy of the sample-config included on releases: https://github.com/tslater2006/Pivet/releases/download/0.2/sample-config.json
And adjust the things you need to. For the passwords you can run pivet -e
to get the password encryption utility and put the encrypted versions in the config file.
Please let me know if this helps.
Also, looking at the config you pasted, unless you are wanting to push the git repo to somehwere (github, bitbucket, gitlab etc) leave the 'Url" and "User", and "EncryptedPassword" fields blank for the Repository. Also I would recommend you have CommitByOprid set to false, not all definitions support commiting by OPRID and it makes the git history a bit more complicated.
CommitByOprid will commit changes as the last update oprid on certain definitions (ppc,html,sql for example) this isn't always accurately attributing changes in a situation where multiple people have touched 1 file between runs.
@alexei2001 your TNS_ADMIN field looks incorrect. the \ need to be escaped:
"TNS_ADMIN": "C:\app\client\artisd\product\12.2.0\client_64bit\network\admin",
should be
"TNS_ADMIN": "C:\\app\\client\\artisd\\product\\12.2.0\\client_64bit\\network\\admin",
Hi Tim @tslater2006 ,
I sent you a message on LinkedIn. When i run the program, it says the system could not find the file config.json. Can you please show me how to resolve this problem?
Best regards, Minh