i have a problem for a while but suddenly it became a terminal error since i got to do this task 'today'. i already tried everything suggested.
caused by a problem at installing oracle i found a workaround and i connect to database with connectionstring below, which works:
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=MYDATABASE)));User ID=myusername;Password=mypassword;
and in that database i have a connections table which my datalayer uses to connect to other databases.
so here begins the problem. when i try to connect to other databases i get the error: ORA-12154: TNS:could not resolve the connect identifier specified.
long story short: i can not touch that table. tnsping does work, so does toad. but plsql developer and visual studio can not. i mean there should be a problem with listener, sqlora, tnsnames or such specific oracle file and i cant find what.
for VS i'd try putting the tnsnames.ora in the bin folder of the app. For sqlplus i'd check that it is in C:\Orant\
Related
I'm a Window user and I have a problem with Oracle SQLLDR.
Whenever I run SQLLDR in CMD, it shows Errors: The code execution cannot proceed because xxx.dll was not found. It pops up several times for some xxx.dll files missing.
I have both instantclient_21_9 and ODAC122011 in my computer. ODAC122011x64 is required by PowerBI to Get data from Oracle database. And I'm still able to connect to Oracle database as well.
I have followed many instructions but they all not work to me. Then I really need your help here.
I have download:
instantclient-basic-windows.x64-21.9.0.0.0dbru.zip
instantclient-sqlplus-windows.x64-21.9.0.0.0dbru.zip
instantclient-tools-windows.x64-21.9.0.0.0dbru.zip
from https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
and extract them all in the same directory
I have set PATH in System Variable as below
The ODAC122011\product\12.2.0\client_1 must be above for PowerBI getting data from Oracle Database
I have also tried to remove ODAC from PATH to test, but it's still the same error:
I've installed the ODT for Visual Studio 2015 (I've also tried VS2013) in hopes of using the "Oracle Database Project" but experiencing some specific error messages that don't appear to be very common.
When I browse the database via the Server Explorer, there is an option for you to be able to right click on a Relational Table and click "Generate Create Script to Project...".
However, when clicking this option I get a very non-specific error message and cannot work out why;
"Create script was not generated to Project for some of the selected object(s). See the 'Oracle Database Output' output pane for more information."
When I look at the "Oracle Database Output" window I get the message;
"Script Generation failed - Internal Error."
For here-on-in, it's gets very frustrating to find out what's wrong and to debug this non-descriptive error message.
What's most interesting is that the script generation function works for other database objects such as views & procedures, it just fails to work for database tables.
Has anybody experienced this error before? I'm wondering if it's a driver issue of some sort! (I have the oracle 11g client installed, and just tried with a specific ODAC/ODT combination package which appears to also install the 12c client, connecting to an Oracle Elements 11g server)
Any help appreciated, Thanks.
I have this problem too.
I was able to Create the scripts earlier, but now I cannot.
I did some investigating and decided this is not a problem with the oracle database. It is something to do with the state of VS.
I restarted VS2015 and I could create scripts again.
I've had this current issue before, and the steps that I've used to resolve it in the past aren't working. I'm working with a database in SSMS, as well as through C#/.NET. When I encounter a bug on the C# side after connecting to the database, the db becomes inaccessible until I close visual studio, and then in prior situations, taking the db offline then on again. I'm looking for more ideas/ help, since after doing those things, a simple query:
SELECT TradeDate, Symbol, Clse
FROM tblDailyPricingAndVol
gives me
Msg 208, Level 16, State 1, Line 1
Invalid object name 'tblDailyPricingAndVol'.
(whereas it is valid, and I type it right after expanding it in object explorer in ssms).
Update:
Running that query with db/ schema prefix as such:
SELECT Market.dbo.TradeDate
FROM Market.dbo.tblDailyPricingAndVol
Returns the error:
Msg 945, Level 14, State 2, Line 1
Database 'Market' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
Running this:
select name, state_desc, user_access_desc, is_read_only from sys.databases
tells me that my db is online. I closed visual studio and restarted my machine last night, then took the db offline then on, and I don't see anything like "recovery pending" etc. today still. I'd like to get back up and running, and if anyone can shed some light on this process of connecting/ disconnecting SQL Server 2008 with Visual Studio 2010, it'd be much appreciated..
A. Make a copy of your Market.mdf file and store it somewhere safe.
B. Run the following commands in a query window:
USE [master];
GO
ALTER DATABASE Market SET SINGLE_USER WITH ROLLBACK IMMEDIATE; -- may fail
GO
DROP DATABASE Market; -- may fail depending on whether this db really exists
GO
CREATE DATABASE Market ON ( FILENAME =
'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\Market.mdf'
) FOR ATTACH;
GO
If this fails due to some error with the log file (.ldf), then try moving the market.ldf file elsewhere, and running:
CREATE DATABASE Market ON ( FILENAME =
'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\Market.mdf'
) FOR ATTACH_REBUILD_LOG;
To prevent similar problems in the future:
Don't detach your database.
Don't connect to your MDF file using the AttachDbFileName and User Instance settings.
Don't set your database to OFFLINE.
Don't set your database to Auto-Close.
I have an application that I can't get connected to my Oracle Database 11g Express Edition. I created a test database in this edition, and I can connect to the database fine using Oracle SQL Developer, create tables, views etc. However, I'm having a hard time getting connected via my application. Where is the connection information? In what file? I wanted to compare my connection info with what is set up in the SQL Explorer's file. I found all the *.ora files and renamed them to see if I could find what file (through the process of elimination) the connections were stored in, but I wasn't successful. Any help would be appreciated.
It was in a slightly different location for me than those listed above
\Users\[user]\AppData\Roaming\SQL Developer\system3.2.20.09.87\o.jdeveloper.db.connection.11.1.1.4.37.59.48\connections.xml
Assuming you have lost these while upgrading versions like I did, follow these steps to restore:
Open SQL Developer
Right click on Connections
Chose Import Connections...
Click Browse (should open to your SQL Developer directory)
Drill down to "systemx.x.xx.xx" (replace x's with your previous version of SQL Developer)
Find and drill into a folder that has ".db.connection." in it (for me, it was in o.jdeveloper.db.connection.11.1.1.4.37.59.48)
select connections.xml and click open
You should then see the list of connections that will be imported
If you don't find the connections.xml then right-click on Connections in the Connections view of SQLDeveloper, and choose Export connections.
It is stored in a file called connections.xml under
\Users\[User]\AppData\Roaming\SQL Developer\System\
When I renamed the file, all my connection info went away. I renamed it back, and it all came back. When I viewed the XML file, I found both test connection aliases, ports, usernames, roles, authentication types, etc.
In some versions, it stores it under
<installed path>\system\oracle.jdeveloper.db.connection.11.1.1.0.11.42.44
\IDEConnections.xml
For OS X my connection.xml files are in
/Users/<username>/.sqldeveloper/system<sqldeveloper_version>/o.jdeveloper.db.connection.<oracle_version?>/
With SQLDeveloper v19.1.0 on Windows, I found this as a JSON file in
C:\Users\<username>\AppData\Roaming\SQL Developer\system<versionNumber>\o.jdeveloper.db.connection
The file name is connections.json
SqlDeveloper stores all the connections in a file named
connections.xml
In windows XP you can find the file in location
C:\Documents and Settings\<username>\Application Data\SQL Developer\systemX.X.X.X.X\o.jdeveloper.db.connection.X.X.X.X.X.X.X\connections.xml
In Windows 7 you will find it in location
C:\Users\<username>\AppData\Roaming\SQL Developer\systemX.X.X.X.X\o.jdeveloper.db.connection.X.X.X.X.X.X.X\connections.xml
I found mine in
C:\Users\<user>\AppData\Roaming\SQL Developer\system2.1.1.64.45\o.jdeveloper.db.connection.11.1.1.2.36.55.30\connections.xml
If you have previously installed SQL Developer then it will store the connection details in the 'connection.xml' which will be located in below mentioned path.
C:\Users\Username\AppData\Roaming\SQL Developer\system3.1.07.42\o.jdeveloper.db.connection.11.1.1.4.37.59.48
Once you get that 'connection.xml'
try to import it into SQLDeveloper by right clicking to CONNECTIONS.
for macOS
/Users/joseluisbz/.sqldeveloper/system18.1.0.095.1630/o.jdeveloper.db.connection/connections.xml
In a simpler way open search window and search for connection.xml gives a right click on that file and select open file/folder location.
Once you get that connection.xml try to import it into SQLDeveloper by right clicking to CONNECTIONS.
To recover your password, locate the product_preferences.xml file in the following location:
C:\Users[username]\AppData\Roaming\SQL Developer\system*\o.sqldeveloper\product-preferences.xml
Then, search for the string db.system.id and copy the value of the v attribute. That is your decryption key to use when you are prompted to enter your decryption key on the Password Handling panel during the import processing on SQL Developer.
On linux systems:
~/.sqldeveloper/system<sqldeveloper_version>/o.jdeveloper.db.connection/connections.xml
I created SSIS packages a while ago, today I need to re-point them to a different SQL server. I have a bunch of "Execute SQL Task" tasks, which need their Connection property changed to a different server.
I created a new connection manager, double-clicked on each of the sql tasks, changed their Connection property to the new one, ran. It failed, the error was that it could not find the old connection. I restarted the project, none of the SQL Server tasks seem to pick up the new Connection Manager. I opened up the .dtsx files, tried to find the old server name somewhere and manually change it, but I could not find the old server.
What do I have to change to get rid of the old SQL Server and make it connect to the new, correct data source.
I work in VS2005, on Windows 2008 x64 machine (I don't know if it matters or not).
Thank you.
I've seen this occur before when Package Configurations are enabled. Make sure that this is not the case, recompile, and try again.
all you had to do is change the connection string in the old connection manager
make a new one if you deleted the old one and in all the tasks select the new one, even if you create a new one with the same name as the old one it won't work because somewhere internal a guid is used
Check to see if package configuration is enabled. The package may still be getting the configuration of the old server from the package configuration.
try recompiling after making the changes.