Errors on importing sql file in phpMyadmin - sql

Here is a snapshot of the errors.
I am using xampp on ubuntu to run the mysql server. The error says to check the manual of MariaDB server , so does xampp support that or is there something wrong with the SQL query? . This SQL file was provided in a github project Github project link . If what I am doing to import this SQL file to create the database is totally wrong, please suggest the correct way to do it.
A snippet of the SQL file
https://drive.google.com/file/d/1AWPWgBq8xHV-zfPHAKngFQI66JwVHv71/view?usp=sharing This is the SQL file

Related

How to create database from existing SQL files in NetBeans?

I have downloaded Geonetwork and opened it with NetBeans IDE 8.0.2. In that project, there exists some SQL files. How can i run them or create database based on these files?
Edit:
I have done some more research, and all i need is to connect to H2 driver, but somehow, i can't. It shows me this:
Cannot establish a connection to jdbc:h2: using org.h2.Driver (IO Exception: "java.io.FileNotFoundException: C:\Program Files\NetBeans 8.0.2\ .lock.db (The filename, directory name, or volume label syntax is incorrect)"; "C:\Program Files\NetBeans 8.0.2\ .lock.db" [90031-152]). So, how to fix this?
Go thru this document and you will have your database, Derby will give you a quick setup for your need.
NetBeans - Working with the Java DB (Derby) Database
Just remember to open your geonetwork sql files, from the file browser navigate to the location of the saved sql file and click open...
If you have other database already installed, such as MySQL, Oracle etc. You can check the documentation here (see database section)

Play! Framework 2.2.3 SQL server connection

I have a Play! Web-app that I am developing and I'm currently using an eBean YAML database. I have a 2008 SQL server that was set-up for me by a coworker that I'd like to connect to. I tried following another tutorial on this site
PlayFramework MSSQL Database error
and downloaded the jtds jar file and placed into the proper directories but I'd get an error that the driver is not found. This is my current configuration file:
db.default.url="jdbc:jtds:sqlserver://LSA5A:1433/DatabaseName=hr_site;instance=SQL2008"
db.default.driver=net.sourceforge.jtds.jdbc.Driver
db.default.user=HUser
db.default.password="RaeSusdaRasdh!123"
I have never set-up a database like this before so I'm having difficulty understanding how to set it up and how it will all works together. I didn't understand the solution from the Play! Docs for this and I'm not using MySQL so I couldn't find the help I needed online. I'm not sure what other information I need to provide but I'm running SQL server 2008, db name is SVFSSQL5A with user HRTUser and password testPass12. Thanks for your help!!
Also I have the dependency in my build file:
val appDependencies = Seq(
"net.sourceforge.jtds" % "jtds" % "1.2"
)
I did this:
Download the SQL-Driver for JDBC from Microsoft http://www.microsoft.com/de-DE/download/details.aspx?id=11774, install it and put the sqljdbc4.jar file in the lib folder ( \YourProject\lib).
application.conf file:
db.default.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
db.default.url="jdbc:sqlserver://localhost\\instancename:1433;databaseName=MyDBName"
db.default.user="sa"
db.default.password="MyPassword"
db.default.logStatements=true
Enable the TCP\IP protocoll and the port 1433 in the SQL Server Configuration Tool.
That should do the job!
Manfred

SQL Server 2012 installation Reporting Services Catalog error

I'm installing SQL Server 2012 at the moment and when I was about to run the installation, this error pops up:
On clicking the first failed test, which is "Reporting Services Catalog Database File Existence", this is what i get:
On clicking the second failed test, which is "Reporting Services Catalog Temporary Database File Existence", this is what i get:
So basically, both of the message box says me that "Catalog Database File" & "Catalog Temporary database files exists". Because of this, i need to select Reporting Services file-only mode installation.
My questions are:
How do i select file-only mode installation?
Do i've to close the setup and do something and afterwards run the setup again?
Btw, I had SQL Server 2012 installed before. I uninstalled it completely due to some strange errors and decided to reinstall a fresh copy of SQL Server 2012 and now I'm stuck with these errors. Any help will be sincerely appreciated. :)
Since you already had one installation of SQL Server done before, there was a database already created. That did not get removed. So when you reinstall, its trying to create the database with the same name, hence, the error. You need to delete the old files to continue the new installation.
From the direcotry
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA
Remove the following files
ReportServer.mdf
ReportServer_log.LDF
ReportServerTempDB.mdf
ReportServerTempDB_log.LDF
Try the Following link for further help.
Reporting Services Catalog Error.
For sql-server-2012 the path is:
C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQL2012\MSSQL\DATA
where MSSQL2012 is the instance name and the respective file names are:
ReportServer$MSSQL2012.mdf
ReportServer$MSSQL2012_log.mdf
ReportServer$MSSQL2012TempDB.mdf
ReportServer$MSSQL2012TempDB_log.mdf
Remove the following files from the C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA directory:
bulletReportServer.mdf
bulletReportServer_log.LDF
bulletReportServerTempDB.mdf
bulletReportServerTempDB_log.LDF.
This happens if you reinstall SQL Server and these files weren't deleted.

