SQL Workbench/J: run SQL file - sql-workbench-j

I have a sql file (say, abc.sql).
How can I run same on SQL Workbench/J through GUI.
SQL Workbench/J : Build 123, (2017-09-25)

There are different ways to do that:
Load the file into an editor (using "File -> Open"), then run the statements of the script from inside the editor (e.g. "Execute all"). Alternatively you can drag the file from your file manager into the editor to load it.
Use the WbInclude command to run the file without loading it.

Related

Essbase Error 1241109 Unable to Open file

I am automating the process to run a report script. The batch script is located on Windows and the Essbase server is on UNIX.
Getting an error while executing the below statement
export database App.DB using server_file 'Report1.rep' to data_file '/apps/AppName/FileName.txt';
TIA
is the path correct?
Essbase does not create directories, so maybe /apps/Appname does not exist.
I would also suggest to put the Files under Appname/Database but thats a personal thing.

Not able to run .vbs file from jenkins which is having excel script

I’m new to Jenkins and now I'm doing basic level of execution. And I need your help resolve my issue. Issue Description: I’m trying to run the .VBS file by using jenkins and getting below error:
C:\Users\Amar\Desktop\Test_Sample.vbs(3, 2) Microsoft Excel: Microsoft Excel cannot access the file ‘C:\Users\Amar\Desktop\New.xlsx’.
There are several possible reasons:
The file name or path does not exist.
The file is being used by another program.
The workbook you are trying to save has the same name as a currently
open workbook.
I have not opened any excel file and path also correct.
please find below batch command : CScript “C:\Users\Amar\Desktop\Test_Sample.vbs”
And in Test_Sample.vbs file having:
Dim ExcelObj, WbookObj, mysheet
Set ExcelObj= CreateObject("excel.application")
Set WbookObj= ExcelObj.workbooks.open("C:\Users\Amar\Desktop\New.xlsx")
Set mysheet= ExcelObj.ActiveWorkbook.Worksheets("Sheet1")
ExcelObj.Visible = False
ExcelRowCount = mysheet.UsedRange.Rows.Count
For Iterator = 2 To ExcelRowCount
ModuleName = Ucase(Trim(mysheet.Cells(Iterator,1)))
ExecutionFlag = Ucase(Trim(mysheet.Cells(Iterator,2)))
if (moduleName="Raj") Then
Set qtApp = CreateObject("QuickTest.Application")
If qtApp.launched True then
qtApp.Launch
End If
qtApp.Visible = True
qtApp.Open "F:\Jenkins_Jobs\OnCall_Sanity_Automation\DriverScript\Sample", False
Set QTPTest=qtApp.Test
QTPTest.Run 'Run the Test QTPTest.Close
qtApp.quit
Set qtApp = Nothing
else
MsgBox "Name not exists"
End If
Next
Please help me to resolve the issue.
Thanks, Amar
Update
Console Output:
Building in workspace C:\Program Files
(x86)\Jenkins\workspace\Excel_Test [Excel]
$ cmd /c call C:\WINDOWS\TEMP\jenkin02.bat (C:\Program Files
(x86)\Jenkins\workspace\Excel_Test>CScript )
C:\Users\Admin\Desktop\Test_Sample.vbs"
C:\Users\Admin\Desktop\Test_Sample.vbs(3, 2) Microsoft Excel:
Microsoft Excel cannot access the file
C:\Users\Admin\Desktop\New.xlsx. There are several possible reasons:
** The file name or path does not exist.** The file is being used by another program. The workbook you are trying to save has the same
name as a currently open workbook.
If you are working on 64-bit Windows Operating System.
Then go to
C:\Windows\SysWOW64\config\systemProfile
Above Folder and create an empty Folder, and name it "Desktop" inside "systemProfile".
For doing this, you need system admin access
After creating the folder as mentioned, then run your build in Jenkins.
Run the jenkins job in command prompt on a slave,it will work!
Set Full control permissions for below path "Desktop" directory
"C:\Windows\SysWOW64\config\systemprofile\Desktop " (for 64 bit Windows) or "C:\Windows\System32\config\systemprofile\Desktop " (for 32 bit Windows)
If Desktop directory in present please create and give Full control permissions

How to run PL/SQL within UltraEdit?

How can I run PL/SQL or SQL from within UltraEdit?
Current I am able to compile the current file like this:
sqlplus database/database#pass #%F
The above compiles, but what is the command to run?
I do not see a show option here:
sqlplus apps/apps#dev #%F
The above runs the contents of the file. The file should be saved as .sql.

Copying a local database from one computer to another ne04j

I created a database Neo4j on a PC, with many relationships, node, etc
how to move/ copy the database from this pc to another?
thanks for the help
francesco
update1: I have tried to found conf/neo4j-server.properties but i don't have...
this is a screenshot of my folder ne04j (It is in Windows document Folder)
http://s12.postimg.org/vn4e22s3x/fold.jpg
Neo4J databases live in your filesystem, you can simply make a copy of the folder in which your Neo4J data is stored. If you are running standalone this folder will be configured in conf/neo4j-server.properties and the line will look something like this:
org.neo4j.server.database.location=data/graph.db
Copy the content of that folder to the graph database folder on your other machine. I'd recommend that your databases are not running when you do this.
I believe you're looking for the dump shell command which you can use to export a database into a single Cypher create statement, you'd "dump" the database and then import it on your new machine.
Information on using the command is outlined here: Neo4j docs
A Neo4j database can be dumped and loaded using the following commands:
neo4j-admin dump --database=<database> --to=<destination-path>
neo4j-admin load --from=<archive-path> --database=<database> [--force]
Limitations
The database should be shutdown before running the dump and load commands.
https://neo4j.com/docs/operations-manual/current/tools/dump-load/
i used the above solution, but the file name was different.
in the folder of the neo4j data, look for folder called conf and inside the configuration file called neo4j.conf
inside this file you will see a line that direct to the folder that contain the data.
its called "graph.db"
replace it with the same folder from your backup of the DB that you want to clone.

Adding a new build rule to parse all rtf files

Xcode includes a flexible build rules system. The documentation is all but non-existant however.
A project I am working on for iOS 5 and iOS 6 includes an rtf help file. For iOS 6, I can convert the rtf file into an archived NSAttributedString object, then load that at runtimeand display it directly to a UITextView. For iOS 5, I can't (without a lot of work in Core Text...) so I want just the text without the style info.
I wrote a command line tool, RTFToData that takes an RTF file as input and generates a .txt file and a .data file (where the .data file contains a version of the styled text that my project knows how to use.)
Here is the syntax of my command line tool:
RTFToData [-o] source_path [destination_path]
-o (optional) overwite existing files
source_path (required) path to source RTF file (must have extension "rtf" or "RTF"
destination_directory (optional.) writes output files to source file directory if no destination specified
destination_directory must exist if specified.
I want to set up my project so that I can add .rtf files as sources (with the "add to target" checkbox NOT checked.) I want Xcode to run my RTFToData command on each file specifying that the output files should be copied into a directory and then added to the target.
Ideally, I'd like the build process to know about the dependencies between my source .rtf files and the processed .data and .txt files. If I touch a .rtf file, I'd like the build process to re-run the rtftodata command.
I am a makefile and unix scripting neophyte. I THINK I can use a run script build rule that will do this, but I am unclear on how. I guess I need to write a script that finds all files of type ".rtf", pipes that list of files into an invocation of my RTFToData.
Can somebody outline the steps I need to take in the Xcode IDE to make my project handle this smoothly?
As a side-note, is there some directory where you can put command line tools so they are available to the current version of Xcode? So far I've been installing the RTFToData command in /Library/usr/bin, but I'd really like the build tool to be included in the project, or at the very least, not have to use sudo to set up every development machine that is used to build this project.
Create a custom build phase
Add the .rtf files to your project and make sure they are added to your target.
Go to your target settings and select the "Build Rules" tab:
Click the "Add Build Rule" button at the bottom.
You want to configure your rule based on something like this:
Enter a standard wildcard glob for the files you want to match (*.rtf).
Inside the script section you can make use of a number of environment variables. Assuming your glob has matched the input file Test.rtf you have access to these vars:
INPUT_FILE_PATH = /path/to/your/project/source/Test.rtf
INPUT_FILE_NAME = Test.rtf
INPUT_FILE_BASE = Test
INPUT_FILE_SUFFIX = .rtf
INPUT_FILE_DIR = /path/to/your/project/source/
You want to process your file and send it to the ${DERIVED_FILES_DIR} directory with whatever new filename or extension you need. In this case we take the base filename from the input and give it a new extension.
Fill out the "Output Files" section with the same output file you used in the script. This will ensure the dependency system works and that the file will be copied to your .app. The script will only be run if the input has changed or the output file is missing from the .app.
Note that the "Output Files" should not have double quotes. The paths will be quoted for you by Xcode.
If your script generates multiple output files, add extra entries for those as well.
Once this is all set up, .rtf files added to your target will be converted to whatever output files your script generates. The original .rtf files will not exist in the final .app.
Where to put scripts/programs
As a side-note, is there some directory where you can put command line
tools so they are available to the current version of Xcode?
Put your tools somewhere below the directory that contains your .xcproject. Then from your build phase/rules use the ${SRCROOT} environment variable, which is the directory containing your project:
Assuming this file system layout:
/path/to/project/project.xcodeproj
/path/to/project/Tools/CommandLineTool
Use this in your build phase/rules:
"${SRCROOT}/Tools/CommandLineTool" "${INPUT_FILE_PATH}" ...
Remember to use double-quotes everywhere you can!

Resources