Search This Blog

Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Wednesday, April 6, 2016

sqlcmd - command line to run sql scripts (batch mode)

sometimes the best option to get fast result is to use an exisitng queries tools, many option include formatting for csv files.



Use sqlcmd with Scripting Variables:

sqlcmd Utility




Thursday, June 23, 2011

SAVING CHANGES IS NOT PERMITTED - SQL Server Management Studio

if you get such error on every table changes:
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.

on the  Management Studio -> go to Tools -> Options then go to the Designer Page and uncheck "Prevent saving changes that require table re-creation".

thats all
Yaniv tzanany

Thursday, March 10, 2011

jTDS with sqlserver instance

jTDS is an open source 100% pure Java (type 4) JDBC 3.0 driver for Microsoft SQL Server (6.5, 7, 2000, 2005 and 2008).
when connecting to sqlserver instance instance a valid jdbc url should looks like this:
jdbc:jtds:sqlserver://YanivServer:1433/mydb;instance=myInstance;user=sa;password=xyz

make sure the next stuff is configured and running:
open the "sql server configuration manager "

  • sql browser service (its turn off by default) is running 
  • goto sqlserver network configuration  -> 
    •  the protocol of the instance , and make sure the  TCP/IP  is enabled.

enjoy 
Yaniv Tzanany

Monday, September 7, 2009

Connect to SQL Azure - starter links

Recently i am dealing with SQL azura , a relational db on the cloud from Microsoft.
here are some starter links to put you in the map:
SQL Azure Database - HOME .
Microsoft SQL Azure FAQ.
you will have to create your account for SQL Azure (CTP this days), after you will get your code you can manage the DB's.
for a complete set of action how to connect to your DB from your preferred tools , i found the next post First Impressions with the New SQL Azure that will give you a good starting way to interact with your cloud db the
Connecting to SQL Azure from SQL Management Studio 2008 can help too if needed.
NOTES:
if you are in the office and you have a firewall , you will have to open it for:
Access type: outbound
Destination port: 1433
Destination IP range: 65.55.*.*

In addition, if your network has a proxy server for accessing the Internet then you need to configure your proxy server to allow outbound 1433 connections and you need to configure your system to use the proxy server.
this from here Firewall Issues.

hope its help you to start your cloud db - i hope its works well.
and of course MSDN link - SQL Azure .
another good blog The latest news and insight from the SQL Azure team.

enjoy
Yaniv