Getting error in attach AdventuresWorks database in SQL Server (Using window 7)

I am newbie in Sql Server.I am trying to attach AdventureWorks database with Sql Server 2008(Window 7).following Error -
Can anyone tell me that how I can solve this problem?
Thanks in advance.
This is the installer package (msi). You must run it from explorer firstly.
You are trying to attach AdventureWorksDB.msi. First run this msi file, it will extract its contents somewhere. Then you will need to attach a file with extension .mdf.

SQL Server - An error occurred while executing batch. Error message is: The directory name is invalid

Our database server had run out of disk space, after freeing up some disk space any query run in sql server management studio, with the results sent to grid view, resulted in this error:
An error occurred while executing batch. Error message is: The directory name is invalid.
When the results sent to text view the queries worked fine.
Does anyone know why this error occurs and how to get rid of it?
All you need to do is to open command prompt and type:
mkdir %temp% and press Enter.
Simple as that. No logout/login required.
Received the message:
SQL Server - An error occurred while executing batch. Error message is: The directory name is invalid
When trying to execute a query in Management Studio after deleting temp files from c:\documents and settings\administrator\local settings\temp
Resolved when logging out of server session and back in again.
This resolution fixes this error on the following environments:
Windows Server 2003
Windows Server 2008
Windows Server 2012
Sql Server 2005
Sql Server 2008
Sql Server 2008 R2
Sql Server 2012
Sql Server 2014
Sql Server 2016
I had similar problem on SQL Server 2012. I checked the folder value in %TEMP% variable (echo %TEMP% from command prompt ) and noticed that the folder did not exist. I created the folder and it did the trick!
I had this issue on my webserver (windows server r2 running SQL Server 2012)
The directory name is invalid.
(mscore lib)
Logging out (killing my remote session) and logging back in fixed the issue for me.
Is the "Default Location for saving Query Results" set to a valid path in Tools/Options/Query Results/SQL Server/General?
Do the TMP/TEMP environment variables point to valid directories?
Reinstalling the client tools will probably fix the problem.
I had this same issue on my Windows 7 machine. I actually encountered the error both in SQL Server Management Studio and Visual Studio 2012. I checked my temp directory and found over 66,000 files. Significantly, there were a large number of files called tmpXXXX.tmp where XXXX was a hex number. The problem was that the files went all the way up to tmpFFFF.tmp. So whatever was creating the temp files was not cleaning them up properly and eventually just ran out of files. The solution was to delete all the files in that folder. Not surprisingly, this also greatly improved performance.
The temp folder can be found at: %TEMP% which will be correct for both XP and Win7.
I was facing this problem for a long time.....simple answer for this problem An error occurred while executing batch. Error message is: The directory name is invalid is just free up the disk drive space ....my problem resloved by this may be this will be helpful for many more...
I faced the same problem if DB was created in SQL Server 2008 and it was opened by SQL Server 2005. Just reopen it in 2008.
I was facing the same problem,
so to check this i typed %temp% and it gives an error for folder not found .../temp/2
so i created a folder name 2 inside temp folder and restart the sql server.
which works for me.
I know it can sound like a joke, but have you tried restarting SQL Server instance?
Yesterday i faced the same error "The directory name is invalid" when i tried to open New Query Window in SQL Management Studio 2014. It happened after cleaning (deleting) %temp% folder files.
I Restarted SQL services but no luck!
My problem was solved after restarting the server.