Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Endpoint Management Community Blog
Showing posts tagged with Database
Showing posts in English
CondorMan | 25 Jun 2008 | 0 comments

OSQL is a flexible command-line utility that allows you to run SQL Queries, Commands, and Stored Procedures from the command-line or through a Batch script.

In order to run OSQL, you can either run it on your SQL Server or copy OSQL.EXE and osql.rll to a location that a client machine can run them from.

The syntax for OSQL is:

usage: osql       [-U login id]     [-P password]
 [-S server]      [-H hostname]     [-E trusted connection]
 [-d use database name] [-l login timeout]   [-t query timeout]
 [-h headers]      [-s colseparator]   [-w columnwidth]
 [-a packetsize]    [-e echo input]    [-I Enable Quoted Identifiers]
 [-L list servers]   [-c cmdend]      [-D ODBC DSN name]
 [-q "cmdline query"]  [-Q "cmdline query" and exit]
 [-n remove numbering] [-m errorlevel]
 [-r msgs to stderr]  [-V severitylevel]
 [-i inputfile...
CondorMan | 20 Jun 2008 | 8 comments

A useful feature that allows you to use any data in your Deployment Server database in a script task is Custom Tokens. The syntax for a custom token is %#*"Your SQL Query Here"%. Here are some custom tokens that might come in handy.


will return the current date and time.

%#*"SELECT @@servername"%

will return the name of the SQL Server.

%#*"SELECT FROM computer c, computer_group g WHERE c.group_id = g.group_id AND c.computer_id = %ID%"%

will return the name of the group that this computer is a member of.

savnhga | 17 Apr 2008 | 0 comments

Want to clean-up and make your SQL pretty. SQL Parser is nice. The link provides downloads for all types of parsers....

BRING | 19 Feb 2008 | 0 comments

The error message 'Invalid Character in a Base-64 String' recently appeared in the Notification Server error log. This error occurred immediately after attempting to select a database for the Notification Server to connect to, using the Database Setting option as shown below in Figure 1.

Keep reading for our (ever so humble) solution.

No matter how many times the dropdown was clicked to attempt to select a database, a blank dropdown would show, and the 'Invalid Character in a Base-64 String' error showed up in the Notification Server logs, and on this page as well.

Figure 1 - Blank Database Option


BRING | 13 Dec 2007 | 0 comments

Why are my SQL server transaction logs growing each day to the point they overrun available disk space? This is really getting annoying. I am having to truncate them manually. Why isn't the automated procedure working?

After checking EvtQFast and EvtQueue thread settings, and adjusting the Throttle delays as found in KB 2344 and KB 17079, the problem just won't go away. The transaction logs were getting still getting a lot of pressure.

We are going to need some more information. So we set the following Performance Monitor counters on the SQL Server:

  • SQLServer:Buffer Manager: Buffer Cache Hit Ratio
  • SQLServer:Buffer Manager: Checkpoint pages/sec
  • SQLServer:Buffer Manager: Page writes/sec
  • SQLServer:Databases: Log Bytes Flushed/sec (Select correct Altiris database...
SK | 27 Sep 2007 | 0 comments

SQL 2000 had a feature called Object Search, which allowed you to search database objects for the presence of a specific word.

Microsoft decided not to include this feature in SQL 2005. In order to carry out a similar operation in SQL 2005, please use the following query:

SELECT name,
CASE xtype
WHEN 'C' THEN 'CHECK constraint'
WHEN 'D' THEN 'Default or DEFAULT constraint'
WHEN 'F' THEN 'FOREIGN KEY constraint'
WHEN 'FN' THEN 'Scalar function'
WHEN 'IF' THEN 'Inlined table-function'
WHEN 'P' THEN 'Stored procedure'
WHEN 'PK' THEN 'PRIMARY KEY constraint (type is K)'
WHEN 'RF' THEN 'Replication filter stored procedure'
WHEN 'S' THEN 'System table'
WHEN 'TF' THEN 'Table function'
WHEN 'TR' THEN 'Trigger'
WHEN 'U' THEN 'User table'
WHEN 'UQ' THEN 'UNIQUE constraint (type is K)'
WHEN 'V' THEN 'View'
WHEN 'X' THEN 'Extended stored procedure'

daggy_b | 18 Sep 2007 | 1 comment

A couple of weeks ago we noticed that we were having a problem with our Deployment Server losing its connection to the SQL server every couple of hours. We were at a loss as to what was going on.

The only information we could see was in the event viewer on our Altiris server which showed us exactly what time we would lose the connection.

It turns out that about a week earlier we upgraded our main HP switch in the server and figured there must be some correlation between this and our Altiris/SQL communication problem.

It turns out that since we team the NICs on our SQL server the two network cables needed to be in the same switch. We put the network cables for the SQL server back on the same switch and all has been well since.

Just wanted to pass this along in case anyone else has had a similar problem. I know I racked my brain for a good week on this.

SK | 23 Aug 2007 | 1 comment

Every query that you run on a SQL database that modifies data in some way, has the potential of causing damage if it has not been written correctly.

Luckily for us, there are a few commands that can be used in order to help prevent this type of user error.

BEGIN TRANSACTION - Run this before running your query.

COMMIT TRANSACTION - Run this after running your query, only if it was successful and did what you wanted it to.

ROLLBACK TRANSACTION - Run this is your query did something nasty.

SK | 20 Aug 2007 | 2 comments

If you're like me and require a database that has thousands of resources in them, then the Fake Name Generator is for you.

This site now offers to create 40,000 fake names for free. :-)

If you have them populate a CSV file, you can then import them into DS or NS. :-)

SK | 17 Aug 2007 | 0 comments

I would like to inform you that Microsoft has ended support for SQL 2000 servers with SP3a applied, as of July 10th 2007.

Because of this announcement, Altiris customers are strongly encouraged to upgrade their related SQL 2000 servers to either SP4 or SQL 2005 SP1. As an added incentive, there were several performance and connectivity failure issues that were resolved with a post SP3 rollup (included in SP4).

The Altiris testing methodology is to test new product versions using the currently released technologies. Therefore, Altiris products released after July 10th 2007 will not be tested for compatibility with SQL 2000 SP3a. The minimum supported version of SQL 2000 for new Altiris product versions is SQL 2000 SP4.