I've looked at the M$ docs for Post-build Event Commands and don't see any thing like what I need ( http://msdn.microsoft.com/en-us/library/42x5kfw4.aspx ), -> conditional checks
here's my Post-build Event Commands (VS2013 Ult):
copy $(TargetName).* "$(DevEnvDir)\PrivateAssemblies\"
net stop "SQL Server Reporting Services (MSSQLSERVER)"
copy $(TargetName).* "C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\"
net start "SQL Server Reporting Services (MSSQLSERVER)"
I WANT them to work like this:
copy $(TargetName).* "$(DevEnvDir)\PrivateAssemblies\"
IF SSRS 2008 R2 DESTINATION EXISTS THEN
net stop "SQL Server Reporting Services (MSSQLSERVER 2008 R2)"
copy $(TargetName).* "C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\"
net start "SQL Server Reporting Services (MSSQLSERVER 2008 R2)"
IF SSRS 2012 DESTINATION EXISTS THEN
net stop "SQL Server Reporting Services (MSSQLSERVER 2012)"
copy $(TargetName).* "C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\"
net start "SQL Server Reporting Services (MSSQLSERVER 2012)"
IF SSRS 2014 DESTINATION EXISTS THEN
net stop "SQL Server Reporting Services (MSSQLSERVER 2014)"
copy $(TargetName).* "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin\"
net start "SQL Server Reporting Services (MSSQLSERVER 2014)"
(Thing is, we still have a couple of servers still running SQL Server 2008 R2, mostly SQL Server 2012 and a few SQL Server 2014. It wouldn't be too far fetched if some VMs had more than one version of SQL Server needed for migration purposes.)
I tried to "putz" around with stuff like this below, but I was unable to get any detailed information from M$ nor Google:
sc query "SQL Server Reporting Services (MSSQLSERVER)" type=service | FIND "SQL Server Reporting Services (MSSQLSERVER)" | FIND "RUNNING" >nul
if ERRORLEVEL 1 (echo NOT RUNNING) ELSE (echo RUNNING)
Thanks
Rob
PS terribly disappointed with M$, both for this and detailed information relating to SSRS Data Processing Extensions
i ended up doing this in the Build Events, Post-build event command line(s) (guessing that maybe it would function with DOS commands, which is "clunky", but I never got a response on several forums):
copy "$(TargetDir)$(TargetName).*" "$(DevEnvDir)PrivateAssemblies\"
IF exist "c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2010x64 exists )
IF exist "c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2010x86 exists )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2012x64 exists )
IF exist "c:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2012x86 exists )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2013x64 exists )
IF exist "c:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2013x86 exists )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 13.0-x64 exists )
IF exist "c:\Program Files\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 13.0-x86 exists )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files (x86)\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 14.0-x64 exists )
IF exist "c:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 14.0-x86 exists )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*" "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" )
net stop "SQL Server Reporting Services (MSSQLSERVER)"
IF exist "C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo SQL Server 2008-MSRS10 exists )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy "$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\" )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo SQL Server 2012-MSRS11 exists )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy "$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\" )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo SQL Server 2014-MSRS12 exists )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy "$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin\" )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo SQL Server 201x-MSRS13 exists )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy "$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin\" )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS14.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo SQL Server 201x-MSRS14 exists )
IF exist "C:\Program Files\Microsoft SQL Server\MSRS14.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy "$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL Server\MSRS14.MSSQLSERVER\Reporting Services\ReportServer\bin\" )
net start "SQL Server Reporting Services (MSSQLSERVER)"
granted that the:
copy "$(TargetDir)$(TargetName).*" "$(DevEnvDir)PrivateAssemblies\"
is in all likelihood redundant (going to happen again in the commands), but "I'm covered" (i.e. if I build the SSRS DPE in VS2013, register it in SQL Server 2012, I'm going to see the extension in VS2010 when I create a report or need the Report Query Designer to be custom, based on the (custom) DataSource selected).
also, some nice procecessor specific logic here: http://code-jedi.com/blog/post/Using-Platform-Specific-Libraries-from-a-Platform-Agnostic-Project.aspx
Rob K
Related
I'm having an issue signing throught Visual Studio post-build event.
When I sign the file through power shell it works fine, but when I try to sign it in a post-build event in Visual Studio I get the message: The specified PFX password is not correct.
I've checked and the password is correct.
Here my Post-build event:
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\signtool.exe" sign /f "pfxFilePath.pfx" /as /fd sha256 /p password "$(TargetPath)"
Finally I've found out the issue. My pfx password contained special characters like %, when running the command line through power shel it was fine but when I've tried to run it through Visual Studio post build event, it failed. I just removed the % from the password and it worked.
Problem: Hi SO community. Trying to execute a VS_2019 package that I can execute while in BIDS. Ran though all the specs including converting the package to
1) Package deployment mode
2) Converted the package to run in 32-bit mode
3) Finally, creating a config file to store the Oracle server credentials in
using this url: https://www.sqlservercentral.com/articles/how-to-execute-an-ssis-package-from-the-command-line-or-a-batch-file
4) Build the project no issues ; i.e. zero erros.
What I have tried:
"C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\DTExec.exe" /file "C:\Users\name\Desktop\SSIS_Local\JDA_Test\bin\Development\OrderAccuracy.dtsx" /config "C:\Users\name\Desktop\SSIS_Local\JDA_Test\JDA_PackageDeployment_Config.dtsConfig"
AND
"C:\Program Files\Microsoft SQL Server\150\DTS\Binn\DTExec.exe" /file "C:\Users\name\Desktop\SSIS_Local\JDA_Test\bin\Development\OrderAccuracy.dtsx" /config "C:\Users\name\Desktop\SSIS_Local\JDA_Test\JDA_PackageDeployment_Config.dtsConfig"
and both give me the error: The SSIS runtime version 15.0.2000.5 is too low for this Oracle connector. Please install a newer version of SSIS (later than SQL Server 2019 RTM).
End Error
Finally: internals of config file are:
SERVER=0.0.025.183:1521/DB;USERNAME=PB;WINAUTH=0;data source=0.0.225.183:1521/db;user id=pb;password=kuttp8x2bRRE;
So any help or direction would be great. Please feel free to ask any further questions.
I'm NOT even connecting to a SQL Server 2019. My source is Oracle. And my destination is going to be a flat file. This data will go into Snowflake database. But ETL tool used to connect to Oracle is SSIS.
Solution was to install the latest SQL Server 2019 update located here:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F4548597%2Fcumulative-update-4-for-sql-server-2019&data=02%7C01%7Cv-sagkal%40microsoft.com%7C69a0e5d79ceb4ae3e20608d7daec4509%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637218580624686059&sdata=4avejidj69V2tJoQ5CWAaqIX9SCaHohWD%2F4we5hEGsg%3D&reserved=0
Package now runs with both 32-bit and 64-bit DTSExec versions. Password for source is stored in a config file and solution is on 'package deployment mode' .
Solution for anyone who runs into this issue in future.
11g XE Version 11.2.0
instance name is xe
Path to SQLPLUS.exe
G:\JaveWebApps\Oracle11gDb\app\oracle\product\11.2.0\server\bin
When I try to run sqlplus in cmd in C:\Users\User> I keep getting this error:
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory.
Here are my ENVIRONMENT VARS
ORACLE HOME
G:\JaveWebApps\Oracle11gDb\app\oracle\product\11.2.0\server
Path
%ORACLE_HOME%\bin;C:\Python34\Lib\site-packages\PyQt4;C:\Python34\;C:\Python34\Scripts;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;G:\XAMPP\php;C:\ProgramData\ComposerSetup\bin;%USERPROFILE%.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Java\jdk1.7.0_45\bin
These are the commands I ran in this order
echo %ORACLE_HOME%
G:\JaveWebApps\Oracle11gDb\app\oracle\product\11.2.0\server
set ORACLE_SID = xe
set ORACLE_HOME = G:\JaveWebApps\Oracle11gDb\app\oracle\product\11.2.0\server
sqlplus
ERROR 6 initializing SQLPLUS
You may beed to set ORACLE_HOME to your Oracle software directory.
There are multiple cases online with the same error, but none of them are working for me.
I am new to SOAPUI. On internet i found, this can be done with two ways: Either i can use SoapUI JDBC wizard or Using groovy script.
First i tried to create connection using Wizard but i am getting this error :
com.eviware.soapui.support.SoapUIException: Failed to init connection
for driver [com.microsoft.jdbc.sqlserver.SQLServerDriver],
connectionString
[jdbc:microsoft:sqlserver://192.168.185.100\MyDB;databaseName=ABC?user=Test&password=Pass]
I extract the JDBC driver to path
C:\Program Files\Microsoft JDBC Driver 4.0 for SQL Server
and Copy this Jar file
C:\Program Files\Microsoft JDBC Driver 4.0 for SQL
Server\sqljdbc_4.0\enu\sqljdbc4.jar
to this folder
C:\Program Files\SmartBear\SoapUI-5.2.1\bin\ext\sqljdbc4.jar
Added Environment Variable
variable name : classpath
variable value : C:\Program Files\Microsoft JDBC Driver 4.0 for SQL
Server\sqljdbc_4.0\enu\sqljdbc4.jar;
Add sqljdbc_auth.dll(use x64 or x32 based on your system configuration), to *C:\Program Files\SmartBear\SoapUI-5.2.1\bin\ext* (the same path where you have placed the sqljdbc4.jar file).
That seems to be the only step missing in the setup you have described. Once that is in place the JDBC test step request should work fine.
You can follow this thread on the SmartBear community for this particular issue.
https://community.smartbear.com/t5/SoapUI-Open-Source/Solved-JDBC-Cannot-connect-to-a-MS-SQL-database/td-p/132235
I created code first approach application mvc and it created sdf file db. Now I want to migrate that sdf file to sql server.
When I double click on sdf, It says message like This is not a valid SQL Server Compact Database file or this file version is not supported by current SQL Server Compact Engine.
I want to migrate,sync data to sql server of any better approach for future, how can I migrate db?
A possible reason for the error message is that you do not have the correct version of SQL Server Compact installed on your development machine.
The current version is 4.0, but your application might still be using 3.5. Find out which version it is and check the folder C:\Program Files\Microsoft SQL Server Compact Edition to see if there's a directory with that version name. If there isn't, download and install it (3.5, 4.0).
If you are using SqlCE 4.0 and Visual Studio 2010 Pro or higher, you can migrate the sdf's structure and data using ErikEJ's SQL Server Compact Toolbox 3.3.0.4 which is available through Visual Studio's Extension Manager.
After you have installed the Toolbox, the migration steps are as follows:
Using the Toolbox, connect to your sdf file within Visual Studio.
From the context menu, choose Script Database > Script Database Schema and Data (do not choose Script Database Schema and Data with BLOBS). This will save one or more '.sqlce' script files, depending on how large your sdf is.
In your SQL Server instance, create an empty target database.
Locate the SQLCMD.exe of your Sql Server installation. For SQL Server 2008 it typically is at C:\Program Files\Microsoft SQL Server\100\Tools\Binn. Open a regular cmd.exe with administrator rights and navigate to the directory containing SQLCMD.exe.
From there, execute:
sqlcmd -S [sql server instance name] /d [target database name] -i
[full path][filename].sqlce
If you have multiple sqlce files, you can reference them in the same command like this:
sqlcmd -S [sql server instance name] /d [target database name] -i
[full path][filename_0].sqlce -i [full path][filename_1].sqlce -i
[full path][filename_2].sqlce
The server option -S needs to be a capital. Good luck.