AA3 Script To Create Markers By Division
I brought this topic up a while back http://forums.adobe.com/thread/525033?tstart=0
I wanted to give it another try and hope someone new can help. Long story short, I once had a script that would allow me to choose a division # (/2, /4, /8, etc), and Audition would create markers/cue points based on those division numbers. If I had an audio clip of 4 seconds = 176400 samples, and I chose "/2", I would have a cue marker at (0, 88200) and (88200, 176400) - essentially splitting the audio clip into two equal sections.
If someone can either point me in the right direction, or maybe create a script with one of those examples, I'm sure I could fill in the rest. Thanks...
I don't have a script for you. But why don't you try to make a script yourself? The way scripting is implemented in AA is not rocket science, although it is badly documented. This is from the help file, where you can find more information on scripting.
Set up Edit View for the script: If you’re creating a script that applies to open waveforms, open a file typical of the ones you’ll apply the script to. Then select a range if needed.
Choose File > Scripts. The Script Collections area displays the name of the currently opened script collection.
If the script collection you want isn’t open, do one of the following:
To open an existing script collection, click Open/New Collection, navigate to the collection (SCP) file, and then double-click it.
To create a new script collection, click Open/New Collection. Navigate to the folder in which you want to save the new collection (SCP) file. Then, type a name in the File Name text box, and click Open.
To rename a script collection, click Edit Script File. The collection (SCP) file opens in Windows Notepad. Locate the “Collection:” entry on the first line, and type a new name. Then save the file.
Type a name for your script in the Title text box.
Click Record. The Scripts dialog box closes.
Perform the actions that you want to be part of the script.
Don’t open or save a file as part of the actions for the script—these actions are specific to a particular file. If you make a mistake, return to the Scripts dialog box, click Stop Current Script, click Clear, and start over.
After you finish recording the script, choose File > Scripts, and click Stop Current Script.
Type a description for the script in the text area of the dialog box. The description appears when the script is selected.You can add or edit a description later by clicking Edit Script File.
Click Add to Collection. The script appears in the list at the left.
Similar Messages
-
Using XML file in Java script to create Google Map
Hello,
I work for a non-profit in San Diego as a GIS Specialist. I have had to teach myself about some scripting to create some dynamic maps, but I am still very limited in my skills, so I have had to explore the internet in order to discover various tutorials and examples that have led me on a positive path.
Right now I am working on a Google Mash-Up that will incorporate over 14,000 records, which will appear as separate markers that will have pop-up info bubbles with additional info inside (using html), once the marker is clicked.
Here is the XML script example that is used in the tutorial I am following:
<markers>
<marker lat="43.65654" lng="-79.90138" html="Some stuff to display in the<br>First Info Window"
label="Marker One" />
<marker lat="43.91892" lng="-78.89231" html="Some stuff to display in the<br>Second Info Window"
label="Marker Two" />
<marker lat="43.82589" lng="-79.10040" html="Some stuff to display in the<br>Third Info Window"
label="Marker Three" />
</markers>
...and this is how it looks when the file is retrieved by the java script and mapped: http://econym.googlepages.com/example_map3.htm
This is the java script that creates the Google Map. I have emboldened the section of the script that retrieves the data and parses it to create the markers:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Google Maps</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA6GoL8P5zqjQlG5A5uM1ETBSUPozAscB0cY3RG8xEGnZyeom4axRySak889rVpvHYRsV4f9OZZzbboA"
type="text/javascript"></script>
</head>
<body onunload="GUnload()">
<!-- you can use tables or divs for the overall layout -->
<table border=1>
<tr>
<td>
<div id="map" style="width: 800px; height: 1200px"></div>
</td>
<td width = 200 valign="top" style="text-decoration: underline; color: #4444ff;">
<div id="side_bar"></div>
</td>
</tr>
</table>
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
However, it seems JavaScript is either disabled or not supported by your browser.
To view Google Maps, enable JavaScript by changing your browser options, and then
try again.
</noscript>
<script type="text/javascript">
//<![CDATA[
if (GBrowserIsCompatible()) {
// this variable will collect the html which will eventualkly be placed in the side_bar
var side_bar_html = "";
// arrays to hold copies of the markers used by the side_bar
// because the function closure trick doesnt work there
var gmarkers = [];
var i = 0;
// A function to create the marker and set up the event window
function createMarker(point,name,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
// save the info we need to use later for the side_bar
gmarkers[i] = marker;
// add a line to the side_bar html
side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
i++;
return marker;
// This function picks up the click and opens the corresponding info window
function myclick(i) {
GEvent.trigger(gmarkers, "click");
// create the map
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng( 37.251699,-119.604315), 7);
*// Read the data from testXML2blackpoolformat.xml*
var request = GXmlHttp.create();
request.open("GET", "testXML2blackpoolformat.xml", true);
*request.onreadystatechange = function() {*
*if (request.readyState == 4) {*
var xmlDoc = GXml.parse(request.responseText);
*// obtain the array of markers and loop through it*
var markers = xmlDoc.documentElement.getElementsByTagName("ConnectoryRecord");
*for (var i = 0; i < markers.length; i++) {*
*// obtain the attribues of each marker*
*var lat = parseFloat(markers[i].getAttribute("lat"));*
*var lng = parseFloat(markers[i].getAttribute("lng"));*
var point = new GLatLng(lat,lng);
*var html = markers[i].getAttribute("html");*
*var label = markers[i].getAttribute("label");*
*// create the marker*
var marker = createMarker(point,label,html);
map.addOverlay(marker);
// put the assembled side_bar_html contents into the side_bar div
document.getElementById("side_bar").innerHTML = side_bar_html;
request.send(null);
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
// This Javascript is based on code provided by the
// Blackpool Community Church Javascript Team
// http://www.commchurch.freeserve.co.uk/
// http://econym.googlepages.com/index.htm
//]]>
</script>
</body>
</html>
Here is my delima--
This is the xml format that I need to use because it can accept the rest of my excel file and loop it through the 14,000+ records to create a functioning xml file. This is just a sample (2 records) of the larger file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ConnectoryAug2008>
<ConnectoryRecord>
<lng>-117.03683</lng>
<lat>32.944505</lat>
<ConnectoryID>1</ConnectoryID>
<Name>$2.95 Guys</Name>
<StreetAddress>13750 Stowe Drive</StreetAddress>
<City>Poway</City>
<State>CA</State>
<Zip>92064</Zip>
<Marker>White</Marker>
<IndustryGroup>Technical Services</IndustryGroup>
<ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=1</ConnectoryProfileLink>
</ConnectoryRecord>
<ConnectoryRecord>
<lng>-117.272843</lng>
<lat>33.13337</lat>
<ConnectoryID>2</ConnectoryID>
<Name>(GLDS) Great Lakes Data Systems</Name>
<StreetAddress>5954 Priestly Drive</StreetAddress>
<City>Carlsbad</City>
<State>CA</State>
<Zip>92008</Zip>
<Marker>Orange</Marker>
<IndustryGroup>Technology</IndustryGroup>
<ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=2</ConnectoryProfileLink>
</ConnectoryRecord>
</ConnectoryAug2008>
This is the tutorial where I found the formatting techniques to successfully create the large xml file that will format/convert my excel file properly: http://www.mrexcel.com/tip064.shtml
These variables should appear as html in the info bubble:
<ConnectoryID>2</ConnectoryID>
<Name>(GLDS) Great Lakes Data Systems</Name>
<StreetAddress>5954 Priestly Drive</StreetAddress>
<City>Carlsbad</City>
<State>CA</State>
<Zip>92008</Zip>
<IndustryGroup>Technology</IndustryGroup>
<ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=2</ConnectoryProfileLink>
The "Marker" variable instructs Google Maps to label the marker with a particular color. I will be so grateful to the person(s) that helps me get through this wall that I have been hitting for a long time. It's very difficult without having the luxury of peers who know about these types of issues.
Thank you!!Here is the relationship: They both contain geographic coordinates that produce a point on a map. I will use the rest of the information in the second xml file (company name, address, link, etc.) to produce the information for the bubble that will pop up once the marker is clicked.
My problem is that I need to try to keep the second xml file in a relatively similar format, so the rest of my records will still be accepted. If I had a smaller amount of records I could place them directly into the javascript, but because there are so many records, I need to use an xml file that can be retrieved by the java script. I chose to use the second type of xml file because I can easily copy and past the 14,000+ records that are now in excel document.
After the xml issue is corrected I need to rework the javascript that is now emboldened so that it will read the new xml file correctly. I included the first xml file so that the readers will understand what type of xml format is currently being used to produce the markers in the tutorial map. -
Illustrator script to create symbols from images in folder
Time to give back to the community...
Here is a script I recently devised to bulk create symbols from images in a folder. Tested with Illustrator CC 2014.
// Import Folder's Files as Symbols - Illustrator CC script
// Description: Creates symbols from images in the designated folder into current document
// Author : Oscar Rines (oscarrines (at) gmail.com)
// Version : 1.0.0 on 2014-09-21
// Reused code from "Import Folder's Files as Layers - Illustrator CS3 script"
// by Nathaniel V. KELSO ([email protected])
#target illustrator
function getFolder() {
return Folder.selectDialog('Please select the folder to be imported:', Folder('~'));
function symbolExists(seekInDoc, seekSymbol) {
for (var j=0; j < seekInDoc.symbols.length; j++) {
if (seekInDoc.symbols[j].name == seekSymbol) {
return true;
return false;
function importFolderContents(selectedFolder) {
var activeDoc = app.activeDocument; //Active object reference
// if a folder was selected continue with action, otherwise quit
if (selectedFolder) {
var newsymbol; //Symbol object reference
var placedart; //PlacedItem object reference
var fname; //File name
var sname; //Symbol name
var symbolcount = 0; //Number of symbols added
var templayer = activeDoc.layers.add(); //Create a new temporary layer
templayer.name = "Temporary layer"
var imageList = selectedFolder.getFiles(); //retrieve files in the folder
// Create a palette-type window (a modeless or floating dialog),
var win = new Window("palette", "SnpCreateProgressBar", {x:100, y:100, width:750, height:310});
win.pnl = win.add("panel", [10, 10, 740, 255], "Progress"); //add a panel to contain the components
win.pnl.currentTaskLabel = win.pnl.add("statictext", [10, 18, 620, 33], "Examining: -"); //label indicating current file being examined
win.pnl.progBarLabel = win.pnl.add("statictext", [620, 18, 720, 33], "0/0"); //progress bar label
win.pnl.progBarLabel.justify = 'right';
win.pnl.progBar = win.pnl.add("progressbar", [10, 35, 720, 60], 0, imageList.length-1); //progress bar
win.pnl.symbolCount = win.pnl.add("statictext", [10, 70, 710, 85], "Symbols added: 0"); //label indicating number of symbols created
win.pnl.symbolLabel = win.pnl.add("statictext", [10, 85, 710, 100], "Last added symbol: -"); //label indicating name of the symbol created
win.pnl.errorListLabel = win.pnl.add("statictext", [10, 110, 720, 125], "Error log:"); //progress bar label
win.pnl.errorList = win.pnl.add ("edittext", [10, 125, 720, 225], "", {multiline: true, scrolling: true}); //errorlist
//win.pnl.errorList.graphics.font = ScriptUI.newFont ("Arial", "REGULAR", 7);
//win.pnl.errorList.graphics.foregroundColor = win.pnl.errorList.graphics.newPen(ScriptUIGraphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
win.doneButton = win.add("button", [640, 265, 740, 295], "OK"); //button to dispose the panel
win.doneButton.onClick = function () //define behavior for the "Done" button
win.close();
win.center();
win.show();
//Iterate images
for (var i = 0; i < imageList.length; i++) {
win.pnl.currentTaskLabel.text = 'Examining: ' + imageList[i].name; //update current file indicator
win.pnl.progBarLabel.text = i+1 + '/' + imageList.length; //update file count
win.pnl.progBar.value = i+1; //update progress bar
if (imageList[i] instanceof File) {
fname = imageList[i].name.toLowerCase(); //convert file name to lowercase to check for supported formats
if( (fname.indexOf('.eps') == -1) &&
(fname.indexOf('.png') == -1)) {
win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Not a supported type.\r'; //log error
continue; // skip unsupported formats
else {
sname = imageList[i].name.substring(0, imageList[i].name.lastIndexOf(".") ); //discard file extension
// Check for duplicate symbol name;
if (symbolExists(activeDoc, sname)) {
win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Duplicate symbol for name: ' + sname + '\r'; //log error
else {
placedart = activeDoc.placedItems.add(); //get a reference to a new placedItem object
placedart.file = imageList[i]; //link the object to the image on disk
placedart.name = sname; //give the placed item a name
placedart.embed(); //make this a RasterItem
placedart = activeDoc.rasterItems.getByName(sname); //get a reference to the newly created raster item
newsymbol = activeDoc.symbols.add(placedart); //add the raster item to the symbols
newsymbol.name = sname; //name the symbol
symbolcount++; //update the count of symbols created
placedart.remove(); //remove the raster item from the canvas
win.pnl.symbolCount.text = 'Symbols added: ' + symbolcount; //update created number of symbols indicator
win.pnl.symbolLabel.text = 'Last added symbol: ' + sname; //update created symbol indicator
else {
win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Not a regular file.\r'; //log error
win.update(); //required so pop-up window content updates are shown
win.pnl.currentTaskLabel.text = ''; //clear current file indicator
// Final verdict
if (symbolcount >0) {
win.pnl.symbolLabel.text = 'Symbol library changed. Do not forget to save your work';
else {
win.pnl.symbolLabel.text = 'No new symbols added to the library';
win.update(); //update window contents
templayer.remove(); //remove the temporary layer
else {
alert("Action cancelled by user");
if ( app.documents.length > 0 ) {
importFolderContents( getFolder() );
else{
Window.alert("You must open at least one document.");Thank you, nice job & I am looking forward to trying it out!
-
Question about DBCA generate script o create RAC database 2 node cluster
Question about creating two node RAC database 11g after installing and configuration 11g clusterware. I've used DBCA to generate script to create a rac database. I've set
environment variable ORACLE_SID=RAC and the creating script creates instance of RAC1 and RAC2. My understanding is that each node will represent a node, however there should only be one database with a name of 'RAC'. Please adviseYou are getting your terminology mixed up.
You only have one database. Take a look, there are one set of datafiles on shared storage.
You have 2 instances which are accessing one database.
Database name is RAC. Instance names are RAC1, RAC2, etc, etc.
Also, if you look at the listener configuration and if your tnsnames is setup properly then connecting to RAC will connect you to either one of the instances wheras connecting to RAC1 will connect you to that instance. -
Error While running WLST script to create SOA Domain in Clustered Environme
Hi,
I am trying to run WLST script to create SOA Domain in clustered environment.The script is as follows.
import sys
print "@@@ Starting the script ..."
global props
from wlstModule import *#@UnusedWildImport
from java.io import FileInputStream
from java.io import File
#=======================================================================================
# Create Boot Properties File
#=======================================================================================
def createBootPropertiesFile(directoryPath, username, password):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/boot.properties', 'w')
fileNew.write('username=%s\n' % username)
fileNew.write('password=%s\n' % password)
fileNew.flush()
fileNew.close()
def createNodeManagerPropertiesFile(directoryPath, username, password):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/nm_password.properties', 'w')
fileNew.write('username=%s\n' % username)
fileNew.write('password=%s\n' % password)
fileNew.flush()
fileNew.close()
def createAdminStartupPropertiesFile(directoryPath, args):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/startup.properties', 'w')
args=args.replace(':','\\:')
args=args.replace('=','\\=')
fileNew.write('Arguments=%s\n' % args)
fileNew.flush()
fileNew.close()
I am getting the error :
Problem invoking WLST - Traceback (innermost last):
(no code object) at line 0
File "D:\Oracle\Middleware\Oracle_SOA1\bin\SOADomainScript.py", line 11
adminserverDir = File(directoryPath)
^
SyntaxError: invalid syntax
Do i need to set any jar in the classpath? Already jython.jar is available in the classapath.
Thanks in advance.
Regards,
SubhaHi,
I am trying to run WLST script to create SOA Domain in clustered environment.The script is as follows.
import sys
print "@@@ Starting the script ..."
global props
from wlstModule import *#@UnusedWildImport
from java.io import FileInputStream
from java.io import File
#=======================================================================================
# Create Boot Properties File
#=======================================================================================
def createBootPropertiesFile(directoryPath, username, password):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/boot.properties', 'w')
fileNew.write('username=%s\n' % username)
fileNew.write('password=%s\n' % password)
fileNew.flush()
fileNew.close()
def createNodeManagerPropertiesFile(directoryPath, username, password):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/nm_password.properties', 'w')
fileNew.write('username=%s\n' % username)
fileNew.write('password=%s\n' % password)
fileNew.flush()
fileNew.close()
def createAdminStartupPropertiesFile(directoryPath, args):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/startup.properties', 'w')
args=args.replace(':','\\:')
args=args.replace('=','\\=')
fileNew.write('Arguments=%s\n' % args)
fileNew.flush()
fileNew.close()
I am getting the error :
Problem invoking WLST - Traceback (innermost last):
(no code object) at line 0
File "D:\Oracle\Middleware\Oracle_SOA1\bin\SOADomainScript.py", line 11
adminserverDir = File(directoryPath)
^
SyntaxError: invalid syntax
Do i need to set any jar in the classpath? Already jython.jar is available in the classapath.
Thanks in advance.
Regards,
Subha -
Powershell Script to create "custom" Document Library
I have a powershell script which creates a Document Library for every user in AD.
This works, but rather than using the default Document Library I want it use a custom Document Library. However this isnt working.
My script to create the default Document Library is this...
[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
$site = new-object Microsoft.SharePoint.SPSite("http://servername/sitename");
$siteweb = $site.OpenWeb();
$webs = $siteweb.Webs;
$strFilter = "(&(objectCategory=User)(name=accountname))"
$objDomain = New-Object System.DirectoryServices.DirectoryEntry
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $objDomain
$objSearcher.PageSize = 1000
$objSearcher.Filter = $strFilter
$objSearcher.SearchScope = "Subtree"
$colProplist = "samaccountname"
foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}
$colResults = $objSearcher.FindAll()
foreach ($objResult in $colResults)
$objItem = $objResult.Properties; $objItem.samaccountname
$listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary
$listId = $siteweb.Lists.Add($objItem.samaccountname, "", $listtemplate);
$list = $siteweb.Lists.GetList($listId, $true);
$roleDef = $siteweb.RoleDefinitions.GetByType("Contributor");
$user = "domain\" + $objItem.samaccountname;
$rolAssign = new-object Microsoft.SharePoint.SPRoleAssignment($user, "email", "name", "notes");
$rolAssign.RoleDefinitionBindings.Add($roleDef);
if(!$list.HasUniqueRoleAssignments)
{$list.BreakRoleInheritance($true);}
for ($i = $list.roleAssignments.Count - 1; $i -gt -1; $i--)
{ $list.RoleAssignments.Remove($i) }
$list.RoleAssignments.Add($rolAssign);
$list.Update();
Now I have a custom Document Library named "TESTLIB" so if I substitute the line:
$listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary
with
$listTemplate = [Microsoft.SharePoint.SPListTemplateType]::TESTLIB
Then it errors with this...
How can I script powershell to create a "custom" Document Library?
ThanksThe below link should help you in creating custom document library using powershell
http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/23/use-powershell-cmdlets-to-manage-sharepoint-document-libraries.aspx
Vinod H
Thanks for the link but I cant see anything to assist creating a custom library? Was there something in paticular you saw? -
Hello,
does anyone know sample wlst scripts for creating domain for soa suite 11.1.1.4 on top of weblogic 10.3.4?
I try to create a domain having a cluster with two managed servers in two linux machines.
Any help appreciated.
regards, MattiPlease refer -
http://download.oracle.com/docs/cd/E17904_01/web.1111/e13715/domains.htm
http://download.oracle.com/docs/cd/E17904_01/web.1111/e13715/intro.htm#WLSTG112
Regards,
Anuj -
How & where to use Java script to create new button in object detail page
Hi All,
I want to create "New/Add button" in object detail page. If i am not wrong i need to use java script for that but could you please let me know how & where to use Java script to create new button in object detail page in CRMOD.
Thanks in advance.
Regards,
ManishAny related object on the detail page should have an "Add" or "New" or both buttons by default - This is vanilla functionality and will do the required action.
If you want to modify this behaviour and do something tricky you will potentially have to go for javascript. You should add the javascript on a custom web tab on that Object.
Admin --> Application Customization --> Contact -->Contact Web Applet
Now, add your javascript in the code area, after you select the type = HTML for this web applet, expose this web applet on the Contact detail layout and your javascript will be invoked whenever this page is loaded.
Check this online document to see how javascript can be embedded in CRM on Demand http://helponmyproject.com/TTOCOD/
Cheers!
Royston -
Script to create synonyms for the tables of Oracle Applications
Team,
For Oracle Applications 11i on W2K, where might I find a script to create synonyms for all of the application tables? I would think there would be a standard script somewhere in one of the directories created during the install or on the CDs.
Thanks,
LutherJohn, it is ssome sort of a bleed, but in this case it's not the part that 'might be cut off' that matters; it's the part that still needs to be on the page. Yes, I meant it to be (virtually) not-noticeable for the casual reader. Of course you can make it part of the page design, that ought to ease up matters.
The amount pages shift horizontally because of binding is called "creep", and this depends on the type of binding and the thickness of the paper. You cannot adjust for creep unless you know exactly how much this is and how your book is going to be printed and bound.
Airkite:
But the book that you printed worked out alright? Was it done with a different method?
This was a simple outlined text, not an image. Through the inaccuracies of printing and binding combined, there were no straight edges *anywhere* but fortunately the lines were thick enough to let you mentally connect them
This was done (I'm sure) with the method you proposed.
There is an alternative way, but it's way more expensive (on the other hand, the result is impressive): after the entire process of printing, binding, and cutting, books are put in a clamp one at a time and fed through a silk screen printer, fore edge on top, and printed with whatever you like.
I know of the existance of this technique but I haven't seen a book done like this in years and have no clue at all of the costs involved (writing that down in one sentence makes me realize those two might be connected). -
Modify Script to Create User Role on Single Database.
Hi All,
Below is the script to create user role on database. Here problem is when I execute this script, it creates user role for all database within an instance and I want it to create user role only on 2 database say TEST1 and TEST2
Can anyone help me to modify the script?
--===================================================================================
-- Description
-- Database Type: MSSQL
-- This script creates a role called 'gdmmonitor' for ALL databases.
-- It grants some system catalogs to this role to allow Classification and Assessment on the database.
-- It then adds a user called "sqlguard" to all databases and grants this user gdmmonitor role.
-- before runnign this script
-- you MUST CREATE A SQL LOGIN CALLED 'sqlguard'
-- This sqlguard login doesn't need to be added to any database or given
-- any privilege. The script will take care of that.
-- Note:
-- If you wish to use a different login name (instead of 'sqlguard') you need to change
-- the value of the variable '@Guardium_user' in the script below;
-- (Look for the string: "set @Guardium_user = 'sqlguard'" and replace the 'sqlguard')
-- after runnign this script
-- Nothing to do, the script already creates the db user
-- User/Password to use
-- User: sqlguard (or any other name, if changed)
-- Pass: user defined
-- Role: gdmmonitor
--===================================================================================
PRINT '>>>==================================================================>>>'
PRINT '>>> Creating role: "gdmmonitor" at the server level.'
PRINT '>>>==================================================================>>>'
-- Change to the master database
USE master
-- *** If a different login name is desired, define it here. ***
DECLARE @Guardium_user AS varchar(50)
set @Guardium_user = 'sqlguard'
DECLARE @dbName AS varchar(256)
DECLARE @memberName AS varchar(256)
DECLARE @dbVer AS nvarchar(128)
SET @dbVer = CAST(serverproperty('ProductVersion') AS nvarchar)
SET @dbVer = SUBSTRING(@dbVer, 1, CHARINDEX('.', @dbVer) - 1)
IF (@dbVer = '8') SET @dbVer = '2000'
ELSE IF (@dbVer = '9') SET @dbVer = '2005'
ELSE IF (@dbVer = '10') SET @dbVer = '2008'
ELSE IF (@dbVer = '11') SET @dbVer = '2012'
ELSE SET @dbVer = '''Unsupported Version'''
IF (@dbVer != '2000')
BEGIN
-- This privilege is required to peform a specific MSSQL test.
-- Test name: SQL OLEDB disabled (DisallowAdhocAccess registry key)
-- Procedure execute: EXEC master.dbo.sp_MSset_oledb_prop
-- Purpose: To display provider property, not changing anything.
PRINT '==> Granting MSSSQL 2005 and above setupadmin server role'
EXEC master..sp_addsrvrolemember @loginame = @Guardium_user, @rolename = N'setupadmin'
END
SELECT @dbName = DB_NAME()
PRINT '==> Starting MSSql ' + @dbVer + ' role creation on database: ' + @dbName
-- find any members of the role if they exist
CREATE TABLE #rolemember (membername VARCHAR(256) NOT NULL)
INSERT INTO #rolemember
SELECT DISTINCT usr.name FROM dbo.sysusers usr, .dbo.sysmembers mbr
WHERE usr.uid = mbr.memberuid
AND mbr.groupuid = (SELECT uid FROM .dbo.sysusers WHERE name = 'gdmmonitor')
-- Drop the Role Members If they exist
IF EXISTS (SELECT count(*) FROM #rolemember)
BEGIN
PRINT '==> Dropping the gdmmonitor role members on: ' + @dbName
DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
OPEN DropCursor
FETCH DropCursor INTO @memberName
WHILE @@Fetch_Status = 0
BEGIN
PRINT '==> Dropping member: ''' + @memberName + ''''
exec('EXEC sp_droprolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
FETCH DropCursor INTO @memberName
END
CLOSE DropCursor
DEALLOCATE DropCursor
END
-- drop the role if it exists
IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = 'gdmmonitor')
BEGIN
PRINT '==> Dropping the role gdmmonitor on: ' + @dbName
exec sp_droprole 'gdmmonitor'
END
-- Create the role
PRINT '==> Creating the role gdmmonitor on: ' + @dbName
exec sp_addrole 'gdmmonitor'
-- Grant select privileges to the role for MSSql Common
PRINT '==> Granting common SELECT privileges on: ' + @dbName
GRANT SELECT ON dbo.spt_values TO gdmmonitor
GRANT SELECT ON dbo.sysmembers TO gdmmonitor
GRANT SELECT ON dbo.sysobjects TO gdmmonitor
GRANT SELECT ON dbo.sysprotects TO gdmmonitor
GRANT SELECT ON dbo.sysusers TO gdmmonitor
GRANT SELECT ON dbo.sysconfigures TO gdmmonitor
GRANT SELECT ON dbo.sysdatabases TO gdmmonitor
GRANT SELECT ON dbo.sysfiles TO gdmmonitor
GRANT SELECT ON dbo.syslogins TO gdmmonitor
GRANT SELECT ON dbo.syspermissions TO gdmmonitor
-- Grant execute privileges to the role for MSSql Common
PRINT '==> Granting common EXECUTE privileges on: ' + @dbName
GRANT EXECUTE ON sp_helpdbfixedrole TO gdmmonitor
GRANT EXECUTE ON sp_helprotect TO gdmmonitor
GRANT EXECUTE ON sp_helprolemember TO gdmmonitor
GRANT EXECUTE ON sp_helpsrvrolemember TO gdmmonitor
GRANT EXECUTE ON sp_tables TO gdmmonitor
GRANT EXECUTE ON sp_validatelogins TO gdmmonitor
GRANT EXECUTE ON sp_server_info TO gdmmonitor
-- Check if the version is 2005 or greater
IF (@dbVer != '2000')
BEGIN
-- Grant select privileges to the role for MSSql 2005 and above
PRINT '==> Granting MSSql 2005 and above SELECT privileges on: ' + @dbName
GRANT SELECT ON sys.all_objects TO gdmmonitor
GRANT SELECT ON sys.database_permissions TO gdmmonitor
GRANT SELECT ON sys.database_principals TO gdmmonitor
GRANT SELECT ON sys.sql_logins TO gdmmonitor
GRANT SELECT ON sys.sysfiles TO gdmmonitor
GRANT SELECT ON sys.database_role_members TO gdmmonitor
GRANT SELECT ON sys.server_role_members TO gdmmonitor
GRANT SELECT ON sys.configurations TO gdmmonitor
GRANT SELECT ON sys.master_key_passwords TO gdmmonitor
GRANT SELECT ON sys.server_principals TO gdmmonitor
GRANT SELECT ON sys.server_permissions TO gdmmonitor
GRANT SELECT ON sys.credentials
TO gdmmonitor
--This is called by master.dbo.sp_MSset_oledb_prop.
--By defautl it should have already been granted to public.
GRANT EXECUTE ON sys.xp_instance_regread TO GDMMONITOR
GRANT EXECUTE ON sys.sp_MSset_oledb_prop TO GDMMONITOR
END
-- Re-add the dropped members
IF EXISTS (SELECT 1 FROM #rolemember)
BEGIN
PRINT '==> Re-adding the role members on: ' + @dbName
DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
OPEN DropCursor
FETCH DropCursor INTO @memberName
WHILE @@Fetch_Status = 0
BEGIN
PRINT '==> Re-adding member: ''' + @memberName + ''''
exec('EXEC sp_addrolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
FETCH DropCursor INTO @memberName
END
CLOSE DropCursor
DEALLOCATE DropCursor
END
-- END of role creation on database
PRINT '==> END of role creation on: ' + @dbName
PRINT ''
-- Change to the msdb database
USE msdb
set @memberName = ''
SELECT @dbName = DB_NAME()
PRINT '==> Starting MSSql ' + @dbVer + ' role creation on database: ' + @dbName
-- find any members of the role if it exists
TRUNCATE TABLE #rolemember
INSERT INTO #rolemember
SELECT DISTINCT usr.name FROM .dbo.sysusers usr, .dbo.sysmembers mbr
WHERE usr.uid = mbr.memberuid
AND groupuid = (SELECT uid FROM .dbo.sysusers WHERE name = 'gdmmonitor')
-- Drop the Role Members If they exist
IF EXISTS (SELECT count(*) FROM #rolemember)
BEGIN
PRINT '==> Dropping the gdmmonitor role members on: ' + @dbName
DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
OPEN DropCursor
FETCH DropCursor INTO @memberName
WHILE @@Fetch_Status = 0
BEGIN
PRINT '==> Dropping member: ''' + @memberName + ''''
exec('EXEC sp_droprolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
FETCH DropCursor INTO @memberName
END
CLOSE DropCursor
DEALLOCATE DropCursor
END
-- drop the role if it exists
IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = 'gdmmonitor')
BEGIN
PRINT '==> Dropping the gdmmonitor role on: ' + @dbName
exec sp_droprole 'gdmmonitor'
END
-- Create the role
PRINT '==> Creating the gdmmonitor role on: ' + @dbName
exec sp_addrole 'gdmmonitor'
-- Grant select privileges to the role for MSSql Common
PRINT '==> Granting common SELECT privileges on: ' + @dbName
GRANT SELECT ON dbo.sysobjects TO gdmmonitor
GRANT SELECT ON dbo.sysusers TO gdmmonitor
GRANT SELECT ON dbo.sysprotects TO gdmmonitor
GRANT SELECT ON dbo.sysmembers TO gdmmonitor
GRANT SELECT ON dbo.sysfiles TO gdmmonitor
GRANT SELECT ON dbo.syspermissions TO gdmmonitor
GRANT SELECT ON dbo.backupset TO gdmmonitor
-- Check if the version is 2005 or greater
IF (@dbVer != '2000')
BEGIN
-- Grant select privileges to the role for MSSql 2005 and above
PRINT '==> Granting MSSql 2005 and above SELECT privileges on: ' + @dbName
GRANT SELECT ON sys.all_objects TO gdmmonitor
GRANT SELECT ON sys.database_permissions TO gdmmonitor
GRANT SELECT ON sys.database_principals TO gdmmonitor
GRANT SELECT ON sys.sysfiles TO gdmmonitor
-- Grant execute privileges to the role for MSSql 2005 or above
PRINT '==> Granting MSSql 2005 and above EXECUTE privileges on: ' + @dbName
GRANT EXECUTE ON msdb.dbo.sp_enum_login_for_proxy TO gdmmonitor
GRANT SELECT ON sys.database_role_members TO gdmmonitor
END
IF (@dbVer > '2000' and @dbVer < '2012')
--This sp is not available in SQL 2012
BEGIN
GRANT EXECUTE ON sp_get_dtspackage TO gdmmonitor
END
-- Re-add the dropped members
IF EXISTS (SELECT count(*) FROM #rolemember)
BEGIN
PRINT '==> Re-adding the gdmmonitor role members on: ' + @dbName
DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
OPEN DropCursor
FETCH DropCursor INTO @memberName
WHILE @@Fetch_Status = 0
BEGIN
PRINT '==> Re-adding member: ''' + @memberName + ''''
exec('EXEC sp_addrolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
FETCH DropCursor INTO @memberName
END
CLOSE DropCursor
DEALLOCATE DropCursor
END
-- drop the temporary table
DROP TABLE #rolemember
-- END of role creation on database
PRINT '==> END of gdmmonitor role creation on: ' + @dbName
-- Role creation complete
PRINT '<<<==================================================================<<<'
PRINT '<<< END of creating role: "gdmmonitor" at the server level.'
PRINT '<<<==================================================================<<<'
PRINT ''
PRINT '>>>==================================================================>>>'
PRINT '>>> Starting application database role creation'
PRINT '>>>==================================================================>>>'
use master
DECLARE @databaseName AS varchar(80)
DECLARE @executeString AS varchar(7950)
DECLARE @dbcounter as int
set @dbcounter = 0
DECLARE DatabaseCursor CURSOR FOR SELECT name from sysdatabases where name not in ('master', 'msdb')
and not (status & 1024 > 1)
--read only
and not (status & 4096 > 1)
--single user
and not (status & 512 > 1)
--offline
and not (status & 32 > 1)
--loading
and not (status & 64 > 1)
--pre recovery
and not (status & 128 > 1)
--recovering
and not (status & 256 > 1)
--not recovered
and not (status & 32768 > 1)
--emergency mode
OPEN DatabaseCursor
FETCH DatabaseCursor INTO @databaseName
WHILE @@Fetch_Status = 0
BEGIN
set @dbcounter = @dbcounter + 1
set @databaseName = '"' + @databaseName + '"'
set @executeString = ''
set @executeString = 'use ' + @databaseName + ' ' +
'PRINT ''>>>==================================================================>>>'' ' +
'PRINT ''>>> Starting MSSql ' + @dbVer + ' role creation on database: ' + @databaseName + ''' ' +
'PRINT ''>>>==================================================================>>>'' ' +
'/* Variable @memberNameDBname must be declare within the string or else it will fail */ ' +
'DECLARE @memberName' + cast(@dbcounter as varchar(5)) + ' as varchar(50) ' +
'/*find any members of the role if it exists*/ ' +
'CREATE TABLE #rolemember (membername VARCHAR(256) NOT NULL) ' +
'INSERT INTO #rolemember ' +
'SELECT DISTINCT usr.name FROM dbo.sysusers usr, dbo.sysmembers mbr ' +
'WHERE usr.uid = mbr.memberuid ' +
'AND groupuid = (SELECT uid FROM dbo.sysusers WHERE name = ''gdmmonitor'') ' +
'/*Drop the Role Members If they exist*/ ' +
'IF EXISTS (SELECT * FROM #rolemember) ' +
'BEGIN ' +
'PRINT ''==> Dropping the role members on: ' + @databaseName + ''' ' +
'DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember ' +
'OPEN DropCursor ' +
'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
'WHILE @@Fetch_Status = 0 ' +
'BEGIN ' +
'PRINT ''==> Dropping member: '' + @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
'exec(''EXEC sp_droprolemember ''''gdmmonitor'''', '''''' + @memberName' + cast(@dbcounter as varchar(5)) + ' + '''''';'') ' +
'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
'END ' +
'CLOSE DropCursor ' +
'DEALLOCATE DropCursor ' +
'END ' +
'/*drop the role if it exists*/ ' +
'IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = ''gdmmonitor'') ' +
'BEGIN ' +
'PRINT ''==> Dropping the gdmmonitor role on: ' + @databaseName + ''' ' +
'exec sp_droprole ''gdmmonitor'' ' +
'END ' +
'/* Create the role */ ' +
'PRINT ''==> Creating the gdmmonitor role on: ' + @databaseName + ''' ' +
'exec sp_addrole ''gdmmonitor'' ' +
'/* Grant select privileges to the role for MSSql Common */ ' +
'PRINT ''==> Granting common SELECT privileges on: ' + @databaseName + ''' ' +
'GRANT SELECT ON dbo.sysmembers TO gdmmonitor ' +
'GRANT SELECT ON dbo.sysobjects TO gdmmonitor ' +
'GRANT SELECT ON dbo.sysprotects TO gdmmonitor ' +
'GRANT SELECT ON dbo.sysusers TO gdmmonitor ' +
'GRANT SELECT ON dbo.sysfiles TO gdmmonitor ' +
'GRANT SELECT ON dbo.syspermissions TO gdmmonitor ' +
'/* Check if the version is 2005 or greater */ ' +
'IF (' + @dbVer + ' != ''2000'') ' +
'BEGIN ' +
'/* Grant select privileges to the role for MSSql 2005 and above */ ' +
'PRINT ''==> Granting MSSql 2005 and above SELECT privileges on: ' + @databaseName + ''' ' +
'GRANT SELECT ON sys.database_permissions TO gdmmonitor ' +
'GRANT SELECT ON sys.all_objects TO gdmmonitor ' +
'GRANT SELECT ON sys.database_principals TO gdmmonitor ' +
'GRANT SELECT ON sys.sysfiles TO gdmmonitor ' +
'GRANT SELECT ON sys.database_role_members TO gdmmonitor ' +
'END ' +
'/* Re-add the dropped members */ ' +
'IF EXISTS (SELECT 1 FROM #rolemember) ' +
'BEGIN ' +
'PRINT ''==> Re-adding the gdmmonitor role members on: ' + @databaseName + ''' ' +
'DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember ' +
'OPEN DropCursor ' +
'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
'WHILE @@Fetch_Status = 0 ' +
'BEGIN ' +
'PRINT ''==> Re-adding member: '' + @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
'exec(''EXEC sp_addrolemember ''''gdmmonitor'''', '''''' + @memberName' + cast(@dbcounter as varchar(5)) + ' + '''''';'') ' +
'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
'END ' +
'CLOSE DropCursor ' +
'DEALLOCATE DropCursor ' +
'END ' +
'/* drop the temporary table */ ' +
'DROP TABLE #rolemember ' +
'PRINT ''<<<==================================================================<<<'' ' +
'PRINT ''<<< END of role creation on: ' + @databaseName + ''' ' +
'PRINT ''<<<==================================================================<<<'' ' +
'PRINT '' ''' +
'PRINT '' '''
execute (@executeString)
FETCH DatabaseCursor INTO @databaseName
END
CLOSE DatabaseCursor
DEALLOCATE DatabaseCursor
-- Adding user to all the databases
-- and grant gdmmonitor role, only if login exists.
PRINT '>>>==================================================================>>>'
PRINT '>>> Add and Grant gdmmonitor role to: ''' + @Guardium_user + ''''
PRINT '>>> on all databases.'
PRINT '>>>==================================================================>>>'
USE master
/* Check if @Guardium_user is a login exist, if not do nothing.*/
IF NOT EXISTS (select * from syslogins where name = @Guardium_user)
BEGIN
PRINT ''
PRINT '************************************************************************'
PRINT '*** ERROR: Could not find the login: ''' + @Guardium_user + ''''
PRINT '*** Please add the login and re-run this script.'
PRINT '************************************************************************'
PRINT ''
END
ELSE
BEGIN
DECLARE @counter AS smallint
set @counter = 0
-- This loop runs 4 time just to make sure that the @Guardium_user gets added to all db.
-- 99% of the time, this is totally unnecessary. But in some rare case on SQL 2005
-- the loop skips some databases when it tried to add the @Guardium_user.
-- After two to three executions, the user is added in all the dbs.
-- Might be a SQL Server bug.
WHILE @counter <= 3
BEGIN
set @counter = @counter + 1
set @databaseName = ''
set @executeString = ''
DECLARE DatabaseCursor CURSOR FOR SELECT name from sysdatabases
where not (status & 1024 > 1)
--read only
and not (status & 4096 > 1)
--single user
and not (status & 512 > 1)
--offline
and not (status & 32 > 1)
--loading
and not (status & 64 > 1)
--pre recovery
and not (status & 128 > 1)
--recovering
and not (status & 256 > 1)
--not recovered
and not (status & 32768 > 1)
--emergency mode
OPEN DatabaseCursor
FETCH DatabaseCursor INTO @databaseName
WHILE @@Fetch_Status = 0
BEGIN
set @databaseName = '"' + @databaseName + '"'
set @executeString = ''
set @executeString = 'use ' + @databaseName + ' ' +
'/*Check if the login already has access to this database */ ' +
'IF EXISTS (select * from sysusers where name = ''' + @Guardium_user + ''' and islogin = 1) ' +
'BEGIN ' +
'/*Check if login already have gdmmonitor role*/ ' +
'IF NOT EXISTS (SELECT usr.name FROM dbo.sysusers usr, dbo.sysmembers mbr WHERE usr.uid = mbr.memberuid ' +
'AND mbr.groupuid = (SELECT uid FROM dbo.sysusers WHERE name = ''gdmmonitor'') ' +
'AND usr.name = ''' + @Guardium_user + ''') ' +
'BEGIN ' +
'PRINT ''==> Granting gdmmonitor role to ' + @Guardium_user + ' on database ' + @databaseName + ''' ' +
'execute sp_addrolemember ''gdmmonitor''' + ', [' + @Guardium_user + '] ' +
'PRINT '' ''' +
'END ' +
'END ' +
'IF NOT EXISTS (select * from sysusers where name = ''' + @Guardium_user + ''' and islogin = 1) ' +
'BEGIN ' +
'PRINT ''==> Adding user [' + @Guardium_user + '] to database: ' + @databaseName + ''' ' +
'execute sp_adduser [' + @Guardium_user + '] ' +
'PRINT ''==> Granting gdmmonitor role to ' + @Guardium_user + ' on database ' + @databaseName + ''' ' +
'execute sp_addrolemember ''gdmmonitor''' + ', [' + @Guardium_user + '] ' +
'PRINT '' ''' +
'END '
execute (@executeString)
FETCH DatabaseCursor INTO @databaseName
END
CLOSE DatabaseCursor
DEALLOCATE DatabaseCursor
END -- end while
-- Required for Version 2005 or greater.
IF (@dbVer != '2000')
BEGIN
-- Grant system privileges to the @guardium_user. This is a requirement for >= SQL 2005
-- or else some system catalogs will filter our result from assessment test.
-- This will show up in sys.server_permissions view.
PRINT '==> Granting catalog privileges to: ''' + @Guardium_user + ''''
execute ('grant VIEW ANY DATABASE to [' + @Guardium_user + ']' )
execute ('grant VIEW ANY DEFINITION to [' + @Guardium_user + ']' )
END
PRINT '<<<==================================================================<<<'
PRINT '<<< Finished Adding and Granting gdmmonitor role to: ''' + @Guardium_user + ''''
PRINT '<<< on all databases.'
PRINT '<<<==================================================================<<<'
PRINT ''
END
GOThanks a lot Sir... it worked.
Can you also help me in troubleshooting below issue?
This script is working fine on all databases except one MS SQL 2005 database. build of this database is 9.00.3042.00
SA account with highest privileges is been used for script execution. errors received are as follow:
>>>==================================================================>>>
>>> Creating role: "gdmmonitor" at the server level.
>>>==================================================================>>>
==> Granting MSSSQL 2005 and above setupadmin server role
==> Starting MSSql 2005 role creation on database: master
(0 row(s) affected)
==> Dropping the gdmmonitor role members on: master
==> Creating the role gdmmonitor on: master
Msg 15002, Level 16, State 1, Procedure sp_addrole, Line 16
The procedure 'sys.sp_addrole' cannot be executed within a transaction.
==> Granting common SELECT privileges on: master
Msg 15151, Level 16, State 1, Line 117
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 118
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 119
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 120
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 121
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 122
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 123
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 124
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 125
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 126
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
==> Granting common EXECUTE privileges on: master
Msg 15151, Level 16, State 1, Line 130
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 131
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 132
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 133
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 134
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 135
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 136
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission. -
Wiki - or even better a script - to create a PKGbuild from a PPA
i would like to test Conky manager, it is available for Ubuntu, and still not in AUR.
I said to myself, lets contribute with my first PKGbuild, but, I did not found a guide at Google, not at ARCH wiki too, at least not easily - perhaps it does exist but i did not found it quickly.
But perhaps it even would be easy if someone has just write an script to make and test PKGbuilds from PPAs, it must be simple if you know - I do not - and would save a lot of work.
Conky manager
http://bazaar.launchpad.net/~teejee2008 … runk/files
If some one want to make it as I do not how.Try searching the wiki a little more closely. On a related note, man pages > wiki. `man PKGBUILD`
As for scripts to create PKGBUILDs; that's a bit meta, don't you think? Why not just take a look at some of the PKGBUILDs in the AUR that use .debs or PPAs and go from there.
This probably belongs better in the PKGBUILD request subforum; but the way this should work is that you should give your best shot at creating a PKGBUILD, and then, when you get stumped, post what you have so far, and we'll all help you work out the kinks
All the best,
-HG
Last edited by HalosGhost (2013-07-08 15:59:26) -
Is there a script to create a button to set an activated frame to document size + bleed?
Please see my question above. Thanks in advance!
Here is a script that creates a script that creates a button that sets an activated frame to document size + bleed.
Why do you need a script to create a button that sets an activated frame to document size + bleed? You might as well have a script that sets an activated frame to document size + bleed, because you already need to double-click the script that sets an activated frame to document size + bleed and so there is no need to show another button that you can click to set an activated frame to document size + bleed in that.
theScript = 'var w = new Window("dialog", "Reframe");\n'+
'w.b = w.add("button", undefined, "Click me!");\n'+
'w.b.onClick = function(){ w.close(3); };\n'+
'if (w.show() == 3)\n'+
'{\n'+
'dp = app.activeDocument.documentPreferences;\n'+
'app.selection[0].geometricBounds = [\n'+
'app.layoutWindows[0].activePage.bounds[0]-dp.documentBleedTopOffset,\n'+
'app.layoutWindows[0].activePage.bounds[1]-dp.documentBleedBottomOffset,\n'+
'app.layoutWindows[0].activePage.bounds[2]+dp.documentBleedInsideOrLeftOffset,\n'+
'app.layoutWindows[0].activePage.bounds[3]+dp.documentBleedOutsideOrRightOffset];\n'+
writeFile = new File (app.activeScript.parent+'/new script.jsx');
writeFile = writeFile.saveDlg( 'Save script', File.fs == "Windows" ? "Script:*.jsx,All files:*.*" : function(file) { return file instanceof Folder || (!(file.hidden) && file.name.match(/\.jsx$/i)); } );
if (writeFile != null && writeFile.open("w"))
writeFile.encoding = "utf8";
writeFile.write (theScript);
writeFile.close(); -
Running a SQL Script to Create an Object Type
When I do Database Development with JDeveloper and fellow the instruction at
http://www.oracle.com/technology/obe/obe1013jdev/dbdevelopment/obe_%20dbasedevmt.htm
and try to Running a SQL Script to Create an Object Type by Right-clicking emp_rec.sql in the editor and
choose Run in SQL*Plus > hrconn, the new Obuect type can not created. The screen flashs and I only got the
message
"Invoking SQL*Plus...
D:\oracle\product\10.2.0\db_1\BIN\cemutls.exe
hr@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SID=ORCL)))
@emp_rec.sql" and nothing else (No error like JBO-XXXXX).
Can anybody Help Me? Thanks a lot!
SID: ORCLHi Simon,
Having had a closer look at your original message it seems that rather than selecting the SQL*Plus executable in the directory you have managed to select the file 'D:\oracle\product\10.2.0\db_1\BIN\cemutls.exe'.
If you go to 'Tools | Preferences' and select the 'Database Connections' node and alter the 'SQL*Plus Executable' field to 'D:\oracle\product\10.2.0\db_1\BIN\sqlplus.exe' and then try again, this should then work.
Regards,
Lisa -
Script to create user in OBIEE 10g
In OBIEE 10g, is it possible to use a script to create users automatically.
I need this option to import user from the LDAP because if the LDAP are not created in OBI adminsitration tool, they can´t enter in analyticas (BI Server error)I suggest you to read
Oracle9i Database Performance Tuning Guide and Reference
Release 2 (9.2)
Part Number A96533-02
Chapter 7. Using Plan Stability
~ Madrid -
Can I automate the process of creating markers?
I want to design settings for when to begin and end a marker, and have the program automatically apply them to an entire audio file. Is this possible?
See your other post. You can create markers from text files in CuelistTool and add them into your wav files.
Maybe you are looking for
-
Table for Cost of Goods Manufactured price
Hi Gurus I want to find out the cost of manufacture price for the item number eg if we go tcode ck11n , enter the material number and execute twice we get the total cost of the manuafactured which is ppc3 so could anyone tell me which table can I see
-
Kernel26-icc compiled with Intel's compiler instead of gcc
I'm working on kernel26-icc, it's the kernel26 but compiled with Intel's compiler. Can't seem to upload it to AUR ("Invalid name: only lowercase letters are allowed.") http://www.linuxdna.com/ So far I've this: PKGBUILD # Maintainer: Mathias Burén <m
-
Keep my monitor 'warm' ?
I'm using a Blackmagic Intensity Pro to output to my monitor. +(XDCAM EX 1080p 25)+. It takes a while for the monitor to stabilise after the screen's been black for a while. As the screen goes black every time I check my email +(or do anything on the
-
I have a doubly linked list and I wrote two methods, one to insert items at a specified index and one method to remove items at a specified index. I am not 100% sure if I wrote these methods correctly. Well I'm pretty sure I messed something up becau
-
Path Layer Deselecting after Making Selection
Hello, As I use this tool for multiple fast renderings, I love to use the Path Selection tool to modify the selection as such in quick succession. However, it seems as though after my slection is made, usign the path, the path layer disappears,