DefaultDataPath is empty in VS2010 SQL2008 database deployment script - visual-studio-2010

I have a VS2010 database project pointing to a SQL2005 database. When I deploy it, it correct picks up the DefaultDataPath from the SQL instance and everything works.
Today, I changed the project type from SQL205 to SQL2008 and changed the deploy properties to point to my SQL2008 server. However, now when I try to deploy, I get this error:
Error SQL01268: .Net SqlClient Data Provider: Msg 5105, Level 16, State 2, Line 1 A file activation error occurred. The physical file name '\AutoDeployedTRS.mdf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
Error SQL01268: .Net SqlClient Data Provider: Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
An error occurred while the batch was being executed.
The reason for this error is that the SQL script created by VS contain these three lines:
:setvar DatabaseName "AutoDeployedTRS"
:setvar DefaultDataPath "\"
:setvar DefaultLogPath "\"
If I check the SQL Instance properties (through the UI or by reading the registry), they are set correctly so it seems like VS2010 can't pick them up for some reason.
Any ideas?

Try to go to location Schema Objects\Database level objects\Storage\Files.
There can be found two files:
Open file [your_database_name].sql and make parameter
FILENAME = '$(DefaultDataPath)$(DatabaseName).mdf'.
Then open file [your_database_name]_log.sql and make parameter
FILENAME = '$(DefaultDataPath)$(DatabaseName)_log.ldf'.
After that try to deploy your project. This parameters now are defined during deployment according to current target database path. Hope it will help you.

Related

Reg: database is not starting up an error

getting below error while starting the database:-
startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/mis/PARAMETERFILE/spfile.276.967375255'
ORA-17503: ksfdopn:10 Failed to open file +DATA/mis/PARAMETERFILE/spfile.276.967375255
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","unknown object","KKSSP^24","kglseshtSegs")
Your database cannot find the SPFILE (newer init.ora) within ASM with the actual system parameters or has no permissions to access it.
Either your Grid Infrastructure stack or the dbs/spfile.ora is pointing to the wrong file.
To find out what the grid infrastructure stack is using, run "srvctl" which should display the parameterfile name the database should be using
srvctl config database -d <dbname>
...
Spfile: +DATA/<dbname>/PARAMETERFILE/spfile.269.1066152225
...
Then check (as the grid user), if the file indeed is not visible (by using asmcmd):
asmcmd
ASMCMD> ls +DATA/<dbname>/PARAMETERFILE/
spfile.269.1066152225
If the name is different, then you got the issue... (and you have to point to the correct file).
If the name is correct, then it could be wrong permissions on the oracle executable(s) (check My Oracle Support):
RAC Database Can't Start: ORA-01565, ORA-17503: ksfdopn:10 Failed to open file +DATA/BPBL/spfileBPBL.ora (Doc ID 2316088.1)

unable to connect Sql Developer using JDBC URL

I have jdbc URL as follows.
jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=8888))(LOAD_BALANCE = on)(CONNECT_DATA =(SERVER=DEDICATED) (SERVICE_NAME=XXX.XXX.XXX.XXX.com)))
When I connect using this URL from sql developer getting error as follows.
error ora 00604 error occurred at recursive sql level 1 ora-01882 timezone not found
I'm using Mac. If I go to .sqldeveloper -> 4.1.x -> product.conf.
There was a suggestion to change the tz to AddVMOption -Duser.timezone=CET . But I dont find any file called "sqldeveloper.conf".
Any idea here.
Resolved it by adding timezone values in sqldeveloper in product.conf file.
The path was : /Users/username/.sqldeveloper/4.1.5/product.conf (in MACS).
Added line was:
AddVMOption -Duser.timezone=GMT

AdminTask.listTCPEndPoints('abc(abc)') throws exception: ADMF0007E: target object is required

