Sponsored Content
Top Forums Shell Programming and Scripting MSSQL or SQL SERVER or SQLSERVER? Post 302854343 by gsflash80 on Wednesday 18th of September 2013 11:33:46 AM
Old 09-18-2013
Quote:
Originally Posted by spacebar
Do you mean when option 2 is selected you want to copy all files with extension(*.SQL) from folders(MSSQL, SQLSERVER, SQLSERVER) if the folder(s) exist?
Yes ;-)

---------- Post updated 18-09-13 at 12:07 PM ---------- Previous update was 17-09-13 at 02:33 PM ----------

None reply?

---------- Post updated at 05:33 PM ---------- Previous update was at 12:07 PM ----------

i have resolved on this mode:

Code:
DIRLOC=$(pwd)
DIRNAMES="SQLSERVER SQL MSSQL"
for DIRNAME in ${DIRNAMES}; do if [ -d "${DIRLOC}"/"${DIRNAME}" ]; then         echo "${DIRLOC}"/"${DIRNAME}" exist; else echo "${DIRLOC}"/"${DIRNAME}" not exist; fi; done

and result:
Code:
/home/script/SQLSERVER exist
/home/script/SQL not exist
/home/script/MSSQL not exist

it's ok, but when i'll want to find the folder "SQL SERVER" and i tried with

DIRNAMES="SQLSERVER SQL MSSQL ""SQL SERVER"""

and results:
Code:
/home/script/SQLSERVER exist
/home/script/SQL not exist
/home/script/MSSQL not exist
/home/script/SQL not exist
/home/script/SERVER not exist

it's not worked for the folder with space, what is another mode?
Thanks

Last edited by radoulov; 09-18-2013 at 12:38 PM.. Reason: iCode to Code tags.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Stored Procedure on NT/SQLServer

Hi: How will I execute a Stored Procedure that sits on NT/SQLServer. Any help would be appreciated. Thanks (3 Replies)
Discussion started by: mayohan
3 Replies

2. Shell Programming and Scripting

connect to mssql

Hi - can any one tell me is it possible to connect to mssql and fetch the data from unix shell scripts (3 Replies)
Discussion started by: ahmedwaseem2000
3 Replies

3. AIX

connect SQLSERVER from unix

I have an application working in unix accessing oracle 9i database on a IBM AIX Unix 5.2 system. I want this unix application to retrieve data from a SQL server 2000 server to oracle database. how can i connect to this SQL server database from a unix application pls help me if you can (2 Replies)
Discussion started by: samsonsimon
2 Replies

4. Solaris

Connect From VB to SQL Server

Dear All Now I can't connect from VB to Sybase on Unix. How could I do? Please help me. (0 Replies)
Discussion started by: Than Chanroeun
0 Replies

5. Shell Programming and Scripting

connecting to sqlserver from perl

Hi, I am doing a migration of Oracle database to SQLSERVER 2005.Mostly my application code is perl scripts and i want to modify the scripts so as to connect to SQLSERVER. What all would be the changes i have to make for just establishing a connection from Perl script to SQLSERVER... (3 Replies)
Discussion started by: DILEEP410
3 Replies

6. AIX

AIX to access MSSQL server

Anyone can provide a solution for how AIX to access Microsoft SQL server ? (0 Replies)
Discussion started by: hellboy01
0 Replies

7. Ubuntu

Ubuntu Bulk Insert to Windows SQLServer

Hi, Anyone can help me, I can connect from ubuntu "freetds driver" to Windows sqlserver Database and doing select, insert, update, etc. But when I try to use the Bulk Insert with these command; 1> BULK INSERT test FROM '/home/test/test.txt' WITH (FIRSTROW = 2, CODEPAGE = 'ACP',... (2 Replies)
Discussion started by: dba_macau
2 Replies

8. Shell Programming and Scripting

linux ISQL and MSSQL unload results to file

Hello, I am using suse 10.1 and isql from unixodbc to connect to a MS SQL server. I got everything to work fine. What do I need to unload the results from the sql to a file? I attempted to put unload to in my sql statement but got a error. I don't see in the isql help where it has a option to... (0 Replies)
Discussion started by: benefactr
0 Replies

9. Windows & DOS: Issues & Discussions

SQL Server

hi, am new in sql server how can i grip on sql server 2008...........plz help me. (1 Reply)
Discussion started by: jiqbal0092
1 Replies
ALTER 
SERVER(7) SQL Commands ALTER SERVER(7) NAME
ALTER SERVER - change the definition of a foreign server SYNOPSIS
ALTER SERVER servername [ VERSION 'newversion' ] [ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] ) ] ALTER SERVER servername OWNER TO new_owner DESCRIPTION
ALTER SERVER changes the definition of a foreign server. The first form changes the server version string or the generic options of the server (at least one clause is required). The second form changes the owner of the server. To alter the server you must be the owner of the server. Additionally to alter the owner, you must own the server and also be a direct or indirect member of the new owning role, and you must have USAGE privilege on the server's foreign-data wrapper. (Note that superusers sat- isfy all these criteria automatically.) PARAMETERS
servername The name of an existing server. serverversion New server version. OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] ) Change options for the server. ADD, SET, and DROP specify the action to be performed. ADD is assumed if no operation is explicitly specified. Option names must be unique; names and values are also validated using the server's foreign-data wrapper library. EXAMPLES
Alter server foo, add connection options: ALTER SERVER foo OPTIONS (host 'foo', dbname 'foodb'); Alter server foo, change version, change host option: ALTER SERVER foo VERSION '8.4' OPTIONS (SET host 'baz'); COMPATIBILITY
ALTER SERVER conforms to ISO/IEC 9075-9 (SQL/MED). SEE ALSO
CREATE SERVER [create_server(7)], DROP SERVER [drop_server(7)] SQL - Language Statements 2010-05-14 ALTER SERVER(7)
All times are GMT -4. The time now is 01:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy