Search Results

Search found 25663 results on 1027 pages for 'script programmer'.

Page 30/1027 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Powershell – script all objects on all databases to files

    - by Nigel Rivett
    <# This simple PowerShell routine scripts out all the user-defined functions, stored procedures, tables and views in all the databases on the server that you specify, to the path that you specify. SMO must be installed on the machine (it happens if SSMS is installed) To run - set the servername and path Open a command window and run powershell Copy the below into the window and press enter - it should run It will create the subfolders for the databases and objects if necessary. #> $path = “C:\Test\Script\" $ServerName = "MyServerNameOrIpAddress" [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') $serverInstance = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $ServerName $IncludeTypes = @(“tables”,”StoredProcedures”,"Views","UserDefinedFunctions") $ExcludeSchemas = @(“sys”,”Information_Schema”) $so = new-object (‘Microsoft.SqlServer.Management.Smo.ScriptingOptions’) $so.IncludeIfNotExists = 0 $so.SchemaQualify = 1 $so.AllowSystemObjects = 0 $so.ScriptDrops = 0 #Script Drop Objects $dbs=$serverInstance.Databases foreach ($db in $dbs) { $dbname = "$db".replace("[","").replace("]","") $dbpath = "$path"+"$dbname" + "\" if ( !(Test-Path $dbpath)) {$null=new-item -type directory -name "$dbname"-path "$path"} foreach ($Type in $IncludeTypes) { $objpath = "$dbpath" + "$Type" + "\" if ( !(Test-Path $objpath)) {$null=new-item -type directory -name "$Type"-path "$dbpath"} foreach ($objs in $db.$Type) { If ($ExcludeSchemas -notcontains $objs.Schema ) { $ObjName = "$objs".replace("[","").replace("]","") $OutFile = "$objpath" + "$ObjName" + ".sql" $objs.Script($so)+"GO" | out-File $OutFile #-Append } } } }

    Read the article

  • Entity Framework: Connecting to a mdf user database file via localDB during script execution

    - by Marko Apfel
    Problem If you run the “Generate database from model” wizard and execute the generated script the destination database could be the wrong one (for instance master of the SQL Server). Solution To use an own mdf attachable user database some connection information must specified during script execution. Execute your script opens the dialog “Connect to Server”. Press “Options” and go to the second tab “Connection Properties”. Select “Browse server” in the “Connect to database” dropdown box: Confirm the information dialog with “Yes”. In the following dialog you could choose your user database. Now the schema is created in the user database.

    Read the article

  • Links shortener with advanced reporting?

    - by Qualcuno
    I am serching for a script (preferably in PHP) or an external solution which lets me create an "url shortener" with advanced reports. We have been using Google Short Links for a while: it works really well, but it lacks reporting (it only displays a counter with the total number of redirects). Our setup is as follows: "go.mydomain.com" points to the web service, and we can create links such as "go.mydomain.com/product1". What I'm looking for is a similar service (or self-hosted solution) but with advanced reports, so we can track redirects by day, month, etc, distinguish between mobile and desktop users (very important!) and so on.

    Read the article

  • Developing Schema Compare for Oracle (Part 4): Script Configuration

    - by Simon Cooper
    If you've had a chance to play around with the Schema Compare for Oracle beta, you may have come across this screen in the synchronization wizard: This screen is one of the few screens that, along with the project configuration form, doesn't come from SQL Compare. This screen was designed to solve a couple of issues that, although aren't specific to Oracle, are much more of a problem than on SQL Server: Datatype conversions and NOT NULL columns. 1. Datatype conversions SQL Server is generally quite forgiving when it comes to datatype conversions using ALTER TABLE. For example, you can convert from a VARCHAR to INT using ALTER TABLE as long as all the character values are parsable as integers. Oracle, on the other hand, only allows ALTER TABLE conversions that don't change the internal data format. Essentially, every change that requires an actual datatype conversion has to be done using a rebuild with a conversion function. That's OK, as we can simply hard-code the various conversion functions for the valid datatype conversions and insert those into the rebuild SELECT list. However, as there always is with Oracle, there's a catch. Have a look at the NUMTODSINTERVAL function. As well as specifying the value (or column) to convert, you have to specify an interval_unit, which tells oracle how to interpret the input number. We can't hardcode a default for this parameter, as it is entirely dependent on the user's data context! So, in order to convert NUMBER to INTERVAL DAY TO SECOND/INTERVAL YEAR TO MONTH, we need to have feedback from the user as to what to put in this parameter while we're generating the sync script - this requires a new step in the engine action/script generation to insert these values into the script, as well as new UI to allow the user to specify these values in a sensible fashion. In implementing the engine and UI infrastructure to allow this it made much more sense to implement it for any rebuild datatype conversion, not just NUMBER to INTERVALs. For conversions which we can do, we pre-fill the 'value' box with the appropriate function from the documentation. The user can also type in arbitary SQL expressions, which allows the user to specify optional format parameters for the relevant conversion functions, or indeed call their own functions to convert between values that don't have a built-in conversion defined. As the value gets inserted as-is into the rebuild SELECT list, any expression that is valid in that context can be specified as the conversion value. 2. NOT NULL columns Another problem that is solved by the new step in the sync wizard is adding a NOT NULL column to a table. If the table contains data (as most database tables do), you can't just add a NOT NULL column, as Oracle doesn't know what value to put in the new column for existing rows - the DDL statement will fail. There are actually 3 separate scenarios for this problem that have separate solutions within the engine: Adding a NOT NULL column to a table without a rebuild Here, the workaround is to add a column default with an appropriate value to the column you're adding: ALTER TABLE tbl1 ADD newcol NUMBER DEFAULT <value> NOT NULL; Note, however, there is something to bear in mind about this solution; once specified on a column, a default cannot be removed. To 'remove' a default from a column you change it to have a default of NULL, hence there's code in the engine to treat a NULL default the same as no default at all. Adding a NOT NULL column to a table, where a separate change forced a table rebuild Fortunately, in this case, a column default is not required - we can simply insert the default value into the rebuild SELECT clause. Changing an existing NULL to a NOT NULL column To implement this, we run an UPDATE command before the ALTER TABLE to change all the NULLs in the column to the required default value. For all three, we need some way of allowing the user to specify a default value to use instead of NULL; as this is essentially the same problem as datatype conversion (inserting values into the sync script), we can re-use the UI and engine implementation of datatype conversion values. We also provide the option to alter the new column to allow NULLs, or to ignore the problem completely. Note that there is the same (long-running) problem in SQL Compare, but it is much more of an issue in Oracle as you cannot easily roll back executed DDL statements if the script fails at some point during execution. Furthermore, the engine of SQL Compare is far less conducive to inserting user-supplied values into the generated script. As we're writing the Schema Compare engine from scratch, we used what we learnt from the SQL Compare engine and designed it to be far more modular, which makes inserting procedures like this much easier.

    Read the article

  • Vanilla forum personal journal tool

    - by user16648
    I am developing a forum for a research project, i am using Vanilla forum (though i am not tied to this yet). Another feature of this site will be a personal journal/diary/blog. Only the user and administrators will have access to the journal. The journal does not need any advanced features. Does anybody have any suggestions on software/script that could easily be integrated with Vanilla forum for this purpose? My first thought was using Wordpress but it is a bit to complex to adminstrate as the site is meant to be simple. And i dont really see how it can be intregrated easily the way i want it.

    Read the article

  • Introduction to Google Apps Script Triggers

    Introduction to Google Apps Script Triggers Love Apps Script, but wish that it would just automatically work in the background? We've got just the thing for you - Triggers! This show will be an introductory level show about how to set up Apps Script so your scripts are run on a schedule, or in response to certain events like a spreadsheet being edited or a form submission. We'll talk about what triggers are, how to manually schedule triggers, how to programmatically create them, and some of the cool things you can do with them. From: GoogleDevelopers Views: 87 13 ratings Time: 50:17 More in Science & Technology

    Read the article

  • Google I/O 2012 - Use What You Know: HTML and JavaScript in Apps Script

    Google I/O 2012 - Use What You Know: HTML and JavaScript in Apps Script Corey Goldfeder This session covers how to build dynamic webapps and services in Apps Script, using skills that you already have. During the session we'll show how to create rich interactive apps using regular HTML and JavaScript, while maintaining deep Google integration via Apps Script. We'll also cover how to use scripts to serve text content like JSON and XML. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 476 7 ratings Time: 40:29 More in Science & Technology

    Read the article

  • Transparent PHP script execution using mod_rewrite

    - by tori3852
    I am looking for a solution for this a problem: I need that every HTTP request (method is irrelevant) in Apache http server would be served only after execution of specific PHP script. This is needed because I need to gather some information about requests, etc. As far as I understand - this could be achieved using mod_rewrite module. So far I have done this (in .htaccess file): RewriteEngine on RewriteRule ^(.*)$ script.php [C] script.php is executed, but I need that after this original request would be executed. Thanks - any help is appreciated.

    Read the article

  • AdventureWorks2014 installation script

    - by John Paul Cook
    The AdventureWorks2014 sample database is downloadable from here . If you choose to run the script and are unfamiliar with sqlcmd, this post shows you what to do. Be sure to extract the zip file’s contents to a new folder because the instawdb.sql comes with 72 csv files that contain the actual data. If you specify a folder other than the default, you’ll have to change a path in the instawdb.sql script to point to your directory. Figure 1. instawdb.sql script file in SSMS. Notice the 3 lines that...(read more)

    Read the article

  • Profiling Script [closed]

    - by Abhirup Manna
    Possible Duplicate: I need an open source php social script, minus the social features I am looking for a web script in which users can register and create a simple profile page; something like a CV. When users log in they will be able to fill out a simple form with details like name, dob, etc. and it displays in a simple fashion on the profile page like domain.com/username Is there any simple script available for this maybe free or open sourced? An example is prairie identity server (openID). I need something similar but more customizable.

    Read the article

  • Python readability hints for a Java programmer

    - by Samuel Carrijo
    I'm a java programmer, but now entering the "realm of python" for some stuff for which Python works better. I'm quite sure a good portion of my code would look weird for a Python programmer (e.g. using parenthesis on every if). I know each language has its own conventions and set of "habits". So, from a readability standpoint what are conventions and practices which is "the way to go" in Java, but are not really the "pythonic way" to do stuff?

    Read the article

  • what it is Sharepoint ? Main advantages for programmer

    - by netmajor
    Hey, For some time i see that employers demand from programmers knowing Sharepoint, but I have problem with understand what it is :/ But today I was at IT training, and main guy told something like that:" Sharepoint is platform for commit code for programmer, control of version etc..." It is true? It looks like SVN tool... Can someone explain me what advantages it have for c# programmer? Thanks ;)

    Read the article

  • Surprise for a programmer on Birthday

    - by penelope
    Help! My boyfriend's birthday is next month. Since he is a programmer, I'd love to make him a cake with the code for "happy birthday" (and perhaps something awesome) written in icing on top. Not being a programmer myself, I have no idea where to begin. Any suggestions would be greatly appreciated!

    Read the article

  • Last words of a ??? programmer

    - by Peter
    What will the last words of some kind of programmer be? Like: LW of a Perl programmer: I don't have to write documentation. The source is formatted so well, I can read it anytime later... or Im just going to write a regular expression to find this, then I'm done...

    Read the article

  • Surprise for a programmer [closed]

    - by penelope
    help! my boyfriend's birthday is next month. since he is a programmer, I'd love to make him a cake with the code for "happy birthday" (and perhaps something awesome) written in icing on top. not being a programmer myself, i have no idea where to begin. any suggestions would be greatly appreciated!

    Read the article

  • Problem with dynamically added script element - attribute src is empty

    - by Stazh
    Hi there, I have a problem with dynamically added script element (using jQuery). Code for adding new script element to DOM is this: var pScript = document.createElement("script"); pScript.type = "text/javascript"; pScript.src = sFile; // Add element to the end of head element $("head").append(pScript); The script is added with no problem, and the code runs perfectly. But, the problem occurs when I try to find the newly added script. I use this code to iterate through all script elements: var bAdd = true; $("script").each(function() { if(this.src == sFile) bAdd = false; }); (I need this code to prevent adding script that is already loaded) Problem is that all other script elements have src attribute set, but the newly added (dynamically) has not... Any idea?

    Read the article

  • Want to set 'src' of script to my IP.

    - by Ozaki
    I have a script that links to the server I am hosting (IP can change) usually I would just use for links: var url ='http://' + window.location.hostname + 'end of url'; But in this case it isnt appearing to be so easy. I have tried: (1) $('#scriptid').attr('src', url); as well as: (2) var script = document.createElement( 'script' ); script.type = 'text/javascript'; script.src = url; $("#insert").append( script ); Now case (2) works loads the script runs the script. But when at the end of my script it hits the 'write data' it decides to replace the entire page with just the data. Any idea on how I can do this?

    Read the article

  • When tab groups are loaded, Firefox becomes unresponsible for minutes (Unresponsive script)

    - by unor
    I have several tab groups (~ 20) in Firefox. I can start the browser without any problems. However, as soon as I … click at the "Group tabs" icon in the toolbar, or right-click on a tab and hover over "Move to tab group", … Firefox becomes unresponsible/freezes for a rather long time (more than 2 minutes). It seems to load all tab groups (it doesn't load all the pages! I deactivated this in the settings). While this is happening, I get several "Unresponsive script" warnings, like: Script: chrome://global/content/bindings/tabbox.xml:0 (most of the time) Script: chrome://global/content/bindings/tabbox.xml:418 Script: chrome://browser/content/tabview.js:400 Script: chrome://browser/content/tabview.js:522 Script: resource://modules/sessionstore/SessionStore.jsm:3578 Script: resource:///components/PageThumbsProtocol.js:79 (rare) Script: resource://gre/modules/XPCOMUtils.jsm:323 (rare) (probably also other warnings, didn't record them yet, though) On all of these I click "Continue". After ~ 2-3 minutes and 3-5 warnings, I can use Firefox again. Now I can switch tab groups without any problems. Why is this happening? How can I prevent the long loading time? Is there maybe a about:config setting I could try? I started Firefox in Safe Mode (= without any add-ons): the problem still exists.

    Read the article

  • Suggestions for a nice&small - high battery life programmer notebook

    - by Emir
    Hi guys, I'm planning to buy a new notebook since the Toshiba I have now sucks in battery life. I'm a web designer & programmer, and the main features of the notebook should be: High battery life Small, 13.3" or 14" screen A fast processor and RAM that won't let me down while multi-tasking Anything other than these is secondary, I wouldn't like it to be very pricey though :) I'm now leaning towards Macbook Pro 13.3", 2.66 Ghz; it has 10 hours of battery life. However, I mostly develop on Windows, so I don't know how many hours of battery will I get if I run Windows 7 on Bootcamp. Your ideas and suggestions will be much appreciated.

    Read the article

  • Automate creation of Windows startup script?

    - by Niten
    Is there a good way to automate installing local startup (rather than login) scripts in Windows XP and Windows 7, via the command line, WMI, or otherwise (even COM or Win32 if it comes to that)? I need to setup a local startup script on a large number of computers, and unfortunately, Active Directory is absolutely not an option. I would like to write a script or small program that I can run on each computer to perform the startup script installation in order to save myself a lot of error-prone point-and-click manual labor. I see that when one uses gpedit.msc to create a local startup script, information about the script gets stored in the registry here: HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup However, if you create such a script and then delete its registry key, the script will remain listed in the local Group Policy editor; as is so often the case in Windows, apparently there is more going on there than meets the eye. This leads me to question whether it's safe to manually add subkeys for new startup scripts here (I wouldn't want my script to be overwritten by later changes made using the local Group Policy editor, for instance)... Another option that's occurred to me is to create an item in the Task Scheduler configured to run at system startup. However, my concerns there are twofold: Can this be automated any more easily? For instance, the at command doesn't appear to let you schedule a task for system startup, and WMI's Win32_ScheduledJob interface looks unreliable (it fails to show any of my currently scheduled tasks, for one thing). Would I be able to prevent users from logging in until the scheduled startup task is completed, as can be done with "normal" Windows startup scripts? Thanks in advance for any suggestions, I've been banging my head against this one for a bit...

    Read the article

  • Correct MySQL username/password, but getting Access Denied error when run from script

    - by Nick
    I'm currently trying to run the following command from within a shell script. /usr/bin/mysql -u username -ppassword -h localhost database It works perfectly fine when executed manually, and not from within a script. When I try to execute a script that contains that command, I get the following error: ERROR 1045 (28000) at line 3: Access denied for user 'username'@'localhost' (using password: YES) I literally copied and pasted the working command into the script. Why the error? As a sidenote: the ultimate intent is to run the script with cron. EDIT: Here is a stripped down version of my script that I'm trying to run. You can ignore most of it up until the point where it connects to MySQL around line 19. #!/bin/sh #Run download script to download product data cd /home/dir/Scripts/Linux /bin/sh script1.sh #Run import script to import product data to MySQL cd /home/dir/Mysql /bin/sh script2.sh #Download inventory stats spreadsheet and rename it cd /home/dir /usr/bin/wget http://www.url.com/file1.txt mv file1.txt sheet1.csv #Remove existing export spreadsheet rm /tmp/sheet2.csv #Run MySQL queries in "here document" format /usr/bin/mysql -u username -ppassword -h localhost database << EOF --Drop old inventory stats table truncate table table_name1; --Load new inventory stats into table Load data local infile '/home/dir/sheet1.csv' into table table_name1 fields terminated by ',' optionally enclosed by '"' lines terminated by '\r\n'; --MySQL queries to combine product data and inventory stats here --Export combined data in spreadsheet format group by p.value into outfile '/tmp/sheet2.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '\r\n'; EOF EDIT 2: After some more testing, the issue is with the << EOF that is at the end of the command. This is there for the "here document". When removed, the command works fine. The problem is that I need << EOF there so that the MySQL queries will run.

    Read the article

  • Backup script to FTP with timed subfolders

    - by Frederik Nielsen
    I want to make a backup script, that makes a .tar.gz of a folder I define, say fx /root/tekkit/world This .tar.gz file should then be uploaded to a FTP server, named by the time it was uploaded, for example: 07-10-2012-13-00.tar.gz How should such backup script be written? I already figured out the .tar.gz part - just need the naming and the uploading to FTP. I know that FTP is not the most secure way to do it, but as it is non-sensitive data, and FTP is the only option I have, it will do. Edit: I ended up with this script: #!/bin/bash # have some path predefined for backup unless one is provided as first argument BACKUP_DIR="/root/tekkit/world/" TMP_DIR="/tmp/tekkitbackup/" FINISH_DIR="/tmp/tekkitfinished/" # construct name for our archive TIME=$(date +%d-%m-%Y-%H-%M) if [ $1 ]; then BACKUP_DIR="$1" fi echo "Backing up dir ... $BACKUP_DIR" mkdir $TMP_DIR cp -R $BACKUP_DIR $TMP_DIR cd $FINISH_DIR tar czvfp tekkit-$TIME.tar.gz -C $TMP_DIR . # create upload script for lftp cat <<EOF> lftp.upload.script open server user user password lcd $FINISH_DIR mput tekkit-$TIME.tar.gz exit EOF # start backup using lftp and script we created; if all went well print simple message and clean up lftp -f lftp.upload.script && ( echo Upload successfull ; rm lftp.upload.script )

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >