Whether to use SSL to connect to the database server. The user name to connect to the database server with.Īn optional description for the data source. The IP address or hostname of the server that the database server is installed on. The name of the database that you created in Step 2. Media Server uses this string to connect to the database server. The PostgreSQL Unicode ODBC Driver (psqlODBC) Setup dialog box opens.Ĭomplete the data source information fields: Data Source Select the PostgreSQL Unicode driver from the list and click Finish. The Create New Data Source dialog box opens. The ODBC Data Source Administrator dialog box opens. In the Windows Control Panel, click System and Security. Is the user name that Media Server will connect as. Is the name of the database that you created. GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO userName GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO userName GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO userName If security is not a consideration you could grant all privileges, but the required privileges are: Databaseįor example: GRANT TEMP ON DATABASE databaseName TO userName Grant privileges to the user that Media Server will connect as. The psql command-line tool does not recognize backslashes in file paths. Replace backslashes in the file path with forward slashes. Run the script using the command: \i 'path/postgres.sql' Micro Focus recommends running the following command to ensure that the script stops running if it encounters an error: \set ON_ERROR_STOP on The schema is inserted inside the public schema. This script sets up the database schema that Media Server requires. Run the postgres.sql script provided in the Media Server installation directory. Database nameĪny that is compatible with the encoding.įor example: CREATE DATABASE myDatabase WITH ENCODING 'UTF8' LC_COLLATE='English_United Kingdom' LC_CTYPE='English_United Kingdom' Ĭonnect to the new database using the command: \c databaseName Run a CREATE DATABASE command to create a new database. In the Windows Command Prompt, run the command: psql -U userName If the directory path is not added to the PATH variable, you must specify the psql.exe file path in the Command Prompt to start psql. Psql -h. -U demo_user -d dev -p 5439 -f d:\demo\redshift_script.sql -L d:\demo\log_redshift_script.logĪll commands in redshift_script.sql file would get executed in PSQL and logs will be stored in log_redshift_script.This step enables you to use the command psql to start the PostgreSQL command-line tool (psql) from the Windows Command Prompt. Make sure to change below parameters highlighted in red for your cluster endpoint, userid, copy script file name and log script file name respectively Make sure to add this to your PATH environment variable Select command line tools as shown in below screenshot and install thatĪbove will install postgres12 command line in below folder C:\Program Files\PostgreSQL\12\bin. Run the installer which will take few minutes and prompt you for installations options Personally I find unzip to be the best "installer" anyway (I also use that to install the Postgres server, the Windows installer just has too many quirks)īelow are the steps I followed to connect to Amazon Redshift with postgres12 psql on windows:ĭownload postgres 12.4 from below location: It is obviously not a real installer, but if you put the cleaned up directory into a ZIP file, you can distribute that and whoever needs it just unzips the archive. Of course you can also take all that from an existing Postgres installation without the need to download the ZIP archive.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |