Just like the title, I tried to create a database in tdengine, but I meet a DB error throw by Taos shell. Which said that “invalid operation:name too long”.
Does anyone know the max length of database allowed in tdengine? Is this is configurable?
Database name: cannot contain "." and other special characters, and cannot exceed 32 characters.
More info, you can refer taos.cfg
Related
Once I connect to the database (DB2) to check the values in the tables, if they have special chars then I see their utf-8 text value:
I expected instead to see the correct: Tükörfúrógép.
I am still able to handle the value properly, but is there any configuration in the db that I am missing to display the value properly when checking the table?
More Info:
Connected to DB with Intellij and also tried with DbVisualizer.
The following JDBC connection was used in intellij:
jdbc:db2://(...)?characterEncoding=UTF-8;
Tried both with the characterEncoding and without getting the same results.
I am still able to handle the value properly, but is there any configuration in the db that I am missing to display the value properly when checking the table?
DB Version: v11 LUW
JDBC: com.ibm.db2.jcc -- db2jcc4 -- Version 10.5
Encoding being used: UTF-8
db2 "select char(value,10), char(name,10) from sysibmadm.dbcfg where
name like 'code%'"
1 2
---------- ---------- 1208 codepage UTF-8 codeset
2 record(s) selected.
UPDATE 1:
I was able to directly insert in the database values with special
chars, so starting to think this is not DB2 configuration missing but
maybe jdbc or other related issue.
You must have the following HEX string representation for given string Tükörfúrógép in UTF-8 database:
54C3BC6BC3B67266C3BA72C3B367C3A970.
But you have the following instead with repeating garbage symbols:
54C383C2BC6BC383C2B67266C383C2BA72C383C2B367C383C2A970
You may try to manually remove such a byte sequence with the following statement, but it's better to understand a root cause of such a garbage appearance in this column.
VALUES REPLACE (x'54C383C2BC6BC383C2B67266C383C2BA72C383C2B367C383C2A970', x'83C2', '');
SELECT REPLACE (TOWN, x'83C2', '') FROM ...;
The number of open objects in the sybase database is increasing badly
and having this error :
Increase the config parameter 'number of open objects' to avoid descriptor reuse.
At first the values of `open objects' was 100000
sp_monitorconfig "open objects"
go
Name Num_free Num_active Pct_act Max_Used Reuse_cnt Instance_Name
number of open objects 1223 90380 95.25 92380 9269
I changed the value from 100000 to 160000 and still the value is increasing.
Is there a way I can know what are the objects increasing ?
what are the causes of increasing the values and how to stop increasing in such way ?
When I've seen this issue (ever increasing descriptor usage for open objects), I've tracked the issue back to an application that is generating a large volume of prepared statements (eg, instead of re-using a prepared statement for repetitive DML statements, the app creates a new prepared statement for each DML statement).
In Sybase (now SAP) ASE, prepared statements are converted into 'lightweight procedures' (aka LWPs; think 'temporary procedures') which in turn require their own descriptor.
To find out if this is a LWP issue:
grant sybase_ts_role to your login
run dbcc traceon(3604)
run dbcc des
NOTE: dbcc des will generate a LOT of output so make sure you capture it to a file!!
In the 'dbcc des' output the LWP's show up with the following attributes:
exist in login's tempdb
have negative object id's
have names like *dddddddddddddd_hhhhhh (where 'd' == decimal digit, 'h' == hex digit) OR ...
may have names like *aadddddddddd_dddddddddaa* ('d' == decimal, 'a' == alphabetical character)
objssystat = O_PROC
objsysstat2 = O2_LWP
To find the offending connection(s) ... you may be able to pull the spid from the LWP name (dbcc des output) or from master..monCachedProcedures column (look for procs with names like *sq##########ss* and *ss#########ss* ... something that looks like system-/auto-generated names).
NOTE: Depending on ASE version (11? 12? 15? 16?) the LWP name format may vary so you may have to do some digging to find the associated spid.
For LWPs where the spid is part of the name, the spid is likely the first 5 digits of the (dbcc des) object name; so for the following we see the spid = 61
*00061000000606_9d5317
*00061000000626_a149eb
*00061000000606_9d5317
*00061000000589_63ea4e
This topic has come up many times over the years, and you can review some of my ramblings in the following links: here, here, here and here
I have a column named body(ntext,null). Basically anything in the body of the message will come out as one string of text. See example:
Report Count SITE Type ACCOUNT NUMBER STMT CD COLL SCHEME Previously Touched Resi Aging 98 Cleveland - 609 Former 22449903 1 RQ-1 1160201
I want the result to look like this:
Report Count SITE Type ACCOUNT NUMBER STMT CD
98 Cleveland - 609 Former 22449903 1 RQ-1 1160201
How can I get this output? Would it be easier to do in EXCEL using VBA verses SQL?
I am not an expert in SQL. I am still learning.
You COULD try to get this out of Sql but I think most would agree that Sql is not designed for extensively formatting text.
As a DBA, I would steer you towards making those fields discrete if possible using normalization or at the very least having a key/value pair table rather than a blob of text that represents both fields and data.
You could also consider a datatype of XML if you find that you need to store different fields and different responses for each row.
I'm facing a problem in a package to import some data from a MySQL table to Oracle table and MS SQL Server table. It works well from MySQL to SQL Server, however I get an error when I want to import to Oracle.
The table I want to import contains an attribute (unitPrice) of data type DT_R8.
The destination data type for Oracle is a DT_NUMBERIC as you can see in the capture.
I added a conversion step to convert the unitPrice data from DT_R8 to DT_NUMERIC.
It doesn't work, I get the following error.
I found the detail of the error :
An ORA-01722 ("invalid number") error occurs when an attempt is made to convert a character string into a number, and the string cannot be converted into a valid number. Valid numbers contain the digits '0' through '9', with possibly one decimal point, a sign (+ or -) at the beginning or end of the string, or an 'E' or 'e' (if it is a floating point number in scientific notation). All other characters are forbidden.
However, I don't know how to fix.
EDIT : I added a component to redirect rows/errors to an Excel file.
The following screenshot show the result of the process including errors :
By browsing the only 3000 rows recorded, It seems the process accept only int values no real. So if the price is equal to 10, it's OK but if it's 10,5 it's failed.
Any idea to solve this issue ?
Your NLS environment does not match the expected one. Default, Oracle assumes that "," is the grouping character and "." is the decimal separator. Make sure that your session uses the correct value for the NLS_NUMERIC_CHARACTERS parameter.
See Setting Up a Globalization Support Environment for docu.
Can anyone point me to a resource that defines the maximum allowable length of the LDAP filter string in Active Directory?
According to Technet: How Active Directory Searches Work, the maximum LDAP request size that the server attempts to process defaults to 10,485,760 bytes.
If the server receives a request that is larger than this value, it closes the connection. Hope that helps.
According to the specification in RFC1558, there is not a hard limit imposed on the length of LDAP filter strings. Different implementations might have their own limits though.
If you're using the AD Users and Groups GUI interface to contruct the query you are limited to 464 characters. If you're using dsquery from the command line you are not limited to 464 characters. I don't know the upper bounds for filter length on dsquery, but I assume it's inline with the LDAP spec.