I'm working on deploying application to WebSphere 7 using python script and the script is throwing exception at this line:-
AdminTask.listTCPEndPoints('abc(abc)')
If I run the above command before I run the python script, it works fine. It gives me an error ADMF0003E: Invalid parameter value. But the same command fails in the python script with this error:
wsadmin>AdminTask.listTCPEndPoints('abc(abc)')
WASX7015E: Exception running command: "AdminTask.listTCPEndPoints('abc(abc)')"; exception information: com.ibm.websphere.management.cmdframework.CommandValidationException: ADMF0007E: target object is required.
I can guess that there something in the python script that is causing this issue, but I don't understand why is the AdminTask.listTCPEndPoints command is not able to see the parameter being passed. I'm new to WebSphere, I have only used it in past but never configured it. Any help/insight would be highly appreciated.
Thanks!
Added stack trace of interactive mode option
wsadmin>print AdminTask.listTCPEndPoints('-interactive')
List NamedEndPoints that can be used by a TCPInboundChannel
Lists all NamedEndPoints that can be associated with a TCPInboundChannel
*TCPInboundChannel: abc(abc)
excludeDistinguished (excludeDistinguished): 0
WASX7435W: Value 0 is converted to a boolean value of false.
unusedOnly (unusedOnly): 0
WASX7435W: Value 0 is converted to a boolean value of false.
List NamedEndPoints that can be used by a TCPInboundChannel
F (Finish)
C (Cancel)
Select [F, C]: [F] F
WASX7278I: Generated command line: AdminTask.listTCPEndPoints('[-excludeDistinguished false -unusedOnly false]')
WASX7015E: Exception running command: "AdminTask.listTCPEndPoints('-interactive')"; exception information:
com.ibm.websphere.management.cmdframework.CommandValidationException: ADMF0007E: target object is required.
Follow this link. It appears that you have not specified the target object that's why that error is coming.
I suggest use the following command as a starter
print AdminTask.listTCPEndPoints('-interactive')
Note: Instead of copying and pasting the command, type it on the command line. sometimes command editor does not take the command after pasting it directly.
Okay, I was able to fix the error. I was getting that error because as part of the application deployment script, I was copying few of my application jars to WebSphere's java/jre/lib/ext directory so that those are available in classpath. In one of those jar, I had bundled an IBM class (Base64Coder.class) which was required by a class in my jar and it was corrupting the WebSphere AdminTask utility. When I removed that Base64Coder.class from my jar, python script worked fine. I believe, the reason it corrupted WebSphere was that there was a duplication of the same class in the JVM as the class comes with IBM WebSphere installation and was present in AppServer/runtimes/com.ibm.ws.webservices.thinclient_7.0.0.jar

Error on run SQLPackage.exe /a:script

I'm trying to automate the database deploy process an I'm using the SqlPackage.exe.
I have some database deployment process working with this exe but recently I've been facing an problem to a new database.
When I try to run:
"C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\sqlpackage.exe" /a:Script /op:p_dbprm003.sql /sf:c:\p_dbprm003.dacpac /TargetServerName:servernamexyzw /TargetDatabaseName:p_dbprm003 /Profile:c:\p_dbprm003.publish.xml
I get the message:
The reference to the element with the name '[xxx_user ]' could not be resolved.
More than one element with this name exists. To resolve the error, you must add
one or more disambiguators.
I really don't know what does it means.
I have a user [xxx_user] and a schema [xxx_user] with the same name. Do you think that it could be an possible cause of the error?
You must set the path variable of SqlPackage.exe as a system variable.It solved my problem.

Setting appConcurrentRequestLimit in Windows 2008

I read from SO (HTTP Error 503.2 - Service Unavailable. The serverRuntime#appConcurrentRequestLimit setting is being exceeded) and MSDN (http://technet.microsoft.com/en-us/library/dd425294(v=office.13).aspx) that I need to set AppConCurrentRequestLimit to a bigger number if the site is showing appconcurrentlimit exceeded error (which mine is like that).
However upon executing the command provided by MSDN, I got error
c:\Windows\System32\inetsrv>appcmd.exe set config /section:serverRuntime /appCon
currentRequestLimit:100000
ERROR ( message:Unknown attribute "appConcurrentRequestLimit". Replace with -?
for help. )
I try to search in google but seems no one having the same issue as mine.
I try to manually input in ASPNET.Config in XML but whatever I change the site does not seem to restart, even I put random error text in the config, my site still does not show error, is ASPNET.Config configuration being used, why there is no error even the configuration is intentionally made error?
It fails if you have additional sections such as ftpsection.
In order to edit the serverRuntime of the system.webserver section you should run:
cd %windir%\system32\inetsrv
appcmd.exe set config /section:system.webserver/serverRuntime /appConcurrentRequestLimit:100000

Resources