We have recently installed Polybase in SQL Server. We are trying to use Hortonworks to get data. I am facing below issue while creating a external table.
Msg 105019, Level 16, State 1, Line 1
EXTERNAL TABLE access failed due to internal error: 'Java exception raised on call to HdfsBridge_IsDirExist:
Error [End of File Exception between local host is: "xxxxx"; destination host is: "xxxxx":1111; :
java.io.EOFException; For more details see: http://wiki.apache.org/hadoop/EOFException] occurred while accessing external file.'
I tried changing the core-site.xml file in SQL Server polybase location by uncommenting the Kerberos option which is now giving me the below error:
Msg 105019, Level 16, State 1, Line 1
EXTERNAL TABLE access failed due to internal error: 'Java exception raised on call to HdfsBridge_Connect:
Error [Unable to instantiate LoginClass] occurred while accessing external file.'
I suspect it might be with creating database scoped credentials.
CREATE DATABASE SCOPED CREDENTIAL HadoopUser3
WITH IDENTITY = '<user>', Secret = '<Passw0rd>';
go
Can someone help me understand the issue I'm having with the Identity and Secret. Is it related to Hadoop credentials? What kind of secret do we have to give?
Few things to check:
In your core-site.xml file try setting hadoop.security.authentication to lower case "kerberos". Also, make sure you have added polybase.kerberos.realm and polybase.kerberos.kdchost
Make sure your data source created uses the correct LOCATION= to your HDFS cluster. Make sure that is the IP address:Port and not the name of the server itself
Check the external table and ensure you have the right path to the cluster physical file itself.
Related
Im trying to load a database dump into my Sybase backup server.
Running sybase ASE-16_0 on both my primary and backup machine.
Import is done in isql cli via
load database DB from ./dumps/data_dump
Error message is the following:
Backup Server session id is: 22. Use this value when executing the
'sp_volchanged' system stored procedure after fulfilling any volume change
request from the Backup Server.
Backup Server: 4.141.2.40: [11] The 'open' call failed for database/archive
device while working on stripe device
'/opt/dumps/data_dump' with error number
13 (Permission denied). Refer to your operating system documentation for further
details.
Also found this SAP Knowledge Base article, but it's hidden behind a paywall:
https://userapps.support.sap.com/sap/support/knowledge/en/3140989
Setting up a new Server fixed the issue for me. Im still working on a possible answer for this problem.
I have Sql Server 2017 running in a docker container, when I try and create a credential
CREATE CREDENTIAL AzureCredential WITH IDENTITY= 'xxxx', SECRET = 'xxxxxxxx'
I get the following error
Msg 33094, Level 16, State 9, Server 049ad391ba2f, Line 1
An error occurred during Service Master Key decryption
Any idea what could be causing this? Is there a linux library missing, I am using the 'mcr.microsoft.com/mssql/server:2017-latest' image
Most of the solutions around particular error suggests to run "ALTER SERVICE MASTER KEY FORCE REGENERATE;" .. Just see if this solution is applicable to you
"An error occurred during Service Master Key decryption" when trying to create SSIS catalog
I'm trying to detach and attach a database in AWS RDS. I'm able to detach the database without any issues. But while I try to attach the database, I'm getting few errors.
When I run the attach command for the first time, I get the following error:
Unable to create database: User, group, or role 'sa' already exists in the current database.
When I execute for the second time, I get this:
Msg 1802, Level 16, State 7.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Msg 5120, Level 16, State 101.
Unable to open the physical file "D:\RDSDBDATA\DATA\DBattachTest.mdf". Operating system error 2: "2(The system cannot find the file specified.)". (Line 6)
Please advise
I'm not sure what you are trying to do but you should be using backup and restore functionality to move DBs around. Attach and detach will not work as they do in a traditional SQL environment: RDS is a managed service and you have extremely limited access to the underlying OS.
From AWS docs:
Restoring a Database
To restore your database, you call the rds_restore_database stored procedure.
The following parameters are required:
#restore_db_name – The name of the database to restore.
#s3_arn_to_restore_from – The Amazon S3 bucket that contains the backup file, and the name of the file.
The following parameters are optional:
#kms_master_key_arn – If you encrypted the backup file, the key to use to decrypt the file.
Example Without Encryption
exec msdb.dbo.rds_restore_database
#restore_db_name='database_name',
#s3_arn_to_restore_from='arn:aws:s3:::bucket_name/file_name_and_extension';
Example With Encryption
exec msdb.dbo.rds_restore_database
#restore_db_name='database_name',
#s3_arn_to_restore_from='arn:aws:s3:::bucket_name/file_name_and_extension',
#kms_master_key_arn='arn:aws:kms:region:account-id:key/key-id';
For some reasons I cannot import new BACPACs from Azure. I still can import old ones.
This is the error message I get:
Internal Error. The internal target platform type SqlAzureV12DatabaseSchemaProvider does not support schema file version '3.1'.
I've tried this this solution , but it didn't help, because all my settings are already set up to default.
I also downloaded latest SSMS Preview, but on import it gives me other errors:
Warning SQL0: A project which specifies Microsoft Azure SQL Database v12 as the target platform may experience compatibility issues with SQL Server 2014.
Error SQL72014: .Net SqlClient Data Provider: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near 'Admin'.
Error SQL72045: Script execution error. The executed script:
CREATE DATABASE SCOPED CREDENTIAL [Admin]
WITH IDENTITY = N'Admin';
Error SQL72014: .Net SqlClient Data Provider: Msg 319, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Error SQL72045: Script execution error. The executed script:
CREATE DATABASE SCOPED CREDENTIAL [Admin]
WITH IDENTITY = N'Admin';
I have SSMS 2014 CU6 installed.
Any help would be much appreciated! Thank you!
Finally figured out what happened. It's a specific case, but maybe it helps someone else.
We tried to use elasic query to write queries across databases. To do it you need to create database scoped credentials. When package was imported, it tried to do the same locally and failed executing this:
CREATE DATABASE SCOPED CREDENTIAL [Admin]
WITH IDENTITY = N'Admin';
Since we decided to use different approach, I dropped scoped credentials and external data source (couldn't drop credentials without dropping data source):
DROP EXTERNAL DATA SOURCE Source
DROP DATABASE SCOPED CREDENTIAL Admin
Now everything is working again. Just be aware you cannot import database from Azure if it has scoped credentials created.
Make sure that you are using the new SQL Server Management Studio
https://msdn.microsoft.com/en-us/library/mt238290.aspx
I am currently running a third-party software suite, which uses SQL Server as its database. I have a second instance of SQL Server running in a different location, and some apps that I am building in that instance SQL Server needs to access some data in the third-party software. So, I created an ODBC connection between the boxes, and set up the third-party SQL server as a linked server on my version of SQL Server. As a test, I ran something like the following statement from my SQL server, accessing one of the third-party's tables:
SELECT * FROM LinkedServerName.SchemaName.dbo.TableName
To which I recieved this error:
OLE DB error trace [Non-interface error: Column 'TableRowVersion' (compile-time
ordinal 4) of object '"SchemaName"."dbo"."TableName"' was reported to have a
DBCOLUMNFLAGS_ISROWVER of 0 at compile time and 512 at run time].
Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' supplied inconsistent metadata for a column. Metadata
information was changed at execution time.
This error is the same for any other table I try to access. What does this error mean, and is there a way around it?
I've had this happen a few times. The one workaround I found was to use OPENQUERY.
SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT * FROM DBName.Schema.Table')
Also, the select you posted above has an incorrect 4 part name (could just be a typo but I wasn't sure). It should be LinkedServerName.DBName.SchemaName.TableName
Server: Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' supplied inconsistent metadata for a column.
Metadata information was changed at execution time.
If you use a four-part name syntax to query the data from the linked server database, you may receive this error message. To work around this problem, you can use the OPENQUERY syntax to query the data from the linked server database. You can turn on trace flag 7300 to receive more detailed information about this error message. To turn on trace flag 7300, run the following Transact-SQL statement:
DBCC TRACEON(7300)
I solved this with these steps:
1) Step 1:
• In SQL Server Management Studio open Linked Servers and then 'New Linked Server'.
• Inside of appeared wizard – Select the General tab.
• Specify alias name in "Linked server" field.
• Select SQL Native Client as provider.
• Add sql_server in "Product Name" field (that's the magic).
• In Data Source – specify name of the host to be used as linked server.
2) Step 2:
• In Security tab – specify proper security options (e.g. security context)
3) Step 3:
• In Server Options tab – put "Data Access", RPC, "Rpc Out" and "Use Remote Collation" to be true.
4) Step 4:
• Enjoy.
http://alexpinsker.blogspot.com.br/2007/08/how-to-give-alias-to-sql-linked-server.html