I am new to hdbsql and I have logged in to the SAP HANA Server and logged in to the hdbsql terminal as a HDB admin user(SYSTEM).
1.Is it good to create databases as admin user?If not how to create a new user for hdbsql?
2.How to create a new Database in command line?(Will this work "CREATE DATABASE dbname;")
Thank you.
CREATE DATABASE as a command only applies if you are using a multi database container setup.
As this question really is more about the concepts of HANA database administration, I highly recommend to invest the time to read the documentation or watch a video from the HANA academy on youtube.
I'm pretty sure this will get you up to speed quicker than asking single questions one by one.
Did you try 'create database'?
You should use
CREATE SCHEMA <schema_name> [OWNED BY <user_name>].
More info on HANA queries/statements/functions can be found here.
Related
I have a local dev copy of our production DB. However, in production, we have a DB link to a second DB, and this is not available outside of a production environment.
I'm pretty new when it comes to this kind of stuff. Would it be possible to create a second local DB to point my DB link to in Oracle SQL Developer? Or could I create a new user on my existing DB and point the DB link to that user's schema? What is the best way to go about this?
I'm trying to create a link between MS Access and a remote Informix db.
The Access db will be used for generating reports/views etc with the data from the linked Informix db.
I have setup a DSN for the Informix DB and can connect to it.
Using the MS Access 2016 GUI I can select to create a link via the external data tab. However, I need to make sure that this is a read only link. It is imperative that any changes made (either on purpose or accident) in the linked access db do not filter back.
One option I have considered was contacting the Informix DBA to make sure my account is read only. Unfortunately, this is not possible, so I wonder if there is some other approach I can take?
Informix ODBC doesn't support SQL_ACCESS_MODE and as far as I know, there is no option that would make a 'read-only' connection.
You can ask our DBA to create a view on the table and restrict access on just that view (e.g. only have the 'SELECT' permission on it). Then use that view as the source for your linked table.
A second option would be to not have a linked table, just import the data from the source.
There are several things you can do to create a read-only connection.
The most secure way, in general, is to create a user that only has read access, and use that user for your DSN (also fixes the issue that DSN information is publicly available in Access and might be reused.
Another way is to set SQL_ACCESS_MODE to 1 (=SQL_MODE_READ_ONLY) in your DSN file, which creates a read-only connection on supported databases. However, a tech-savvy user can just change that value, so this doesn't add the security the first way provides.
Best safest solution is for the Informix DBA to create a new user for your Access front end with GRANT SELECT permissions only for the tables your application will be querying.
tried creating a federation from using sql server management studio but got this weird error after executing the CREATE FEDERATION command.
here is the query and the error result after executing it.
I just hope someone has ran into this before.
Happy Coding..
Federations are no longer supported in Azure SQL Database. Depending on your application, consider putting each Federation member into its own dedicated database in an Elastic Pool, or sharding your data across a few databases. The different alternative application patterns with links to the feature documentation are discussed in more detail here: https://azure.microsoft.com/en-us/documentation/articles/sql-database-design-patterns-multi-tenancy-saas-applications/.
Hope this helps.
Thanks,
Torsten
I'm new to the forum and am studying Oracle SQL and PL/SQL. I have created a local database and a database link to a remote database to which I have to copy all my objects.
I think I'll be able to do the copying of the objects from local to remote database, but neither my course material nor my googling have given me much of a steer in terms of the modifying the objects to use the remote tables only if the local database is offline.
I'd be hugely grateful if anyone has done a similar task and could point me in the direction of any good material on the subject.
(I'm working with Oracle 11g Express and Oracle SQL Developer)
Many thanks in advance
Edit from original poster:
I got some clarification on the task requirement (see comments below) and I've created a new thread to ask my next question about creating packages at the remote database end. thanks guys for your help so far.
If database A is offline, a database link from database A to database B will not do you any good, as it will not be accessible. The same is the case with PL/SQL, PL/SQL on database A will not be available if database A is down. This is not a problem you will solve with PL/SQL and database links.
Transparent Application Failover (http://docs.oracle.com/cd/B19306_01/java.102/b14355/ocitaf.htm) could solve part of the problem, allowing a connection to failover to database B if database A is down. However, it will not automatically switch back to database A when the database comes back up, unless you try a connection to database A again. You will need to have your PL/SQL code copied on both databases.
There are already robust failover mechanisms in Oracle, some free and required some hacking, such as redo log application, some costly but well supported, such as Oracle Data Guard. I would suggest you review your design and what you are trying to accomplish. If I had to absolutely do what you are trying to do, I would throw a web service in front of each database, use a load balancer in front of the web services that always connected to service A, unless it was down, in which case it would connect to service B.
What is the lowest permission level I need on a user to be able to create diagrams in SQL Server Enterprise Manager?
I'm currently set as data reader and I am unable to create diagrams. (I wouldn't expect to be able to at this permission level)
The database diagrams feature is actually a quite powerful schema editor - you can change tables/fields and relationships as well. (don't know why they did it that way). I'd imagine you need quite high permissions to be able to create diagrams because of the editing possibility - probably owner or ddladmin.
After some further investigation, with the dbo role, I was able to create database diagrams.