Data base not specified in TDengine database 2.6.0.24 - tdengine

The version is 2.6.0.24. An error message is displayed if the database name is not specified when the TDengine GUI tool is connected
In the 2.6.0.6 I don't need to specify database name in SQL.

specify database name in url is a standard way to use RESTful API in TDengine database . it could make sure no problem returned .

Related

Multiple database schema for different database in spring boot

I have spring boot application that need to be deployed on PCF. I want to use H2 database for local testing but after deployed in PCF I will be using SQL server. I have a schema that need to be used for each database. So, I have two schema.sql file one for H2 and another for SQL server. How can I tell spring for local profile schema-H2.sql need to be used and for profile cloud schema-sqlserver.sql need to be used.
You can set the spring.datasource.platform to differentiate the schema and data sql file.
eg,
spring.datasource.platform=h2
then the file name should be data-h2.sql and schema-h2.sql
Make sure you set spring.datasource.initialization-mode=always

how to mirror a whole database cluster in postgresql

I'm using a postgresql (9.6) database in my project which is currently in development stage.
For production I want to use an exact copy/mirror of the database-cluster with a slightly different name.
I am aware of the fact that I can make a backup and restore it under a different cluster-name, but is there something like a mirror function via the psql client or pgAdmin (v.4) that mirrors all my schemas and tables and puts it in a new clustername?
In PostgreSQL you can use any existing database (which needs to be idle in order for this to work) on the server as a template when you want to create a new database with that content. You can use the following SQL statement:
CREATE DATABASE newdb WITH TEMPLATE someDbName OWNER dbuser;
But you need to make sure no user is currently connected or using that database - otherwise you will get following error.
ERROR: source database "someDbName" is being accessed by other users
Hope that helped ;)

Database Generator php and mysql

How do I create a database generator to allows a user to create his own table in the database without access to PHPMyAdmin and without any emphasized text knowlege about PHP or MySQL?
You at-least need the sql file to run so that the database can be created....
create the sql file (the whole backup of the database along with subroutines)
just load the database via this command
mysql -u'root' -p'password' databaseName < /path/to/file.sql
In order to run mysql, it should be in your environment variable..

using another database name with dotnetnuke

i've a simple question.
Is it possible to use another database name as the readme says it have to be called "DotNetNuke" ?
manually create SQL Server database named "DotNetNuke" ( using Enterprise Manager or your tool of choice )
i've a webhost which have different database names.
thanks
Yes, you can use any database name that you would like. During the installation process, you provide your database name.
You can also manually edit the connection string in the web.config file. By doing this the Auto install option will still be available.

How to upload files and store them in a server local path when MS SQL SERVER allows remote connections?

I am developing a win32 windows application with Delphi and MS SQL Server. it works fine in LAN but I am trying to add the support for SQL Server remote connections (= working with a DB that can be accessed with an external IP, as described in this article: http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277).
Basically I have a Table in DB where I keep the DocumentID, the document description and the Document path (like \\FILESERVER\MyApplicationDocuments\45.zip).
Of course \\FILESERVER is a local (LAN) path for the server but not for the client (as I am now trying to add the support for remote connections).
So I need a way to access \\FILESERVER even if of course I cannot see it in LAN.
I found the following T-SQL code snippet that is perfect for the "download trick":
SELECT BulkColumn as MyFile FROM OPENROWSET(BULK '\FILESERVER\MyApplicationDocuments\45.zip' , SINGLE_BLOB) AS X
With the code above I can download a file on the client.
But how to upload it? I need an "Uppload trick" to be able to insert new files, but also to delete or replace existing files.
Can anyone suggest? If a trick is not available could you suggest an alternative? Like an extended stored procedure or calling some .net assembly from the server.
If you have sql 2008, then you can use FILESTREAM, then sql server will automatically throw it out to disk.
If you have sql 2005, I'd consider just moving the data into a varbinary(max) column and deal with it that way (also pretty simple).
If neither of those apply OR you can't shove it into a varbinary column, then I would not use sql server to handle the actual file contents and instead just have a web service which stored the file on the file system or a SAN that the web service can easily access. (same as IMHO)
UPDATE:
One other idea that crossed my mind. If you are using SQL 2005/08 then you can write a CLR Stored procedure in .Net. This could handle transferring the blob data to / from the local file system.
In ideal world I would create simple:
- ASP.NET Web Service
- or .Net Remoting Service (faster than web service)
- or new .Net 4.0 RIA service.
Deploy it to the SQL Server on custom TCP/IP port
This service would listen to the port and client would request the file via the service. The service would get the file via local LAN and communicate with the DB via local OLE DB connection.
I would not use any SQl Server "web service" support - this is security and performance issues.
UPDATE:
Since this is Delphi app - you can do the same using Delphi, even though above solution still valid, but more work to integrate different technologies. Delphi has its own tools to build remote applications
If you are on 2005, you could try to store file in temp blob field of some temp table, and then call stored procedure which should put the file where you want it, and update path field as you want it.
In that stored procedure you must use extended stored procedures (xp_something), which allow access to file system. That means that those should be enabled for sql server.
BTW You are trying to use relational DB as Document database. That will, sooner or later, backfire.

Resources