Search Results

Search found 22 results on 1 pages for 'osql'.

Page 1/1 | 1 

  • Suggestions for Scheduled Tasks to call OSQL without hard-coding cleartext password

    - by Ian Boyd
    Can anyone think of any techniques where i can have a Windows scheduled task run OSQL, but not have to pass the clear-text password with cleartext password being in the clear? E.g.: >osql -U iboyd -P BabyBatterStapleCorrect Assumption: No Windows Authentication (since it's not an option) i was hoping there was a >OSQL -encryptPassword "BabyBatterStapleCorrect" > > OSQL > Encrypted password: WWVzIGkgd2FudCB0byByYXBlIGJhYmllcy4gQmlnIHdob29wLiBXYW5uYSBmaWdodCBhYm91dCBpdD8= And then i could call OSQL with: >osql -U ian -P WWVzIGkgd2FudCB0byByYXBlIGJhYmllcy4gQmlnIHdob29wLiBXYW5uYSBmaWdodCBhYm91dCBpdD8= But that's not something Microsoft implemented.

    Read the article

  • Granting rights to the sa account using osql

    - by Jan Jongboom
    I'm installing sql instances through script, and after creating a certain instance, I cannot get the sa account to be enabled through osql. What I've tried osql -S .\INSTANCENAME -E use master ALTER LOGIN sa ENABLE GO Using SSMS to enable the account (by logging in using Windows Auth., 'New query', and exactly the same query as in 1.) Suggestions in this issue No. 2. is actually working; and the account is enabled instantly. No 1 is not working, not even with the suggestions provided in 3., I have restarted the SQL services after executing the commands in osql. Additional info Windows 2003 Server, Microsoft SQL Server 2005 Enterprise, No password policies apply to the account.

    Read the article

  • Which dll's are required to run osql.exe as a standalone?

    - by chama
    According to the accepted answer to this question, the osql.exe utility can be run as a standalone program on a computer without SQLServer, simply by copying the binary file to the new computer. My question is, however, which other files need to be copied along with osql.exe for it to work? Thanks so much!

    Read the article

  • SQL commands when SQL only exists on network

    - by chama
    I'm trying to find a list of all sql servers on the network using the osql -L command in the command prompt. This command only works when SQLServer is installed on the computer that I'm working on. Is there any way to run this command when SQLServer is not installed on that particular computer, but is installed somewhere on the network? Thank you! EDIT: I'm writing a program in java, so the easy enumerations that you can do in the .NET framework won't work for me.

    Read the article

  • How can I run this batch file?

    - by tech
    OSQL -S 127.0.0.1 -U sa -P password RESTORE DATABASE DATA FROM DISK = C:\backup\data.dat GO EXIT This is the batch file. but after I run the OSQL -S 127.0.0.1 -U sa -P password, the dos command start with the line 1> After that, the batch cmd can't run. How can I fix this problem? thz.

    Read the article

  • Is there a jdbc driver for SQL Server that can search for database instances on network?

    - by djangofan
    Is there a jdbc driver for SQL Server that can search for database instances on network? Just wanting to emulate "OSQL -L" from the JDBC driver. Dont want to have to call OSQL from JNI or something. I also don't want to have to write my own code for scanning a UDP port. I want my Java application to be able to search for live SQL Servers and prompt me with a list of available servers. Isn't this a reasonable expectation for a JDBC driver? OSQL.exe can do it and so why not the JDBC driver?

    Read the article

  • Unable to connect to remote MS SQL Server 2008 Express SP3 instance by name

    - by Max
    I am trying to connect to a remote MS SQL Server 2008 SP3 x86 Instance using it's name. At the first glance all seems to work well (e.g. it is possible to connect to the server locally and succesfully telnet it's port remotely), but there is a thing I can't understand... This line should connect us to the default instance of remote SQL Server: osql -S ServerIP -d MyDatabase /U sa -P MyPassword and it does the trick, however the next one: osql -S ServerIP\MyInstance -d MyDatabase /U sa -P MyPassword ends up with the following error: [SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. [SQL Native Client]Login timeout expired [SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. The only instance running on the server is MyInstance, which is (I guess) the default one. Could you please put some time in explaining the issue.

    Read the article

  • CodePlex Daily Summary for Saturday, April 10, 2010

    CodePlex Daily Summary for Saturday, April 10, 2010New ProjectsAlan Platform: Платформа, позволяющая создавать окружение для искусственного интеллекта.Eksploracja test: testowy projekt gry eksploracjaGeoJSON.NET: GeoJSON .NETIhan sama... vaihdan myöhemmin: Testaillaan...mailfish: pop mailMiBiblioteca: Aplicación muy simple para realizar búsquedas en un listado de libros en una aplicación de escritorio y en una móvil.ServiceManagementConsole: The Service Management Console is a data-driven web app which I'm setting up to help me learn a bit about ASP.NET MVC, Visual Studio 2010, TFS and ...SimpleGeo.NET: SimpleGeo .NET clientSimplexEngine: a 3D game development framework base on Microsoft XNA. it contains game level editor, 3d model exporters and some other tools which is helpful to c...sosql: A standalone osql clone designed to replicate the functionality of SQL Server's osql. The current release of SoSql supports the basic switches tha...SpearHead: A basic app thingspikie: spikie's codeTwitter Directory: A twitter directory for your organization. Allows users to list their twitter username and any other information you want. The directory is searcha...Weather forecast for handheld internet capable device: Small PHP-project. Display wind speed and temperature for one preconfigured location. Using XML weather data aquired from the popular weather forec...New ReleasesAStar.net: AStar.net 1.12 downloads: AStar.net 1.12 Version detailsChanged framework version requirement to 2.0 to increase compatibility, removed the icon from the dll to decrease spa...BackUpAnyWhere: Milestone 0 - Documentation: First milestone for us is the documentation period when we are working on the documents starting from project presentationBB Scheduler - BroadBand Scheduler: BroadBand Scheduler v3.0: - Broadband service has some of the cheap and best monthly plans for the users all over the nation. And some of the plans include unlimited night d...BizTalk Software Factory: BizTalk Software Factory v1.7: Version 1.7 for BizTalk Server 2006 (R2). This is a service release for the BSF to support updated versions of tools. Most important is the suppor...Braintree Client Library: Braintree-1.2.0: Includes support for Subscription Search and minor bugfixes.Data Access Component: version 2.8: implement linq to dac on .net cf 2.0 and .net cf 3.5. generate dynamic data proxy use reflection.emit.DNA Workstation: DNA Workstation 0.6: Physical memory manager added Grub supportDotNetNuke Russian Language packs: Russian Core Language Pack for DotNetNuke 05.03.01: Russian Core Language Pack for DotNetNuke 05.03.01 Русский языковый пакет для ядра DotNetNuke версии 05.03.01.DotNetNuke® Gallery: 04.03.01 Release Candidate: This is a RELEASE CANDIDATE of an update to fix a showstopper issue related to a mal-formed assembly: tagPrefix attribute that causes an exception ...DotNetNuke® Store: 02.01.31 RC: What's New in this release? Bugs corrected: - The PayPal gateway has been completly rewrited. Security fixes: - Several security fixes has been ap...EnhSim: Release v1.9.8.4: Release v1.9.8.4 Various fixes in GUI only for missing trinkets in dropdowns and mis-spelling of trinket names that would have caused sim to ignore...Free Silverlight & WPF Chart Control - Visifire: Visifire SL and WPF Charts 3.0.6 beta 2 Released: Hi, This release contains following enhancements. * It implements “Zoom out” and “Show all” functionality over Zooming. Now, user will be abl...GeoJSON.NET: GeoJSON.NET 0.1: GeoJSON.NET 0.1Goblin XNA: Goblin XNA v3.4: This is Goblin XNA Version 3.4 release. The installation process is much simpler now!! Updates: 1. Inlcuded DShowNET.dll and Lidgren.Network.dll...jQuery UI DotNetNuke integration: jQuery Core module 0.6.0: This module package contains the core functionality for the jQuery UI integration. It includes the web controls, infrastructural code for including...jQuery UI DotNetNuke integration: jQUI library 0.6.0 for developers (DEBUG): This release includes the debug built .dll, .pdb, and .xml files for developers wanting to build DNN components using the jQuery UI widgets. The .d...jQuery UI DotNetNuke integration: jQUI library 0.6.0 for developers (RELEASE): This release includes the release built .dll and .xml files for developers wanting to build DNN components using the jQuery UI widgets. The .dll is...Kooboo blog: Kooboo CMS Blog Module for 2.1.0.0: Compatible with Kooboo cms 2.1.0.0 Upgrade to MVC 2Numina Application/Security Framework: Numina.Framework Core 50018: Added bulk import user page Added General settings page for updating Company Name, Theme, and API Key Add/Edit application calls Full URL to h...Open NFe: DANFe v1.9.8.1: Contribuições de Marco Aurélio (McSoft) e Leandro (Studio Classic). Melhorias de menus de contexto, tray icon, tela de configurações, correção do e...Pocket Wiki: wiki71.sbp: Incremental version (source .70 to .71) included changes are: disappearing horizontal bar fixed if you enter an invalid home page directory, you...PowerExt: v1.0 (Alpha 1): v1.0 (Alpha 1). PowerExt can display information such as assembly name, assembly version, public key etc in Explorer's File Properties dialog.RIA Services DataFilter Control for Silverlight: April 2010: Whats new?Updated to RC Added localizer for FilterOperator's (look at documentation) Added localizer for SortDirection's (look at documentation...SharePoint Labs: SPLab4006A-FRA-Level100: SPLab4006A-FRA-Level100 This SharePoint Lab will teach you the 6th best practice you should apply when writing code with the SharePoint API. Lab La...SharePoint Labs: SPLab6002A-FRA-Level300: SPLab6002A-FRA-Level300 This SharePoint Lab will teach you how to create a reusable and distributable project model for developping Feature Receive...SharePoint Labs: SPLab6003A-FRA-Level100: SPLab6003A-FRA-Level100 This SharePoint Lab will teach you how to create a custom Permission Level within Visual Studio. Lab Language : French Lab ...SimpleGeo.NET: SimpleGeo.NET 0.1: SimpleGeo.NET 0.1sosql: SoSql v1.0.0: Initial release of SoSql. This supports most of the basic parameters that osql does. sosql - SQL Server Command Line Tool Version 1.0.0.28646 usa...Syringe: Syringe 1.0 (source): Source code for Syringe 1.0Toast (for ASP.NET MVC): Toast (for ASP.NET MVC) 0.2.1: First releasetrx2html: trx2html 0.6: This version supports VS2005, VS2008 and VS2010 trx generated files with the same binaries targeting .Net 2.0Twitter Directory: TwitterDirectory 44240: Initial release See Numina Application/Security Framework for info on how to setup this application.Unit Test Specification Generator: TestDocs 1.0.2.1: Improved the performance when locating dependencies.VCC: Latest build, v2.1.30409.0: Automatic drop of latest buildvisinia: visinia_BETA_Src: The beta version is on its way, now you can drag a module and drop it on the webpage, all this dynamic side of visinia is built through the jquery,...Windows Azure - PHP contributions: PhpAzureExtensions (Azure Drives) - 0.1.1: Extension for use with Windows Azure SDK 1.1! Usage is described here.Most Popular ProjectsWBFS ManagerRawrMicrosoft SQL Server Product Samples: DatabaseASP.NET Ajax LibrarySilverlight ToolkitAJAX Control ToolkitWindows Presentation Foundation (WPF)ASP.NETMicrosoft SQL Server Community & SamplesFacebook Developer ToolkitMost Active ProjectsnopCommerce. Open Source online shop e-commerce solution.Shweet: SharePoint 2010 Team Messaging built with PexRawrAutoPocopatterns & practices – Enterprise LibraryIonics Isapi Rewrite FilterNB_Store - Free DotNetNuke Ecommerce Catalog ModuleFacebook Developer ToolkitFarseer Physics EngineNcqrs Framework - The CQRS framework for .NET

    Read the article

  • Opening a Unicode file with Perl

    - by Jaco Pretorius
    I'm using osql to run several sql scripts against a database and then I need to look at the results file to check if any errors occurred. The problem is that perl doesn't seem to like the fact that the results files are unicode. I wrote a little test script to test it and the output comes out all warbled. $file = shift; open OUTPUT, $file or die "Can't open $file: $!\n"; while (<OUTPUT>) { print $_; if (/Invalid|invalid|Cannot|cannot/) { push(@invalids, $file); print "invalid file - $inputfile - schedule for retry\n"; last; } } Any ideas? I've tried decoding using decode_utf8 but it makes no difference. I've also tried to set the encoding when opening the file. I think the problem might be that osql puts the result file in UTF-16 format, but I'm not sure. When I open the file in textpad it just tells me 'Unicode'. Edit: Using perl v5.8.8

    Read the article

  • How to trigger a SQL Agent Job from a client PC

    - by Preet Sangha
    I have SQL Agent job that is automated that a non SQL Admin user may need to occasionaly run. I know I can trigger a SQL Agent Job via sp_execute_job. Can anyone tell me where to find what I need installed on a (Non SQL Server box) client PC in order to run one of - SQLCmd, OSQL or ISQL - commands please, so I can execute the above SQL? Or is there are simpler way perhaps with out calling TSQL or without installing any SQL client tools.

    Read the article

  • I'm missing something

    - by Redi
    declare @servername varchar(2000) set @EmriServerit=(select @@servername) declare @dbname varchar(2000) set @dbname ='Test1' declare @Dir varchar(2000) set @Dir='F:\dataclient.sql' exec master.dbo.xp_cmdshell 'osql -E -S ' + @servername+ ' -d ' + @dbname +' -i ' + @Dir It gives me and error: "incorrect sysntax near +" If i don't use variables it works ok. What am i missing! Thanks in advance

    Read the article

  • Save Sql Recordset into the Flat text file?

    - by mahesh kumar
    Hi, i need to dump my sql query result into the text file. i have created the following query, DECLARE @cmd VARCHAR(2048) SET @cmd = 'OSQL -localhost -CRN370 ' + ' -UCRN370 -PCRN370' + ' -Q"SELECT TOP 5 GageId FROM EwQMS370..msgages"' + ' -oc:\authors.txt' EXEC master..xp_cmdshell @cmd, NO_OUTPUT The above query created the text file authors.txt. But the content of the file shows the following error message " Error: Conflicting switches : -U and -E " Any help really appreciated

    Read the article

  • Lync using SQL 2008 R2 SP1 - Publish Topology error

    - by EKS
    Error that shows in the web page opened by the Topology builder: Error: An error occurred: "Microsoft.Rtc.Common.Data.SqlConnectionException" "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" Looking in the log file: ( I assume this is the acutal error making it STOP) Installed SQL Server 2005 Backward Compatibility version is 8.05.1054 Error: SQL Server 2005 Backward Compatibility is not installed or its version is not high enough. SQL Server 2005 Backward Compatability SP2 or higher must be installed. I have installed SQLServer2005_BC_x64.msi from MS, and cant seem to find this SP2 version. SQL server is a 2008 R2 SP1. I have also tested with a 2008 SP3 SQL server same error. Named pippes output via ( OSQL /L) SQL-2008-1 SQL2

    Read the article

  • correct format for datetime appended to filename

    - by jhayes
    I'm trying to setup a batch file to execute a set of stored procs and dump the output to a timestamped text file. I'm having problems finding the correct format for the timestamp. Here is what I'm using osql.exe -S <server> -E -Q "EXEC <stored procedure> " -o "c:\filename_%date:~-0,10%_%time:~-0,10%.txt" The error I get is: Cannot open output file - x:\filename_Thu 06/25/_16:26:43.1.txt No such file or directory I can't find the documentation and I've played around with it but can't find the correct format.

    Read the article

  • Visual Studio 2010: Is it possible to force editor to use ANSI rather than UTF-8?

    - by Mark Redman
    I am having issues with some files in automated processes, specifically with batch files and sql files. Visual Studio seems to create these as UTF-8 rather than ansi and adds some kind of special characters to the beginning of the file (I think this is a called a pre-amble) This breaks running batch files and running swl files through osql.exe. I have had issues myself in the past in creating text files using C#, but can get around that through encoding. However its seems a bit strange I cant use Visual studio to create batch files and sql files in a database project for automation.

    Read the article

  • correct format for datetime appended to filename

    - by jhayes
    I'm trying to setup a batch file to execute a set of stored procs and dump the output to a timestamped text file. I'm having problems finding the correct format for the timestamp. Here is what I'm using osql.exe -S <server> -E -Q "EXEC <stored procedure> " -o "c:\filename_%date:~-0,10%_%time:~-0,10%.txt" The error I get is: Cannot open output file - x:\filename_Thu 06/25/_16:26:43.1.txt No such file or directory I can't find the documentation and I've played around with it but can't find the correct format.

    Read the article

  • How do I shrink my SQL Server Database?

    - by Rory Becker
    I have a Database nearly 1.9Gb Database in size MSDE2000 does not allow DBs that exceed 2.0Gb I need to shrink this DB (and many like it at various client locations) I have found and deleted many 100's of 1000's of records which are considered unneeded. these records account for a large percentage of some of the main (largest) tables in the Database. Therefore it's reasonable to assume much space should now be retrievable. So now I need to shrink the DB to account for the missing records I execute "DBCC ShrinkDatabase('MyDB')"......No effect. I have tried the various shrink facilities provided in MSSMS.... Still no effect. I have backed up the database and restored it... Still no effect. Still 1.9Gb Why? Whatever procedure I eventually find needs to be replayable on a client machine with access to nothing other than OSql or similar.

    Read the article

  • How can I script the deployment of a Visual Studio database project?

    - by Matt
    How can I script the deployment of a Visual Studio database project? I have a DB project in visual studio and I would like to use it in order to deploy on remote machines via a script. I notice that when I 'deploy' from visual studio, it generates a .sql file. I intercepted this file and tried running it from the command line with osql.exe, but I didn't have any success. Should this work, is there a better way to deploy a database programatically from a database project, may be by referencing in another project and calling some method to deploy it?

    Read the article

  • Delete backup files older than 7 days

    - by rockbala
    Using osql command, SSQL backup of a database is created. It is saved to Disk. Then renamed to match the date of the day backup was taken. All these files are saved in a single folder all the time. for example: Batch1.bat does the following 1) Created backup.bak 2) renamed to backup 12-13-2009.bak (this is done by the combination of % ~ - etc to get the date parameter) This is now automated to take backup everyday by Task scheduler in Windows. Can the batch file also be modified to delete backup files older than 7 days? if so, how ? If it is not possible via batch file, other than manually deleting the files are there any other alternatives to automate the deleting job ? Thanks in advance, Balaji S

    Read the article

  • Why does SQL Server 2000 treat SELECT test.* and SELECT t.est.* the same?

    - by Chris Pebble
    I butter-fingered a query in SQL Server 2000 and added a period in the middle of the table name: SELECT t.est.* FROM test Instead of: SELECT test.* FROM test And the query still executed perfectly. Even SELECT t.e.st.* FROM test executes without issue. I've tried the same query in SQL Server 2008 where the query fails (error: the column prefix does not match with a table name or alias used in the query). For reasons of pure curiosity I have been trying to figure out how SQL Server 2000 handles the table names in a way that would allow the butter-fingered query to run, but I haven't had much luck so far. Any sql gurus know why SQL Server 2000 ran the query without issue? Update: The query appears to work regardless of the interface used (e.g. Enterprise Manager, SSMS, OSQL) and as Jhonny pointed out below it bizarrely even works when you try: SELECT TOP 1000 dbota.ble.* FROM dbo.table

    Read the article

  • Accessing SQL Server data from iOS apps

    - by RobertChipperfield
    Almost all mobile apps need access to external data to be valuable. With a huge amount of existing business data residing in Microsoft SQL Server databases, and an ever-increasing drive to make more and more available to mobile users, how do you marry the rather separate worlds of Microsoft's SQL Server and Apple's iOS devices? The classic answer: write a web service layer Look at any of the questions on this topic asked in Internet discussion forums, and you'll inevitably see the answer, "just write a web service and use that!". But what does this process gain? For a well-designed database with a solid security model, and business logic in the database, writing a custom web service on top of this just to access some of the data from a different platform seems inefficient and unnecessary. Desktop applications interact with the SQL Server directly - why should mobile apps be any different? The better answer: the iSql SDK Working along the lines of "if you do something more than once, make it shared," we set about coming up with a better solution for the general case. And so the iSql SDK was born: sitting between SQL Server and your iOS apps, it provides the simple API you're used to if you've been developing desktop apps using the Microsoft SQL Native Client. It turns out a web service remained a sensible idea: HTTP is much more suited to the Big Bad Internet than SQL Server's native TDS protocol, removing the need for complex configuration, firewall configuration, and the like. However, rather than writing a web service for every app that needs data access, we made the web service generic, serving only as a proxy between the SQL Server and a client library integrated into the iPhone or iPad app. This client library handles all the network communication, and provides a clean API. OSQL in 25 lines of code As an example of how to use the API, I put together a very simple app that allowed the user to enter one or more SQL statements, and displayed the results in a rather primitively formatted text field. The total amount of Objective-C code responsible for doing the work? About 25 lines. You can see this in action in the demo video. Beta out now - your chance to give us your suggestions! We've released the iSql SDK as a beta on the MobileFoo website: you're welcome to download a copy, have a play in your own apps, and let us know what we've missed using the Feedback button on the site. Software development should be fun and rewarding: no-one wants to spend their time writing boiler-plate code over and over again, so stop writing the same web service code, and start doing exciting things in the new world of mobile data!

    Read the article

  • Copy SQL Server data from one server to another on a schedule

    - by rwmnau
    I have a pair of SQL Servers at different webhosts, and I'm looking for a way to periodically update the one server using the other. Here's what I'm looking for: As automated as possible - ideally, without any involvement on my part once it's set up. Pushes a number of databases, in their entirely (including any schema changes) from one server to the other Freely allows changes on the source server without breaking my process. For this reason, I don't want to use replication, as I'd have to break it every time there's an update on the source, and then recreate the publication and subscription One database is about 4GB in size and contains binary data. I'm not sure if there's a way to export this to a script, but it would be a mammoth file if I did. Originally, I was thinking of writing something that takes a scheduled full backup of each database, FTPs the backups from one server to the other once they're done, and then the new server picks it up and restores it. The only downside I can see to this is that there's no way to know that the backups are done before starting to transfer them - can these backups be done synchronously? Also, the server being refreshes is our test server, so if there's some downtime involved in moving the data, that's fine. Does anybody out there have a better idea, or is what I'm currently considering the best non-replication way to go? Thanks for your help, everybody. UPDATE: I ended up designing a custom solution to get this done using BAT files, 7Zip,command line FTP, and OSQL, so it runs in a completely automatic way and aggregates the data from a dozen servers across the country. I've detailed the steps in a blog entry. Thanks for all your input!

    Read the article

1